You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by re...@apache.org on 2003/03/08 18:35:55 UTC

cvs commit: jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/memory MemoryProtocolHandler.java

remm        2003/03/08 09:35:55

  Modified:    coyote/src/java/org/apache/coyote/memory
                        MemoryProtocolHandler.java
  Log:
  - Add static hook to retrieve the protocol handler which can be used
    to generate requests. It's too complex to retrieve the protocol handler
    otherwise.
  
  Revision  Changes    Path
  1.2       +12 -0     jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/memory/MemoryProtocolHandler.java
  
  Index: MemoryProtocolHandler.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/memory/MemoryProtocolHandler.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- MemoryProtocolHandler.java	14 Jan 2003 23:08:09 -0000	1.1
  +++ MemoryProtocolHandler.java	8 Mar 2003 17:35:55 -0000	1.2
  @@ -112,6 +112,16 @@
       }
   
   
  +    /**
  +     * Hook to easily retrieve the protocol handler.
  +     */
  +    protected static MemoryProtocolHandler protocolHandler = null;
  +
  +    public static MemoryProtocolHandler getProtocolHandler() {
  +        return protocolHandler;
  +    }
  +
  +
       // ------------------------------------------------ ProtocolHandler Methods
   
   
  @@ -120,6 +130,7 @@
        */
       public void init()
           throws Exception {
  +        protocolHandler = this;
       }
   
   
  @@ -133,6 +144,7 @@
   
       public void destroy()
           throws Exception {
  +        protocolHandler = null;
       }
   
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org