atg.agent.events
Class AgentSessionEndListener

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

public class AgentSessionEndListener
extends GenericService
implements atg.naming.NameContextPreBindingListener, NameContextBindingListener

This class sends and AgentSessionEndEvent when a session ends.

This class must be added to the SessionManager's list of nameContextBindingListeners in order for it to know when sessions are destroyed.


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
AgentSessionEndListener()
          Empty constructor.
 
Method Summary
 java.lang.String getAgentItemDescriptorName()
          Returns the name of the agent item descriptor in the profile repository.
 AgentMessagingTools getAgentMessagingTools()
           
 java.lang.String getInternalUserItemDescriptorName()
           
protected  atg.nucleus.NucleusNameResolver getNameResolver(NameContext pNameContext)
          Gets a name resolver that is scoped to the session.
protected  atg.nucleus.NucleusNameResolver getNameResolver(NameContext pNameContext, boolean pCreate)
           
protected  atg.nucleus.NucleusNameResolver getNameResolverWithNucleusRoot(NameContext pNameContext, boolean pCreate)
           
 java.lang.String getProfilePath()
          The full name of the Profile component for every request.
 Repository getProfileRepository()
          Returns the repository in which user profiles are stored.
 java.lang.String getSessionInfoPath()
          The full path of the Profile component for every request.
 boolean isEnabled()
           
 void nameContextElementBound(NameContextBindingEvent pEvent)
          This method isets the session start time in the session info component.
 void nameContextElementPreBound(NameContextBindingEvent pEvent)
          Dummy implementation to satisfy interface requirement.
 void nameContextElementPreUnbound(NameContextBindingEvent pEvent)
          Called just before a session is destroyed.
 void nameContextElementUnBound(NameContextBindingEvent pEvent)
          Dummy implementation to satisfy interface requirement.
 void setAgentItemDescriptorName(java.lang.String pAgentItemDescriptorName)
          Sets the name of the agent item descriptor in the profile repository.
 void setAgentMessagingTools(AgentMessagingTools pAgentMessagingTools)
          The component that will build & send the AgentLogout message.
 void setEnabled(boolean pEnabled)
          boolean indicating if this component should do anything.
 void setInternalUserItemDescriptorName(java.lang.String pInternalUserItemDescriptorName)
           
 void setProfilePath(java.lang.String pValue)
          The full name of the Profile component for every request.
 void setProfileRepository(Repository pProfileRepository)
          Sets the repository in which user profiles are stored
 void setSessionInfoPath(java.lang.String pValue)
          The full name of the Profile component for every request.
 
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, 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
 
Methods inherited from interface atg.naming.NameContextBindingListener
nameContextElementUnbound
 

Field Detail

CLASS_VERSION

public static java.lang.String CLASS_VERSION
Class version string

Constructor Detail

AgentSessionEndListener

public AgentSessionEndListener()
Empty constructor.

Method Detail

setEnabled

public void setEnabled(boolean pEnabled)
boolean indicating if this component should do anything.

Parameters:
pEnabled - boolean indicating if this component should do anything.

isEnabled

public boolean isEnabled()
Returns:
boolean indicating if this component should do anything.

setAgentMessagingTools

public void setAgentMessagingTools(AgentMessagingTools pAgentMessagingTools)
The component that will build & send the AgentLogout message.

Parameters:
pAgentMessagingTools - the component that will build & send the AgentLogout message.

getAgentMessagingTools

public AgentMessagingTools getAgentMessagingTools()
Returns:
Returns the component that will build & send the AgentLogout message

setAgentItemDescriptorName

public void setAgentItemDescriptorName(java.lang.String pAgentItemDescriptorName)
Sets the name of the agent item descriptor in the profile repository.


getAgentItemDescriptorName

public java.lang.String getAgentItemDescriptorName()
Returns the name of the agent item descriptor in the profile repository.


getInternalUserItemDescriptorName

public java.lang.String getInternalUserItemDescriptorName()
Returns:
Returns the internalUserItemDescriptorName.

setInternalUserItemDescriptorName

public void setInternalUserItemDescriptorName(java.lang.String pInternalUserItemDescriptorName)
Parameters:
pInternalUserItemDescriptorName - The internalUserItemDescriptorName to set.

setProfileRepository

public void setProfileRepository(Repository pProfileRepository)
Sets the repository in which user profiles are stored


getProfileRepository

public Repository getProfileRepository()
Returns the repository in which user profiles are stored.


setProfilePath

public void setProfilePath(java.lang.String pValue)
The full name of the Profile component for every request.


getProfilePath

public java.lang.String getProfilePath()
The full name of the Profile component for every request.


setSessionInfoPath

public void setSessionInfoPath(java.lang.String pValue)
The full name of the Profile component for every request.


getSessionInfoPath

public java.lang.String getSessionInfoPath()
The full path of the Profile component for every request.


nameContextElementBound

public void nameContextElementBound(NameContextBindingEvent pEvent)
This method isets the session start time in the session info component. This is used when running on third party application servers to store information about the session that we need for sending the session end event.

Specified by:
nameContextElementBound in interface NameContextBindingListener
Overrides:
nameContextElementBound in class GenericService

nameContextElementUnBound

public void nameContextElementUnBound(NameContextBindingEvent pEvent)
Dummy implementation to satisfy interface requirement.


nameContextElementPreBound

public void nameContextElementPreBound(NameContextBindingEvent pEvent)
Dummy implementation to satisfy interface requirement.

Specified by:
nameContextElementPreBound in interface atg.naming.NameContextPreBindingListener

nameContextElementPreUnbound

public void nameContextElementPreUnbound(NameContextBindingEvent pEvent)
Called just before a session is destroyed. Sends an AgentSessionEndEvent.

Specified by:
nameContextElementPreUnbound in interface atg.naming.NameContextPreBindingListener

getNameResolver

protected atg.nucleus.NucleusNameResolver getNameResolver(NameContext pNameContext)
Gets a name resolver that is scoped to the session. Fortunately for us, the sesion object just so happens to also be a NameContext from the session.

Parameters:
pSession - the session NameContext
Returns:
a name resolver

getNameResolver

protected atg.nucleus.NucleusNameResolver getNameResolver(NameContext pNameContext,
                                                          boolean pCreate)

getNameResolverWithNucleusRoot

protected atg.nucleus.NucleusNameResolver getNameResolverWithNucleusRoot(NameContext pNameContext,
                                                                         boolean pCreate)