atg.agent.events
Class AgentMessageSource

java.lang.Object
  extended by atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
      extended by atg.nucleus.GenericService
          extended by atg.agent.events.AgentMessageSource
All Implemented Interfaces:
MessageSource, atg.naming.AbsoluteNameable, NameContextBindingListener, NameContextElement, atg.naming.NameContextParentable, NameResolver, AdminableService, atg.nucleus.Configured, ApplicationLogging, atg.nucleus.logging.ApplicationLoggingSender, atg.nucleus.logging.TraceApplicationLogging, VariableArgumentApplicationLogging, ComponentNameResolver, Service, ServiceListener, java.util.EventListener

public class AgentMessageSource
extends GenericService
implements MessageSource


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
AgentMessageSource()
           
 
Method Summary
 java.lang.String getDefaultPortName()
           
 MessageSourceContext getMessageSourceContext()
           
 javax.transaction.TransactionManager getTransactionManager()
           
 void sendAgentEventMessage(AgentEvent pAgentEvent, java.lang.String pJmsType)
          Sends an agent message using the port defined by the defaultPortName
 void sendAgentEventMessage(AgentEvent pAgentEvent, java.lang.String pPortName, java.lang.String pJmsType)
          Sends an agent message using the specified port.
protected  void sendMessage(java.io.Serializable pMessageBean, java.lang.String pPortName, java.lang.String pJmsType)
          Sends the message bean using the specified port name and jms type
 void setDefaultPortName(java.lang.String pDefaultPortName)
          property DefaultPortName
 void setMessageSourceContext(MessageSourceContext pContext)
          property messageSourceContext
 void setTransactionManager(javax.transaction.TransactionManager pTransactionManager)
          property transactionManager
 void startMessageSource()
          Instructs this message source to begin distributing messages.
 void stopMessageSource()
          Instructs this message source to begin distributing messages.
 
Methods inherited from class atg.nucleus.GenericService
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
 
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

CLASS_VERSION

public static final java.lang.String CLASS_VERSION
Class version string

See Also:
Constant Field Values
Constructor Detail

AgentMessageSource

public AgentMessageSource()
Method Detail

setDefaultPortName

public void setDefaultPortName(java.lang.String pDefaultPortName)
property DefaultPortName

The port name used by default for sending message through dms.


getDefaultPortName

public java.lang.String getDefaultPortName()

setTransactionManager

public void setTransactionManager(javax.transaction.TransactionManager pTransactionManager)
property transactionManager

The Transaction Manager instance used when sending messages.


getTransactionManager

public javax.transaction.TransactionManager getTransactionManager()

setMessageSourceContext

public void setMessageSourceContext(MessageSourceContext pContext)
property messageSourceContext

Specified by:
setMessageSourceContext in interface MessageSource

getMessageSourceContext

public MessageSourceContext getMessageSourceContext()

startMessageSource

public void startMessageSource()
Instructs this message source to begin distributing messages.

Specified by:
startMessageSource in interface MessageSource

stopMessageSource

public void stopMessageSource()
Instructs this message source to begin distributing messages.

Specified by:
stopMessageSource in interface MessageSource

sendAgentEventMessage

public void sendAgentEventMessage(AgentEvent pAgentEvent,
                                  java.lang.String pJmsType)
Sends an agent message using the port defined by the defaultPortName

Parameters:
pAgentEvent - the event object
pJmsType - the jms type for sending the event

sendAgentEventMessage

public void sendAgentEventMessage(AgentEvent pAgentEvent,
                                  java.lang.String pPortName,
                                  java.lang.String pJmsType)
Sends an agent message using the specified port.

Parameters:
pAgentEvent - the event object
pPortName - the port name used to send the message
pJmsType - the jms type for sending the event
See Also:
sendMessage(Serializable, String, String)

sendMessage

protected void sendMessage(java.io.Serializable pMessageBean,
                           java.lang.String pPortName,
                           java.lang.String pJmsType)
Sends the message bean using the specified port name and jms type

If the port name is not provided, the defaultPortName is used.

Parameters:
pMessageBean - the message object
pPortName - the port name to use. This will default to the defaultPortName if one is not supplied.
pJmsType - the jms type used for sending the event