atg.servlet.pipeline
Class DynamoPipelineServlet

java.lang.Object
  extended by atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
      extended by atg.nucleus.GenericService
          extended by atg.nucleus.TimedOperationService
              extended by atg.servlet.pipeline.PipelineableServletImpl
                  extended by atg.servlet.pipeline.DynamoPipelineServlet
All Implemented Interfaces:
NameContextBindingListener, NameContextElement, NameResolver, AdminableService, ApplicationLogging, atg.nucleus.logging.ApplicationLoggingSender, atg.nucleus.logging.TraceApplicationLogging, VariableArgumentApplicationLogging, ComponentNameResolver, Service, ServiceListener, PipelineableServlet, java.util.EventListener, javax.servlet.Servlet

public class DynamoPipelineServlet
extends PipelineableServletImpl

This servlet performs dynamo specific processing on the request and response object. This includes setting the scrambleKey, exitTrackingHandler, browserTyper, encodeServletPath, the encodeContextPath Mode and the localeToCharsetMapper properties on the DynamoHttpServletRequest. It also optionally changes the name of the current thread to include information about the request if the nameRequestThreads property is true.

After the request has been processed, it sends a DynamoRequestLogEntry event to any listeners on the dataListeners event.


Field Summary
static java.lang.String CLASS_VERSION
          Class version string
protected static java.lang.String SERVICE_REQUEST
          The Performance Monitor operation 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
DynamoPipelineServlet()
          Constructs a new DynamoPipelineServlet
 
