Class LoggingSessionCommandContextCloseListener
- java.lang.Object
-
- org.flowable.common.engine.impl.logging.LoggingSessionCommandContextCloseListener
-
- All Implemented Interfaces:
CommandContextCloseListener
public class LoggingSessionCommandContextCloseListener extends Object implements CommandContextCloseListener
-
-
Field Summary
Fields Modifier and Type Field Description protected StringengineTypeprotected LoggingListenerloggingListenerprotected LoggingSessionloggingSessionprotected com.fasterxml.jackson.databind.ObjectMapperobjectMapper
-
Constructor Summary
Constructors Constructor Description LoggingSessionCommandContextCloseListener()LoggingSessionCommandContextCloseListener(LoggingSession loggingSession, LoggingListener loggingListener, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafterSessionsFlush(CommandContext commandContext)Called when theSessionhave been successfully flushed.voidclosed(CommandContext commandContext)Called when theCommandContextis successfully closed.voidcloseFailure(CommandContext commandContext)Called when theCommandContexthas not been successfully closed due to an exception that happened.voidclosing(CommandContext commandContext)Called when theCommandContextis being closed, but no 'close logic' has been executed.StringgetEngineType()LoggingListenergetLoggingListener()LoggingSessiongetLoggingSession()booleanmultipleAllowed()Determines if there are multiple occurrences allowed of this close listenerIntegerorder()Determines the order in which the close listeners will be executedvoidsetEngineType(String engineType)voidsetLoggingListener(LoggingListener loggingListener)voidsetLoggingSession(LoggingSession loggingSession)
-
-
-
Field Detail
-
loggingSession
protected LoggingSession loggingSession
-
loggingListener
protected LoggingListener loggingListener
-
objectMapper
protected com.fasterxml.jackson.databind.ObjectMapper objectMapper
-
engineType
protected String engineType
-
-
Constructor Detail
-
LoggingSessionCommandContextCloseListener
public LoggingSessionCommandContextCloseListener()
-
LoggingSessionCommandContextCloseListener
public LoggingSessionCommandContextCloseListener(LoggingSession loggingSession, LoggingListener loggingListener, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
-
-
Method Detail
-
closing
public void closing(CommandContext commandContext)
Description copied from interface:CommandContextCloseListenerCalled when theCommandContextis being closed, but no 'close logic' has been executed. At this point, theTransactionContext(if applicable) has not yet been committed/rolledback and none of theSessioninstances have been flushed. If an exception happens and it is not caught in this method: - TheSessioninstances will *not* be flushed - TheTransactionContextwill be rolled back (if applicable)- Specified by:
closingin interfaceCommandContextCloseListener
-
closed
public void closed(CommandContext commandContext)
Description copied from interface:CommandContextCloseListenerCalled when theCommandContextis successfully closed. At this point, theTransactionContext(if applicable) has been successfully committed and no rollback has happened. AllSessioninstances have been closed. Note that throwing an exception here does *not* affect the transaction. TheCommandContextwill log the exception though.- Specified by:
closedin interfaceCommandContextCloseListener
-
closeFailure
public void closeFailure(CommandContext commandContext)
Description copied from interface:CommandContextCloseListenerCalled when theCommandContexthas not been successfully closed due to an exception that happened. Note that throwing an exception here does *not* affect the transaction. TheCommandContextwill log the exception though.- Specified by:
closeFailurein interfaceCommandContextCloseListener
-
afterSessionsFlush
public void afterSessionsFlush(CommandContext commandContext)
Description copied from interface:CommandContextCloseListenerCalled when theSessionhave been successfully flushed. When an exception happened during the flushing of the sessions, this method will not be called. If an exception happens and it is not caught in this method: - TheSessioninstances will *not* be flushed - TheTransactionContextwill be rolled back (if applicable)- Specified by:
afterSessionsFlushin interfaceCommandContextCloseListener
-
order
public Integer order()
Description copied from interface:CommandContextCloseListenerDetermines the order in which the close listeners will be executed- Specified by:
orderin interfaceCommandContextCloseListener- Returns:
- order lowest number will be executed first
-
multipleAllowed
public boolean multipleAllowed()
Description copied from interface:CommandContextCloseListenerDetermines if there are multiple occurrences allowed of this close listener- Specified by:
multipleAllowedin interfaceCommandContextCloseListener- Returns:
- multipleAllowed multiple occurrences allowed
-
getLoggingSession
public LoggingSession getLoggingSession()
-
setLoggingSession
public void setLoggingSession(LoggingSession loggingSession)
-
getLoggingListener
public LoggingListener getLoggingListener()
-
setLoggingListener
public void setLoggingListener(LoggingListener loggingListener)
-
getEngineType
public String getEngineType()
-
setEngineType
public void setEngineType(String engineType)
-
-