atg.agent.events
Class AgentEventDroplet

java.lang.Object
  extended by atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
      extended by atg.nucleus.GenericService
          extended by atg.nucleus.TimedOperationService
              extended by atg.nucleus.servlet.ServletService
                  extended by atg.nucleus.servlet.HttpServletService
                      extended by atg.servlet.DynamoServlet
                          extended by atg.agent.events.AgentEventDroplet
All Implemented Interfaces:
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, ParameterServlet, java.util.EventListener, javax.servlet.Servlet

public class AgentEventDroplet
extends DynamoServlet

This droplet class can be used to create and send agent events from pages.

This droplet has no output params.

Input params

activityType
can be used to pass an acitivty type to the droplet
profile
the customer profile to associate with the event.

Configurable properties:

agentEventJMSType
the jms type used when sending the event
agentEventPortName
the port name used when sending the event through the message source
agentMessagingTools
the agent messaging tools component reference
activityType
the activity type for the agent event. this value is used if activityType is not passed in as an input parameter.

See Also:
#buildEvent(DynamoHttpServletRequest, DynamoHttpServletResponse, String, String)

Field Summary
static ParameterName ACTIVITY_TYPE_PARAM
          the input parameter name for the activityType parameter
protected static java.lang.String AGENTRESOURCES
           
static java.lang.String CLASS_VERSION
          Class version string
static ParameterName PROFILE_PARAM
          the input parameter name for the profile parameter
protected  java.util.ResourceBundle sBundle
           
static ParameterName TICKET_ID_PARAM
          the input parameter name for the ticketId parameter
 
Fields inherited from class atg.servlet.DynamoServlet
mAllowCleanupRequest, mParameters
 
Fields inherited from class atg.nucleus.servlet.ServletService
SERVLET_INFO_KEY
 
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
AgentEventDroplet()
           
 
Method Summary
protected  AgentEvent buildEvent(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse, RepositoryItem pProfile, java.lang.String pActivityType, java.lang.String pTicketId)
          Builds the AgentEvent object that will be sent.
 java.lang.String getActivityType()
          Returns the agent activity type used when creating new events
protected  java.lang.String getActivityType(DynamoHttpServletRequest pRequest)
          Returns either the optional activity type input parameter value or the configured activity type.
 java.lang.String getAgentEventJMSType()
           
 java.lang.String getAgentEventPortName()
           
 AgentMessagingTools getAgentMessagingTools()
          Returns component for sending agent messages
protected  RepositoryItem getProfile(DynamoHttpServletRequest pRequest)
          Returns the profile parameter value.
protected  java.lang.String getTicketId(DynamoHttpServletRequest pRequest)
          Returns the profile parameter value.
 void service(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Creates and sends the agent event using the message source defined in AgentMessagingTools.
 void setActivityType(java.lang.String pActivityType)
          Sets the agent activity type used when creating new events
 void setAgentEventJMSType(java.lang.String pAgentEventJMSType)
          Sets the JMS Type used for sending the agent events.
 void setAgentEventPortName(java.lang.String pAgentEventPortName)
          Sets the property AgentEventPortName
 void setAgentMessagingTools(AgentMessagingTools pAgentMessagingTools)
          Sets the component for sending agent messages
 
Methods inherited from class atg.servlet.DynamoServlet
doDelete, doGet, doPost, doPut, getParameter, getParameters, getServletContext, init, service, service, setParameter
 
Methods inherited from class atg.nucleus.servlet.ServletService
destroy, getServletConfig, getServletInfo, setServletInfo
 
Methods inherited from class atg.nucleus.TimedOperationService
getAverageRequestHandlingTime, getHandledRequestCount, getRequestStartTime, getTotalRequestHandlingTime, isKeepingStatistics, notifyHandledRequest, resetStatistics, setKeepingStatistics
 
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

AGENTRESOURCES

protected static final java.lang.String AGENTRESOURCES
See Also:
Constant Field Values

sBundle

protected final java.util.ResourceBundle sBundle

ACTIVITY_TYPE_PARAM

public static final ParameterName ACTIVITY_TYPE_PARAM
the input parameter name for the activityType parameter


PROFILE_PARAM

public static final ParameterName PROFILE_PARAM
the input parameter name for the profile parameter


TICKET_ID_PARAM

public static final ParameterName TICKET_ID_PARAM
the input parameter name for the ticketId parameter

Constructor Detail

AgentEventDroplet

public AgentEventDroplet()
Method Detail

setAgentEventJMSType

public void setAgentEventJMSType(java.lang.String pAgentEventJMSType)
Sets the JMS Type used for sending the agent events.

Parameters:
pAgentEventJMSType - the JMS Type used for sending the agent events.

getAgentEventJMSType

public java.lang.String getAgentEventJMSType()
Returns:
the JMS Type used for sending the agent events.

setAgentEventPortName

public void setAgentEventPortName(java.lang.String pAgentEventPortName)
Sets the property AgentEventPortName

Parameters:
pAgentEventPortName - The port name used by default for sending AgentEvents through the AgentMessageSource.

getAgentEventPortName

public java.lang.String getAgentEventPortName()
Returns:
the port name used by default for sending AgentEvents through the AgentMessageSource.

setAgentMessagingTools

public void setAgentMessagingTools(AgentMessagingTools pAgentMessagingTools)
Sets the component for sending agent messages

Parameters:
pAgentMessagingTools -

getAgentMessagingTools

public AgentMessagingTools getAgentMessagingTools()
Returns component for sending agent messages

Returns:
AgentMessagingTools

setActivityType

public void setActivityType(java.lang.String pActivityType)
Sets the agent activity type used when creating new events


getActivityType

public java.lang.String getActivityType()
Returns the agent activity type used when creating new events


getActivityType

protected java.lang.String getActivityType(DynamoHttpServletRequest pRequest)
Returns either the optional activity type input parameter value or the configured activity type.


getProfile

protected RepositoryItem getProfile(DynamoHttpServletRequest pRequest)
Returns the profile parameter value.


getTicketId

protected java.lang.String getTicketId(DynamoHttpServletRequest pRequest)
Returns the profile parameter value.


buildEvent

protected AgentEvent buildEvent(DynamoHttpServletRequest pRequest,
                                DynamoHttpServletResponse pResponse,
                                RepositoryItem pProfile,
                                java.lang.String pActivityType,
                                java.lang.String pTicketId)
Builds the AgentEvent object that will be sent.

Parameters:
pRequest -
pResponse -
pProfile - the customer profile for the event.
pActivityType - the activity type of AgentEvent
Returns:
AgentEvent

service

public void service(DynamoHttpServletRequest pRequest,
                    DynamoHttpServletResponse pResponse)
             throws javax.servlet.ServletException,
                    java.io.IOException
Creates and sends the agent event using the message source defined in AgentMessagingTools.

Overrides:
service in class DynamoServlet
Parameters:
pRequest - the request to be processed
pResponse - the response object for this request
Throws:
javax.servlet.ServletException - an application specific error occurred processing this request
java.io.IOException - an error occurred reading data from the request or writing data to the response.
See Also:
#buildEvent(DynamoHttpServletRequest, DynamoHttpServletResponse, String,String), AgentMessageSource.sendAgentEventMessage(AgentEvent, String, String)