public class CommandContext extends Object
| Modifier and Type | Field and Description |
|---|---|
protected Map<String,Object> |
attributes |
protected List<CommandContextCloseListener> |
closeListeners |
protected Command<?> |
command |
protected AbstractEngineConfiguration |
currentEngineConfiguration |
protected Map<String,AbstractEngineConfiguration> |
engineConfigurations |
protected Throwable |
exception |
protected LinkedList<Object> |
resultStack |
protected boolean |
reused |
protected Map<Class<?>,SessionFactory> |
sessionFactories |
protected Map<Class<?>,Session> |
sessions |
| Constructor and Description |
|---|
CommandContext(Command<?> command) |
protected Map<String,AbstractEngineConfiguration> engineConfigurations
protected AbstractEngineConfiguration currentEngineConfiguration
protected Command<?> command
protected Map<Class<?>,SessionFactory> sessionFactories
protected Throwable exception
protected List<CommandContextCloseListener> closeListeners
protected boolean reused
protected LinkedList<Object> resultStack
public CommandContext(Command<?> command)
public void close()
protected void logException()
public void addCloseListener(CommandContextCloseListener commandContextCloseListener)
public List<CommandContextCloseListener> getCloseListeners()
protected void executeCloseListenersClosing()
protected void executeCloseListenersAfterSessionFlushed()
protected void executeCloseListenersClosed()
protected void executeCloseListenersCloseFailure()
protected void flushSessions()
protected void closeSessions()
public void exception(Throwable exception)
AbstractCommandContext instance. That exception will be rethrown at the end of closing the AbstractCommandContext instance.
If there is already an exception being stored, a 'masked exception' message will be logged.public <T> T getSession(Class<T> sessionClass)
public Map<Class<?>,SessionFactory> getSessionFactories()
public void setSessionFactories(Map<Class<?>,SessionFactory> sessionFactories)
public AbstractEngineConfiguration getCurrentEngineConfiguration()
public void setCurrentEngineConfiguration(AbstractEngineConfiguration currentEngineConfiguration)
public Map<String,AbstractEngineConfiguration> getEngineConfigurations()
public void setEngineConfigurations(Map<String,AbstractEngineConfiguration> engineConfigurations)
public void addEngineConfiguration(String engineKey, AbstractEngineConfiguration engineConfiguration)
public Command<?> getCommand()
public Throwable getException()
public boolean isReused()
public void setReused(boolean reused)
public Object getResult()
public void setResult(Object result)
Copyright © 2017 Flowable. All rights reserved.