atg.servlet.pipeline
Class PipelineableServletImpl

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
All Implemented Interfaces:
NameContextBindingListener, NameContextElement, NameResolver, AdminableService, ApplicationLogging, atg.nucleus.logging.ApplicationLoggingSender, atg.nucleus.logging.TraceApplicationLogging, atg.nucleus.logging.VariableArgumentApplicationLogging, ComponentNameResolver, Service, ServiceListener, PipelineableServlet, java.util.EventListener, javax.servlet.Servlet
Direct Known Subclasses:
AccessControlServlet, BasicAuthenticationPipelineServlet, CookiePipelineServlet, DispatcherPipelineServletImpl, DropletEventServlet, DynamoPipelineServlet, FileFinderPipelineServlet, FormLoginPipelineServlet, HeadPipelineServlet, InsertableServletImpl, MimeTyperPipelineServlet, ServletPathPipelineServlet, SessionPipelineServlet, ThreadUserBinderServlet, URLArgumentPipelineServlet

public class PipelineableServletImpl
extends TimedOperationService
implements PipelineableServlet, javax.servlet.Servlet, AdminableService

A PipelineableServletImpl is an implementation of a PipelineableServlet that also implements Servlet.

See Also:
PipelineableServlet

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
PipelineableServletImpl()
           
 
Method Summary
protected  javax.servlet.Servlet createAdminServlet()
          Creates and returns a new Servlet that will administer this service.
 void destroy()
          Called when the servlet is to be destroyed
 javax.servlet.Servlet getAdminServlet()
          Returns the Servlet that will handle requests directed at this service.
 javax.servlet.Servlet getNextServlet()
          Returns the next Servlet in the pipeline, null if this is the end of the pipeline.
 javax.servlet.ServletConfig getServletConfig()
          Returns the configuration for this Servlet
 java.lang.String getServletInfo()
          Returns the information string for this servlet
 void init(javax.servlet.ServletConfig pConfig)
          Initializes this Servlet with the specified configuration
 boolean isUsePathInfo()
          Returns the kind of path getting
 void passRequest(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Passes the specified request on to the next servlet in the pipeline
 void passRequest(javax.servlet.ServletRequest pRequest, javax.servlet.ServletResponse pResponse)
          Passes the specified request on to the next servlet in the pipeline
 void service(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Services a DynamoHttpServletRequest/Response pair
 void service(javax.servlet.http.HttpServletRequest pRequest, javax.servlet.http.HttpServletResponse pResponse)
          Services an HttpServletRequest/Response pair
 void service(javax.servlet.ServletRequest pRequest, javax.servlet.ServletResponse pResponse)
          If the request is an instanceof HttpServletRequest, then the service method is passed onto the service handler for the HttpServletRequest object.
 void setNextServlet(javax.servlet.Servlet pNextServlet)
          Sets the next Servlet in the pipeline, null if this is the end of the pipeline.
 void setServletInfo(java.lang.String pServletInfo)
          Sets the information string for this servlet
 void setUsePathInfo(boolean usePathInfo)
          Sets the kind of path getting
 
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

Constructor Detail

PipelineableServletImpl

public PipelineableServletImpl()
Method Detail

setNextServlet

public void setNextServlet(javax.servlet.Servlet pNextServlet)
Sets the next Servlet in the pipeline, null if this is the end of the pipeline.

Specified by:
setNextServlet in interface PipelineableServlet

getNextServlet

public javax.servlet.Servlet getNextServlet()
Returns the next Servlet in the pipeline, null if this is the end of the pipeline.

Specified by:
getNextServlet in interface PipelineableServlet

isUsePathInfo

public boolean isUsePathInfo()
Returns the kind of path getting


setUsePathInfo

public void setUsePathInfo(boolean usePathInfo)
Sets the kind of path getting


passRequest

public void passRequest(DynamoHttpServletRequest pRequest,
                        DynamoHttpServletResponse pResponse)
                 throws java.io.IOException,
                        javax.servlet.ServletException
Passes the specified request on to the next servlet in the pipeline

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

passRequest

public void passRequest(javax.servlet.ServletRequest pRequest,
                        javax.servlet.ServletResponse pResponse)
                 throws java.io.IOException,
                        javax.servlet.ServletException
Passes the specified request on to the next servlet in the pipeline

Specified by:
passRequest in interface PipelineableServlet
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

init

public void init(javax.servlet.ServletConfig pConfig)
          throws javax.servlet.ServletException
Initializes this Servlet with the specified configuration

Specified by:
init in interface javax.servlet.Servlet
Throws:
javax.servlet.ServletException - if there was a problem initializing the Servlet

getServletConfig

public javax.servlet.ServletConfig getServletConfig()
Returns the configuration for this Servlet

Specified by:
getServletConfig in interface javax.servlet.Servlet

getServletInfo

public java.lang.String getServletInfo()
Returns the information string for this servlet

Specified by:
getServletInfo in interface javax.servlet.Servlet

setServletInfo

public void setServletInfo(java.lang.String pServletInfo)
Sets the information string for this servlet


destroy

public void destroy()
Called when the servlet is to be destroyed

Specified by:
destroy in interface javax.servlet.Servlet

service

public void service(javax.servlet.ServletRequest pRequest,
                    javax.servlet.ServletResponse pResponse)
             throws java.io.IOException,
                    javax.servlet.ServletException
If the request is an instanceof HttpServletRequest, then the service method is passed onto the service handler for the HttpServletRequest object. Otherwise passes the request to the next servlet in the pipeline.

Specified by:
service in interface javax.servlet.Servlet
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

service

public void service(javax.servlet.http.HttpServletRequest pRequest,
                    javax.servlet.http.HttpServletResponse pResponse)
             throws java.io.IOException,
                    javax.servlet.ServletException
Services an HttpServletRequest/Response pair

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

service

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

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

getAdminServlet

public javax.servlet.Servlet getAdminServlet()
Returns the Servlet that will handle requests directed at this service. This will first check to see if the servlet is already created, and if not it will create it by calling createAdminServlet.

Specified by:
getAdminServlet in interface AdminableService
Overrides:
getAdminServlet in class GenericService
See Also:
createAdminServlet()

createAdminServlet

protected javax.servlet.Servlet createAdminServlet()
Creates and returns a new Servlet that will administer this service. By default, this creates a ServiceAdminServlet, but subclasses may create their own servlets.

Overrides:
createAdminServlet in class GenericService