Package ca.cdr.api.camel
Interface ICamelProcessorTxLogHelper
public interface ICamelProcessorTxLogHelper
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Requests to include message body in the transaction log step Default value is true -
Method Summary
Modifier and TypeMethodDescriptionvoid
addStepIfTxLogActive
(org.apache.camel.Exchange theExchange, ITxLogStepsProvider theStepsProvider) If transaction logging was initiated (smile:txLogStart procedure, present before current procedure in route), adds step from provider to the transaction logvoid
addStepIfTxLogActive
(org.apache.camel.Exchange theExchange, String theProcedureName) If transaction logging was initiated (smile:txLogStart procedure, present before current procedure in route), adds a log step to the transaction logvoid
addStepIfTxLogActive
(org.apache.camel.Exchange theExchange, List<TransactionLogStepJson> theLogSteps) If transaction logging was initiated (smile:txLogStart procedure, present before current procedure in route), adds step from provider to the transaction log, adds the list of steps to the transaction logbuildTxLogStep
(org.apache.camel.Exchange theExchange, TransactionLogStepTypeEnum theLogStepType, org.apache.commons.lang3.tuple.Pair<String, TransactionLogBodyTypeEnum> theBodyAndType, TransactionLogOutcomeEnum theOutcome) Builds a new transaction log step considering received exchange properties and parameters.void
clearTxLog
(org.apache.camel.Exchange theExchange) Discards current transaction logging and marks logging not initiated for the routevoid
commitTxLog
(org.apache.camel.Exchange theExchange) Commits the transaction log to configured writersgetRequestUrl
(org.apache.camel.Exchange theExchange, String theProcedureName) Builds a string containing the received procedure name, including the module id if present in the exchangeboolean
isTxLogShowBody
(org.apache.camel.Exchange theExchange) Informs if 'showMsgBody' parameter is presentboolean
isTxLogStarted
(org.apache.camel.Exchange theExchange) informs if a transaction log is active for the routevoid
startTxLog
(org.apache.camel.Exchange theExchange) Requests transaction log initiation for the route
-
Field Details
-
TX_LOG_PARAM_SHOW_BODY
Requests to include message body in the transaction log step Default value is true- See Also:
-
-
Method Details
-
addStepIfTxLogActive
If transaction logging was initiated (smile:txLogStart procedure, present before current procedure in route), adds a log step to the transaction log- Parameters:
theExchange
- the camel exchangetheProcedureName
- the log-producing procedure name
-
addStepIfTxLogActive
void addStepIfTxLogActive(org.apache.camel.Exchange theExchange, ITxLogStepsProvider theStepsProvider) If transaction logging was initiated (smile:txLogStart procedure, present before current procedure in route), adds step from provider to the transaction log- Parameters:
theExchange
- the camel exchangetheStepsProvider
- the provider of the corresponding transaction log steps
-
addStepIfTxLogActive
void addStepIfTxLogActive(org.apache.camel.Exchange theExchange, List<TransactionLogStepJson> theLogSteps) If transaction logging was initiated (smile:txLogStart procedure, present before current procedure in route), adds step from provider to the transaction log, adds the list of steps to the transaction log- Parameters:
theExchange
- the camel exchangetheLogSteps
- the log steps to be added to the transaction log
-
buildTxLogStep
TransactionLogStepJson buildTxLogStep(org.apache.camel.Exchange theExchange, TransactionLogStepTypeEnum theLogStepType, org.apache.commons.lang3.tuple.Pair<String, TransactionLogBodyTypeEnum> theBodyAndType, TransactionLogOutcomeEnum theOutcome) Builds a new transaction log step considering received exchange properties and parameters.- Parameters:
theExchange
- the camel exchangetheLogStepType
- the transaction log step typetheBodyAndType
- A Pair containing the body and the body type or nulltheOutcome
- The desired step outcome- Returns:
- the built transaction log step
-
getRequestUrl
Builds a string containing the received procedure name, including the module id if present in the exchange- Parameters:
theExchange
- the camel exchangetheProcedureName
- the log-producing procedure name- Returns:
- a string with the built executing procedure URI
-
isTxLogShowBody
Informs if 'showMsgBody' parameter is present- Parameters:
theExchange
- the camel exchange- Returns:
- boolean indicating if 'showMsgBody' parameter is present
-
isTxLogStarted
informs if a transaction log is active for the route- Parameters:
theExchange
- the camel exchange- Returns:
- boolean indicating if transaction log is active for the route
-
startTxLog
Requests transaction log initiation for the route- Parameters:
theExchange
- the camel exchange
-
commitTxLog
Commits the transaction log to configured writers- Parameters:
theExchange
- the camel exchange
-
clearTxLog
Discards current transaction logging and marks logging not initiated for the route- Parameters:
theExchange
- the camel exchange
-