|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object atg.nucleus.logging.VariableArgumentApplicationLoggingImpl atg.nucleus.logging.ApplicationLoggingImpl atg.commerce.order.processor.EventSender
public class EventSender
This is a base class that should be extended by other processors that wish to send events from within a chain. @see ProcSendFulfillmentMessage is an example of just such a processor.
Field Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string |
protected int |
FAILURE
|
protected int |
SUCCESS
|
Fields inherited from interface atg.service.pipeline.PipelineProcessor |
---|
STOP_CHAIN_EXECUTION, STOP_CHAIN_EXECUTION_AND_COMMIT, STOP_CHAIN_EXECUTION_AND_ROLLBACK |
Fields inherited from interface atg.nucleus.logging.TraceApplicationLogging |
---|
DEFAULT_LOG_TRACE_STATUS |
Fields inherited from interface atg.nucleus.logging.ApplicationLogging |
---|
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS |
Constructor Summary | |
---|---|
EventSender()
An empty constructor. |
Method Summary | |
---|---|
java.io.Serializable |
createEventToSend(java.lang.Object pParam,
PipelineResult pResult)
This method creates and returns the event to be sent by this processor. |
java.lang.String |
getEventType()
Deprecated. Subclasses of this (such as ProcSendScenarioEvent) may dynamically determine the type of event. meaning getEventType may not be thread safe (since the type is set in "createEventToSend" and and checked when calling "sendObjectMessage"). Use the getEventType method that takes an Object as a parameter instead. |
java.lang.String |
getEventType(java.lang.Object pEventToSend)
This will return the event type defined on the class (same behavior as calling getEventType() . |
IdGenerator |
getMessageIdGenerator()
The service that generates Ids for all messages. |
java.lang.String |
getMessageIdSpaceName()
The name of the idspace to get our message ids from |
MessageSourceContext |
getMessageSourceContext()
Return the message source context for this source. |
java.lang.String |
getNextMessageId()
Uses the id generator to get the next message id. |
java.lang.String |
getPortName()
The port on which this message is sent. |
int[] |
getRetCodes()
Returns the valid return codes 1 - The processor executed successfully 2 - The processor failed to execute properly |
protected java.lang.String |
getSiteId(java.lang.Object pParams)
Retrieves site id from pipeline parameters |
boolean |
isAllowMessageSending()
This class cannot send messages if this is false. |
int |
runProcess(java.lang.Object pParam,
PipelineResult pResult)
This method will call @see #createEventToSend which will return the event object to be sent. |
void |
sendObjectMessage(java.io.Serializable pObjectMessage,
java.lang.String pType,
java.lang.String pPortName)
Sends an object message of type pType, out on port pPortName. |
void |
setAllowMessageSending(boolean pAllowMessageSending)
|
void |
setEventType(java.lang.String pEventType)
|
void |
setMessageIdGenerator(IdGenerator pMessageIdGenerator)
|
void |
setMessageIdSpaceName(java.lang.String pMessageIdSpaceName)
|
void |
setMessageSourceContext(MessageSourceContext pMessageSourceContext)
Set the message source context for this source. |
void |
setPortName(java.lang.String pPortName)
|
void |
startMessageSource()
This is called to tell the MessageSource that it may begin sending messages. |
void |
stopMessageSource()
This is called to tell the MessageSource that it should stop sending messages. |
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl |
---|
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static java.lang.String CLASS_VERSION
protected final int SUCCESS
protected final int FAILURE
Constructor Detail |
---|
public EventSender()
Method Detail |
---|
public void setMessageIdGenerator(IdGenerator pMessageIdGenerator)
public IdGenerator getMessageIdGenerator()
public void setMessageIdSpaceName(java.lang.String pMessageIdSpaceName)
public java.lang.String getMessageIdSpaceName()
public java.lang.String getNextMessageId()
public int[] getRetCodes()
getRetCodes
in interface PipelineProcessor
public java.io.Serializable createEventToSend(java.lang.Object pParam, PipelineResult pResult) throws java.lang.Exception
java.lang.Exception
public int runProcess(java.lang.Object pParam, PipelineResult pResult) throws java.lang.Exception
runProcess
in interface PipelineProcessor
pParam
- a HashMap which must contains parameters which are added to the messagepResult
- a PipelineResult object which stores any information which must
be returned from this method invocation
java.lang.Exception
- throws any exception back to the callerand the @see #getPortName.
,
PipelineProcessor.runProcess(Object, PipelineResult)
public void sendObjectMessage(java.io.Serializable pObjectMessage, java.lang.String pType, java.lang.String pPortName) throws javax.jms.JMSException
pObjectMessage
- the object to be placed in the object message.pType
- the type of the message being sent.pPortName
- the port on which this message is going to be sent.
javax.jms.JMSException
- is thrown when a failure to send the message occurs. This is
generally a configuration issue.public void setMessageSourceContext(MessageSourceContext pMessageSourceContext)
setMessageSourceContext
in interface MessageSource
public MessageSourceContext getMessageSourceContext()
public void setAllowMessageSending(boolean pAllowMessageSending)
public boolean isAllowMessageSending()
public void startMessageSource()
startMessageSource
in interface MessageSource
public void stopMessageSource()
stopMessageSource
in interface MessageSource
public void setEventType(java.lang.String pEventType)
public java.lang.String getEventType()
public java.lang.String getEventType(java.lang.Object pEventToSend)
getEventType()
. Subclass of this class should extend
this method if they call setEventType
during the call
to createEventToSend
. Instead of just returning the property
it should inspect pEventToSend to see what the type is.
pEventToSend
-
public void setPortName(java.lang.String pPortName)
public java.lang.String getPortName()
protected java.lang.String getSiteId(java.lang.Object pParams)
pParams
- pipeline parameters
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |