public class SimpleInvoiceMessageSink extends GenericService implements MessageSink
This class may be useful as a base class for message sinks that listen
for an operate on invoice-related messages. Subclasses can override the
handleMessage(String, InvoiceMessage) method to
process the message without worrying about how the data is packaged in
the surrounding ObjectMessage
InvoiceMessage| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CLASS_VERSION |
protected static java.util.ResourceBundle |
sDefaultResources |
SERVICE_INFO_KEYDEFAULT_LOG_TRACE_STATUSDEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS| Constructor and Description |
|---|
SimpleInvoiceMessageSink() |
| Modifier and Type | Method and Description |
|---|---|
void |
handleMessage(java.lang.String pPortName,
java.lang.String pMessageType,
InvoiceMessage pInvoiceMsg)
Handle a single InvoiceMessage.
|
void |
receiveMessage(java.lang.String pPortName,
javax.jms.Message pMessage)
Implements the MessageSink interface by examining the type of the
message and verifying that it is a JMS ObjectMessage, then retrieving
the underlying object data and verifying that it is of type
InvoiceMessage before calling handleMessage on it.
|
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, stopServicevlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarningpublic static java.lang.String CLASS_VERSION
protected static java.util.ResourceBundle sDefaultResources
public void receiveMessage(java.lang.String pPortName,
javax.jms.Message pMessage)
throws javax.jms.JMSException,
java.lang.IllegalArgumentException
receiveMessage in interface MessageSinkpPortName - The port on which the message arrived.pMessage - The raw JMS message being received.javax.jms.JMSException - if any of the JMS methods used throw an exceptionjava.lang.IllegalArgumentException - if either pMessage or the underlying Dynamo Message Bean is not
of the expected type.public void handleMessage(java.lang.String pPortName,
java.lang.String pMessageType,
InvoiceMessage pInvoiceMsg)
loggingDebug is set to true. Subclasses
can override this method to add application-specific message processing.pPortName - The port on which the message arrived.pMessageType - The JMS message type specifier for the original message.pInvoiceMsg - The InvoiceMessage object carrying the message data.