|
|||||||||
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.GenericService atg.commerce.messaging.SourceSinkTemplate
public class SourceSinkTemplate
This class handles the sending and receiving of CommerceMessage. All classes in fulfillment that send and receive messages will extend this class. Classes that extend this will appear in the configuration XML file for patchbay.
CommerceMessage
Field Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string |
Fields inherited from class atg.nucleus.GenericService |
---|
SERVICE_INFO_KEY |
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 | |
---|---|
SourceSinkTemplate()
|
Method Summary | |
---|---|
int |
getDelayOnSendRetry()
The number of milliseconds to wait when trying to send a message before the DMS system tells us it is ok. |
MessageSourceContext |
getMessageSourceContext()
Return the message source context for this source. |
java.lang.String |
getMessageSourceName()
This defines the string that the source property of messages will be set to. |
javax.transaction.TransactionManager |
getTransactionManager()
The beginning and ending of transactions are handled by the transaction manager. |
boolean |
isAllowMessageSending()
This class cannot send messages if this is false. |
void |
receiveMessage(java.lang.String pPortName,
javax.jms.Message pMessage)
This is called to notify the component that a Message has arrived through the given input port. |
void |
sendCommerceMessage(CommerceMessage pCommerceMessage,
java.lang.String pPortName)
This is a convenience method which wraps the CommerceMessage to be sent into an ObjectMessage and sends it along the port that is specified. |
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 |
setDelayOnSendRetry(int pDelayOnSendRetry)
|
void |
setMessageSourceContext(MessageSourceContext pMessageSourceContext)
Set the message source context for this source. |
void |
setMessageSourceName(java.lang.String pMessageSourceName)
|
void |
setTransactionManager(javax.transaction.TransactionManager pTransactionManager)
|
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, 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
Constructor Detail |
---|
public SourceSinkTemplate()
Method Detail |
---|
public void setMessageSourceContext(MessageSourceContext pMessageSourceContext)
setMessageSourceContext
in interface MessageSource
MessageSource
public MessageSourceContext getMessageSourceContext()
public void setMessageSourceName(java.lang.String pMessageSourceName)
public java.lang.String getMessageSourceName()
public void setAllowMessageSending(boolean pAllowMessageSending)
public boolean isAllowMessageSending()
public void setDelayOnSendRetry(int pDelayOnSendRetry)
public int getDelayOnSendRetry()
public void startMessageSource()
startMessageSource
in interface MessageSource
public void stopMessageSource()
stopMessageSource
in interface MessageSource
public void setTransactionManager(javax.transaction.TransactionManager pTransactionManager)
public javax.transaction.TransactionManager getTransactionManager()
public void receiveMessage(java.lang.String pPortName, javax.jms.Message pMessage) throws javax.jms.JMSException
This is called to notify the component that a Message has arrived through the given input port. The MessageSink should be prepared to handle concurrent calls of this method from multiple Threads. This is left as an empty method in this class and should be overriden by the implementor.
receiveMessage can be extended to handle extra types of messages by overriding the handleNewMessageType method.
receiveMessage
in interface MessageSink
javax.jms.JMSException
public void sendCommerceMessage(CommerceMessage pCommerceMessage, java.lang.String pPortName) throws javax.jms.JMSException
pCommerceMessage
- The message to be sent.pPortName
- The port to send the message to.
javax.jms.JMSException
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.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |