public class EventSenderDroplet extends DynamoServlet implements MessageSource
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string
|
java.lang.String |
ERROR |
ParameterName |
EVENT_OBJECT
The parameter containing the object to be sent in the JMS message
|
mAllowCleanupRequest, mParameters
SERVLET_INFO_KEY
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 |
---|
EventSenderDroplet() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getEventType()
The type of the event, this should be set to such things as: atg.commerce.order.Order if
that is what is being sent.
|
MessageSourceContext |
getMessageSourceContext()
Return the message source context for this source.
|
java.lang.String |
getPortName()
The port on which this message is sent.
|
boolean |
isAllowMessageSending()
This class cannot send messages if this is false.
|
boolean |
isEnableSending()
If true the messages will be sent otherwise nothing is sent.
|
protected java.io.Serializable |
retrieveEventObject(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
This method is responsible for retrieving or constructing the event message that needs 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 |
service(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
This method calls @see #retrieveEventObject and attempts to send it using #see
sendObjectMessage if the returned value was not null.
|
void |
setAllowMessageSending(boolean pAllowMessageSending) |
void |
setEnableSending(boolean pEnableSending) |
void |
setEventType(java.lang.String pEventType) |
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.
|
doDelete, doGet, doPost, doPut, getParameter, getParameters, getServletContext, init, service, service, setParameter
destroy, getServletConfig, getServletInfo, setServletInfo
getAverageRequestHandlingTime, getHandledRequestCount, getRequestStartTime, getTotalRequestHandlingTime, isKeepingStatistics, notifyHandledRequest, resetStatistics, setKeepingStatistics
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, toString
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
public final ParameterName EVENT_OBJECT
public final java.lang.String ERROR
protected java.io.Serializable retrieveEventObject(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
pRequest
- the request object that was passed in through the service methodpResponse
- the response object that was passed in through the service methodpublic void service(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
service
in class DynamoServlet
pRequest
- the request to be processedpResponse
- the response object for this requestjavax.servlet.ServletException
- an application specific error occurred
processing this requestjava.io.IOException
- an error occurred reading data from the request
or writing data to the response.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 void setPortName(java.lang.String pPortName)
public java.lang.String getPortName()
public void setEnableSending(boolean pEnableSending)
public boolean isEnableSending()