public class AbstractCommandContext extends Object
| Modifier and Type | Field and Description |
|---|---|
protected Map<String,Object> |
attributes |
protected List<BaseCommandContextCloseListener<AbstractCommandContext>> |
closeListeners |
protected BaseCommand<?,? extends AbstractCommandContext> |
command |
protected Throwable |
exception |
protected boolean |
reused |
protected Map<Class<?>,SessionFactory> |
sessionFactories |
protected Map<Class<?>,Session> |
sessions |
| Constructor and Description |
|---|
AbstractCommandContext(BaseCommand<?,? extends AbstractCommandContext> command) |
protected BaseCommand<?,? extends AbstractCommandContext> command
protected Map<Class<?>,SessionFactory> sessionFactories
protected Throwable exception
protected List<BaseCommandContextCloseListener<AbstractCommandContext>> closeListeners
protected boolean reused
public AbstractCommandContext(BaseCommand<?,? extends AbstractCommandContext> command)
public void close()
protected void logException()
public void addCloseListener(BaseCommandContextCloseListener<AbstractCommandContext> commandContextCloseListener)
public List<BaseCommandContextCloseListener<AbstractCommandContext>> 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 BaseCommand<?,? extends AbstractCommandContext> getCommand()
public Throwable getException()
public boolean isReused()
public void setReused(boolean reused)
Copyright © 2017 Flowable. All rights reserved.