public class MessagePipelineMapper extends SourceSinkTemplate
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASS_VERSION |
protected static java.util.ResourceBundle |
sResourceBundle
Resource Bundle
|
SERVICE_INFO_KEY
DEFAULT_LOG_TRACE_STATUS
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS
Constructor and Description |
---|
MessagePipelineMapper()
Creates a new
MessagePipelineMapper instance. |
Modifier and Type | Method and Description |
---|---|
protected void |
executeErrorChain(javax.jms.ObjectMessage pMessage,
java.lang.String pMessageType,
java.lang.String pPortName,
java.lang.Object pParams)
This method is executed when a fatal error occurs.
|
PipelineManager |
getApprovalPipelineManager()
Returns property approvalPipelineManager
|
protected java.lang.String |
getErrorPipelineIdForMessage(javax.jms.ObjectMessage pMessage,
java.lang.String pMessageType,
java.lang.String pPortName)
This method is used to obtain the error pipeline chain that should
be executed if the execution for a given incoming message fails.
|
java.util.Properties |
getMessageTypeToChainNameMap()
Return the MessageTypeToChainNameMap property.
|
java.util.Properties |
getMessageTypeToErrorChainNameMap()
Return the MessageTypeToErrorChainNameMap property.
|
protected java.lang.String |
getPipelineIdForMessage(javax.jms.ObjectMessage pMessage,
java.lang.String pMessageType,
java.lang.String pPortName)
This method is used to obtain the pipeline chain that should
be executed for a given incoming message.
|
protected java.util.Map |
getPipelineParamsForMessage(javax.jms.ObjectMessage pMessage,
java.lang.String pMessageType,
java.lang.String pPortName)
This method is responsible for populating a Map with the
appropriate information on what data should be passed
to a pipline chain.
|
javax.transaction.TransactionManager |
getTransactionManager()
Returns property transactionManager
|
protected void |
handleObjectMessage(javax.jms.ObjectMessage pMessage,
java.lang.String pMessageType,
java.lang.String pPortName,
java.lang.Object pParams)
make a call to the appropriate method to handle the type of
message that we have.
|
protected boolean |
processPipelineErrors(PipelineResult pResult)
This method processes the pipeline result error messages.
|
void |
receiveMessage(java.lang.String pPortName,
javax.jms.Message pMessage)
This method is called when an ApprovalUpdateMessage is sent to it.
|
void |
setApprovalPipelineManager(PipelineManager pApprovalPipelineManager)
Sets property approvalPipelineManager
|
void |
setMessageTypeToChainNameMap(java.util.Properties pMessageTypeToChainNameMap)
Set the MessageTypeToChainNameMap property.
|
void |
setMessageTypeToErrorChainNameMap(java.util.Properties pMessageTypeToErrorChainNameMap)
Set the MessageTypeToErrorChainNameMap property.
|
void |
setTransactionManager(javax.transaction.TransactionManager pTransactionManager)
Sets property transactionManager
|
getDelayOnSendRetry, getMessageSourceContext, getMessageSourceName, isAllowMessageSending, sendCommerceMessage, sendObjectMessage, setAllowMessageSending, setDelayOnSendRetry, setMessageSourceContext, setMessageSourceName, startMessageSource, stopMessageSource
addLogListener, createAdminServlet, doStartService, doStopService, getAbsoluteName, getAdminServlet, getAdminServletOutputStreamEncoding, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isAdminServletUseServletOutputStream, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, reResolveThis, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setAdminServletOutputStreamEncoding, setAdminServletUseServletOutputStream, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning
public static java.lang.String CLASS_VERSION
protected static java.util.ResourceBundle sResourceBundle
public MessagePipelineMapper()
MessagePipelineMapper
instance.
Creates a new HashMap for the messageTypeToChainNameMap
property.public java.util.Properties getMessageTypeToChainNameMap()
public void setMessageTypeToChainNameMap(java.util.Properties pMessageTypeToChainNameMap)
pMessageTypeToChainNameMap
- public java.util.Properties getMessageTypeToErrorChainNameMap()
public void setMessageTypeToErrorChainNameMap(java.util.Properties pMessageTypeToErrorChainNameMap)
pMessageTypeToErrorChainNameMap
- public PipelineManager getApprovalPipelineManager()
public void setApprovalPipelineManager(PipelineManager pApprovalPipelineManager)
pApprovalPipelineManager
- the value to set for property approvalPipelineManagerpublic javax.transaction.TransactionManager getTransactionManager()
getTransactionManager
in class SourceSinkTemplate
public void setTransactionManager(javax.transaction.TransactionManager pTransactionManager)
setTransactionManager
in class SourceSinkTemplate
pTransactionManager
- the value to set for property transactionManagerpublic void receiveMessage(java.lang.String pPortName, javax.jms.Message pMessage) throws javax.jms.JMSException
receiveMessage
in interface MessageSink
receiveMessage
in class SourceSinkTemplate
javax.jms.JMSException
protected void handleObjectMessage(javax.jms.ObjectMessage pMessage, java.lang.String pMessageType, java.lang.String pPortName, java.lang.Object pParams) throws RunProcessException
pMessage
- an ObjectMessage
valuepPortName
- a String
valueRunProcessException
protected void executeErrorChain(javax.jms.ObjectMessage pMessage, java.lang.String pMessageType, java.lang.String pPortName, java.lang.Object pParams)
pMessage
- an ObjectMessage
valuepMessageType
- a String
valuepPortName
- a String
valueprotected java.lang.String getPipelineIdForMessage(javax.jms.ObjectMessage pMessage, java.lang.String pMessageType, java.lang.String pPortName)
The way that this method works is that it determins a pipeline chain to execute based upon the String in the pMessageType parameter. This by default is the JMSType of the ObjectMessage. This class maintains a Map of messageType to chain names. The key into this map should be the JMSType of the particular message. So, if a message of type atg.commerce.order.SubmitOrder comes into
pMessage
- an ObjectMessage
valuepMessageType
- a String
valuepPortName
- a String
valueString
valueprotected java.lang.String getErrorPipelineIdForMessage(javax.jms.ObjectMessage pMessage, java.lang.String pMessageType, java.lang.String pPortName)
pMessage
- an ObjectMessage
valuepMessageType
- a String
valuepPortName
- a String
valueString
valueprotected java.util.Map getPipelineParamsForMessage(javax.jms.ObjectMessage pMessage, java.lang.String pMessageType, java.lang.String pPortName)
pMessage
- an ObjectMessage
valuepMessageType
- a String
valuepPortName
- a String
valueMap
valueprotected boolean processPipelineErrors(PipelineResult pResult)