Save This Page
Home » apache-tomcat-6.0.26-src » org.apache » coyote » tomcat5 » [javadoc | source]
org.apache.coyote.tomcat5
public class: CoyoteAdapter [javadoc | source]
java.lang.Object
   org.apache.coyote.tomcat5.CoyoteAdapter

All Implemented Interfaces:
    Adapter

Implementation of a request processor which delegates the processing to a Coyote processor.
Field Summary
public static final  int ADAPTER_NOTES     
static final  String JVM_ROUTE     
protected static final  boolean ALLOW_BACKSLASH     
protected  StringManager sm    The string manager for this package. 
Constructor:
 public CoyoteAdapter(CoyoteConnector connector) 
    Construct a new CoyoteProcessor associated with the specified connector.
    Parameters:
    connector - CoyoteConnector that owns this processor
    id - Identifier of this CoyoteProcessor (unique per connector)
Method from org.apache.coyote.tomcat5.CoyoteAdapter Summary:
afterService,   copyBytes,   fireAdapterEvent,   isCompatWithTomcat,   log,   log,   normalize,   postParseRequest,   service,   setCompatWithTomcat
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.coyote.tomcat5.CoyoteAdapter Detail:
 public  void afterService(Request req,
    Response res) throws Exception 
    Finish the response and close the connection based on the connection header.
 protected static  void copyBytes(byte[] b,
    int dest,
    int src,
    int len) 
    Copy an array of bytes to a different position. Used during normalization.
 public  void fireAdapterEvent(String type,
    Object data) 
    Notify all container event listeners that a particular event has occurred for this Adapter. The default implementation performs this notification synchronously using the calling thread.
 public boolean isCompatWithTomcat() 
    Return true when an instance is executed the same way it does in Tomcat.
 protected  void log(String message) 
    Log a message on the Logger associated with our Container (if any)
 protected  void log(String message,
    Throwable throwable) 
    Log a message on the Logger associated with our Container (if any)
 public static boolean normalize(MessageBytes uriMB) 
    Normalize URI.

    This method normalizes "\", "//", "/./" and "/../". This method will return false when trying to go above the root, or if the URI contains a null byte.

 protected boolean postParseRequest(Request req,
    CoyoteRequest request,
    Response res,
    CoyoteResponse response) throws Exception 
    Parse additional request parameters.
 public  void service(Request req,
    Response res) throws Exception 
    Service method.
 public  void setCompatWithTomcat(boolean compatWithTomcat) 
    true if this class needs to be compatible with Tomcat Adapter class. Since Tomcat Adapter implementation doesn't support the afterService method, the afterService method must be invoked inside the service method.