Save This Page
Home » apache-tomcat-6.0.26-src » org.apache » coyote » tomcat4 » [javadoc | source]
org.apache.coyote.tomcat4
final class: CoyoteAdapter [javadoc | source]
java.lang.Object
   org.apache.coyote.tomcat4.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     
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.tomcat4.CoyoteAdapter Summary:
convertURI,   copyBytes,   log,   log,   normalize,   parseCookies,   parseSessionId,   postParseRequest,   service,   validate
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.coyote.tomcat4.CoyoteAdapter Detail:
 protected  void convertURI(MessageBytes uri,
    CoyoteRequest request) throws Exception 
    Character conversion of the URI.
 protected static  void copyBytes(byte[] b,
    int dest,
    int src,
    int len) 
    Copy an array of bytes to a different position. Used during normalization.
 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  void parseCookies(Request req,
    CoyoteRequest request) 
    Parse cookies.
 protected  void parseSessionId(Request req,
    CoyoteRequest request) 
    Parse session id in URL. FIXME: Optimize this.
 protected  void 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.
 protected static String validate(String path) 
    Return a context-relative path, beginning with a "/", that represents the canonical version of the specified path after ".." and "." elements are resolved out. If the specified path attempts to go outside the boundaries of the current context (i.e. too many ".." path elements are present), return null instead. This code is not optimized, and is only needed for Tomcat 4.0.x.