Method Summary
 void addDataListener(DataListener pListener)
          Adds a listener to the list of data listeners
 BrowserTyper getBrowserTyper()
          Returns the BrowserTyper property
 int getDataListenerCount()
          Returns the number of data listeners
 DataListener[] getDataListeners()
          Returns the list of data listeners as an array property
 int getEncodeContextPathMode()
          Returns the EncodeContextPathMode property.
 boolean getEncodeServletPath()
          Returns the EncodeServletPath property.
 atg.servlet.exittracking.ExitTrackingHandler getExitTrackingHandler()
          Returns the exit tracking handler
 atg.servlet.LocaleToCharsetMapper getLocaleToCharsetMapper()
          Returns the LocaleToCharsetMapper
 boolean getNameRequestThreads()
           
 atg.servlet.ParameterHandler getParameterHandler()
          Returns the ParameterHandler
 byte[] getScrambleKey()
          Returns the Scramble Key property, used for the "secret key" to weakly encrypt the Dynamo URL Arguments
 boolean getSetupLoopbackTemplateEmailRequests()
          Returns true if we should look for/setup loopback requests made by the template email system.
 UserAuthenticator getUserAuthenticator()
          Returns A user authenticator to be used when running in DAF
 void removeDataListener(DataListener pListener)
          Removes a listener from the list of data listeners
 void sendDataItem(java.lang.Object pDataItem)
          Sends a data item to all of the listeners
 void service(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Services a DynamoHttpServletRequest/Response pair
 void setBrowserTyper(BrowserTyper pBrowserTyper)
          Sets the BrowserTyper property
 void setEncodeContextPathMode(int pEncodeContextPathMode)
          Sets the EncodeContextPathMode property.
 void setEncodeServletPath(boolean pEncodeServletPath)
          Sets the EncodeServletPath property.
 void setExitTrackingHandler(atg.servlet.exittracking.ExitTrackingHandler pExitTrackingHandler)
          Sets the exit tracking handler
 void setLocaleToCharsetMapper(atg.servlet.LocaleToCharsetMapper pMapper)
          Sets the LocaleToCharsetMapper property
 void setNameRequestThreads(boolean pNameRequestThreads)
          Sets the property NameRequestThreads.
 void setParameterHandler(atg.servlet.ParameterHandler pParameterHandler)
          Sets the ParameterHandler property
 void setScrambleKey(byte[] pKey)
          Sets the Scramble Key property, used for the "secret key" to weakly encrypt the Dynamo URL Arguments
 void setSetupLoopbackTemplateEmailRequests(boolean pFlag)
          Sets the flag indicating if we should look for/setup loopback requests made by the template email system.
 void setUserAuthenticator(UserAuthenticator pUserAuthenticator)
          Sets A user authenticator to be used when running in DAF
 
Methods inherited from class atg.servlet.pipeline.PipelineableServletImpl
createAdminServlet, destroy, getAdminServlet, getNextServlet, getServletConfig, getServletInfo, init, isUsePathInfo, passRequest, passRequest, service, service, setNextServlet, setServletInfo, setUsePathInfo
 
Methods inherited from class atg.nucleus.TimedOperationService
getAverageRequestHandlingTime, getHandledRequestCount, getRequestStartTime, getTotalRequestHandlingTime, isKeepingStatistics, notifyHandledRequest, resetStatistics, setKeepingStatistics
 
Methods inherited from class atg.nucleus.GenericService
addLogListener, doStartService, doStopService, getAbsoluteName, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService
 
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
vlogDebug, vlogDebug, vlogDebug, vlogDebug, 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 java.lang.String CLASS_VERSION
Class version string


SERVICE_REQUEST

protected static final java.lang.String SERVICE_REQUEST
The Performance Monitor operation string

See Also:
Constant Field Values
Constructor Detail

DynamoPipelineServlet

public DynamoPipelineServlet()
Constructs a new DynamoPipelineServlet

Method Detail

setUserAuthenticator

public void setUserAuthenticator(UserAuthenticator pUserAuthenticator)
Sets A user authenticator to be used when running in DAF


getUserAuthenticator

public UserAuthenticator getUserAuthenticator()
Returns A user authenticator to be used when running in DAF


setBrowserTyper

public void setBrowserTyper(BrowserTyper pBrowserTyper)
Sets the BrowserTyper property


getBrowserTyper

public BrowserTyper getBrowserTyper()
Returns the BrowserTyper property


setExitTrackingHandler

public void setExitTrackingHandler(atg.servlet.exittracking.ExitTrackingHandler pExitTrackingHandler)
Sets the exit tracking handler


getExitTrackingHandler

public atg.servlet.exittracking.ExitTrackingHandler getExitTrackingHandler()
Returns the exit tracking handler


setScrambleKey

public void setScrambleKey(byte[] pKey)
Sets the Scramble Key property, used for the "secret key" to weakly encrypt the Dynamo URL Arguments


getScrambleKey

public byte[] getScrambleKey()
Returns the Scramble Key property, used for the "secret key" to weakly encrypt the Dynamo URL Arguments


setEncodeServletPath

public void setEncodeServletPath(boolean pEncodeServletPath)
Sets the EncodeServletPath property. This determines whether or not the ServletPath is encoded into URLs encoded with the method: DynamoHttpServletRequest.encodeURL.


getEncodeServletPath

public boolean getEncodeServletPath()
Returns the EncodeServletPath property. This determines whether or not the ServletPath is encoded into URLs encoded with the method: DynamoHttpServletRequest.encodeURL.


setEncodeContextPathMode

public void setEncodeContextPathMode(int pEncodeContextPathMode)
Sets the EncodeContextPathMode property. This determines how the ContextPath is encoded into URLs encoded with the method: DynamoHttpServletRequest.encodeURL (or at least all of the versions which do not take an explicit version of this mode)


getEncodeContextPathMode

public int getEncodeContextPathMode()
Returns the EncodeContextPathMode property.


setNameRequestThreads

public void setNameRequestThreads(boolean pNameRequestThreads)
Sets the property NameRequestThreads. If this is true, we'll name our request threads based on the name of the request that we are processing. This it easier to tell from dumps etc, what requests were being processed at the time.


getNameRequestThreads

public boolean getNameRequestThreads()
Returns:
The value of the property NameRequestThreads.

setLocaleToCharsetMapper

public void setLocaleToCharsetMapper(atg.servlet.LocaleToCharsetMapper pMapper)
Sets the LocaleToCharsetMapper property


getLocaleToCharsetMapper

public atg.servlet.LocaleToCharsetMapper getLocaleToCharsetMapper()
Returns the LocaleToCharsetMapper


setParameterHandler

public void setParameterHandler(atg.servlet.ParameterHandler pParameterHandler)
Sets the ParameterHandler property


getParameterHandler

public atg.servlet.ParameterHandler getParameterHandler()
Returns the ParameterHandler


getSetupLoopbackTemplateEmailRequests

public boolean getSetupLoopbackTemplateEmailRequests()
Returns true if we should look for/setup loopback requests made by the template email system.


setSetupLoopbackTemplateEmailRequests

public void setSetupLoopbackTemplateEmailRequests(boolean pFlag)
Sets the flag indicating if we should look for/setup loopback requests made by the template email system.

This value is only in effect if we are running in another app server, in which case the template email system makes loopback requests to render the email template. Since we cannot store all the relevant state in the request itself, we keep it in the session instead, and copy it over to the request when the request gets to this servlet.

This value is true by default. It can be set to false if you are not using template email, or if you are only using it with DSP templates, rather than JSP templates. (DSP templates can be rendered by the template email system without making loopback requests, even if we are running in another app server.)


sendDataItem

public void sendDataItem(java.lang.Object pDataItem)
Sends a data item to all of the listeners


addDataListener

public void addDataListener(DataListener pListener)
Adds a listener to the list of data listeners


removeDataListener

public void removeDataListener(DataListener pListener)
Removes a listener from the list of data listeners


getDataListeners

public DataListener[] getDataListeners()
Returns the list of data listeners as an array property


getDataListenerCount

public int getDataListenerCount()
Returns the number of data listeners


service

public void service(DynamoHttpServletRequest pRequest,
                    DynamoHttpServletResponse pResponse)
             throws java.io.IOException,
                    javax.servlet.ServletException
Services a DynamoHttpServletRequest/Response pair

Overrides:
service in class PipelineableServletImpl
Throws:
javax.servlet.ServletException - if an error occurred while processing the servlet request
java.io.IOException - if an error occurred while reading or writing the servlet request