public class LoggingSessionCommandContextCloseListener extends Object implements CommandContextCloseListener
| Modifier and Type | Field and Description |
|---|---|
protected String |
engineType |
protected LoggingListener |
loggingListener |
protected LoggingSession |
loggingSession |
protected com.fasterxml.jackson.databind.ObjectMapper |
objectMapper |
| Constructor and Description |
|---|
LoggingSessionCommandContextCloseListener() |
LoggingSessionCommandContextCloseListener(LoggingSession loggingSession,
LoggingListener loggingListener,
com.fasterxml.jackson.databind.ObjectMapper objectMapper) |
| Modifier and Type | Method and Description |
|---|---|
void |
afterSessionsFlush(CommandContext commandContext)
Called when the
Session have been successfully flushed. |
void |
closed(CommandContext commandContext)
Called when the
CommandContext is successfully closed. |
void |
closeFailure(CommandContext commandContext)
Called when the
CommandContext has not been successfully closed due to an exception that happened. |
void |
closing(CommandContext commandContext)
Called when the
CommandContext is being closed, but no 'close logic' has been executed. |
String |
getEngineType() |
LoggingListener |
getLoggingListener() |
LoggingSession |
getLoggingSession() |
boolean |
multipleAllowed()
Determines if there are multiple occurrences allowed of this close listener
|
Integer |
order()
Determines the order in which the close listeners will be executed
|
void |
setEngineType(String engineType) |
void |
setLoggingListener(LoggingListener loggingListener) |
void |
setLoggingSession(LoggingSession loggingSession) |
protected LoggingSession loggingSession
protected LoggingListener loggingListener
protected com.fasterxml.jackson.databind.ObjectMapper objectMapper
protected String engineType
public LoggingSessionCommandContextCloseListener()
public LoggingSessionCommandContextCloseListener(LoggingSession loggingSession, LoggingListener loggingListener, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
public void closing(CommandContext commandContext)
CommandContextCloseListenerCommandContext is being closed, but no 'close logic' has been executed.
At this point, the TransactionContext (if applicable) has not yet been committed/rolledback and none of the Session instances have been flushed.
If an exception happens and it is not caught in this method: - The Session instances will *not* be flushed - The TransactionContext will be rolled back (if applicable)closing in interface CommandContextCloseListenerpublic void closed(CommandContext commandContext)
CommandContextCloseListenerCommandContext is successfully closed.
At this point, the TransactionContext (if applicable) has been successfully committed and no rollback has happened. All Session instances have been closed.
Note that throwing an exception here does *not* affect the transaction. The CommandContext will log the exception though.closed in interface CommandContextCloseListenerpublic void closeFailure(CommandContext commandContext)
CommandContextCloseListenerCommandContext has not been successfully closed due to an exception that happened.
Note that throwing an exception here does *not* affect the transaction. The CommandContext will log the exception though.closeFailure in interface CommandContextCloseListenerpublic void afterSessionsFlush(CommandContext commandContext)
CommandContextCloseListenerSession have 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: - The Session instances will *not* be flushed - The TransactionContext will be rolled back (if applicable)afterSessionsFlush in interface CommandContextCloseListenerpublic Integer order()
CommandContextCloseListenerorder in interface CommandContextCloseListenerpublic boolean multipleAllowed()
CommandContextCloseListenermultipleAllowed in interface CommandContextCloseListenerpublic LoggingSession getLoggingSession()
public void setLoggingSession(LoggingSession loggingSession)
public LoggingListener getLoggingListener()
public void setLoggingListener(LoggingListener loggingListener)
public String getEngineType()
public void setEngineType(String engineType)
Copyright © 2021 Flowable. All rights reserved.