Author: markt Date: Sun Jun 5 13:16:02 2011 New Revision: 1132397 URL: http://svn.apache.org/viewvc?rev=1132397&view=rev Log: Pull up the request and response objects since they are common between AJP and HTTP
Modified: tomcat/trunk/java/org/apache/coyote/AbstractProcessor.java tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java Modified: tomcat/trunk/java/org/apache/coyote/AbstractProcessor.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/AbstractProcessor.java?rev=1132397&r1=1132396&r2=1132397&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/coyote/AbstractProcessor.java (original) +++ tomcat/trunk/java/org/apache/coyote/AbstractProcessor.java Sun Jun 5 13:16:02 2011 @@ -20,14 +20,43 @@ import java.util.concurrent.Executor; import org.apache.tomcat.util.net.AbstractEndpoint; +/** + * Provides attributes common to all support protocols (currently HTTP and AJP). + * TODO: There are more attributes that can be pulled up + */ public abstract class AbstractProcessor implements ActionHook, Processor { + /** + * The endpoint receiving connections that are handled by this processor. + */ protected AbstractEndpoint endpoint; - protected AbstractEndpoint getEndpoint() { return endpoint; } - + + + /** + * The request associated with this processor. + */ + protected Request request = null; + public Request getRequest() { + return request; + } + + + /** + * The response associated with this processor. + */ + protected Response response = null; + + + /* + * Expose selected endpoint attributes through the processor + */ + + /** + * Obtain the Executor used by the underlying endpoint. + */ @Override public Executor getExecutor() { return endpoint.getExecutor(); Modified: tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java?rev=1132397&r1=1132396&r2=1132397&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java (original) +++ tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java Sun Jun 5 13:16:02 2011 @@ -32,7 +32,6 @@ import org.apache.coyote.AsyncContextCal import org.apache.coyote.AsyncStateMachine; import org.apache.coyote.InputBuffer; import org.apache.coyote.Request; -import org.apache.coyote.Response; import org.apache.juli.logging.Log; import org.apache.tomcat.util.buf.ByteChunk; import org.apache.tomcat.util.buf.HexUtils; @@ -66,18 +65,6 @@ public abstract class AbstractAjpProcess /** - * Request object. - */ - protected Request request = null; - - - /** - * Response object. - */ - protected Response response = null; - - - /** * AJP packet size. */ protected int packetSize; @@ -223,15 +210,6 @@ public abstract class AbstractAjpProcess // --------------------------------------------------------- Public Methods - /** Get the request associated with this processor. - * - * @return The request - */ - public Request getRequest() { - return request; - } - - /** * Send an action to the connector. * Modified: tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java?rev=1132397&r1=1132396&r2=1132397&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java (original) +++ tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java Sun Jun 5 13:16:02 2011 @@ -26,8 +26,6 @@ import org.apache.coyote.ActionCode; import org.apache.coyote.Adapter; import org.apache.coyote.AsyncContextCallback; import org.apache.coyote.AsyncStateMachine; -import org.apache.coyote.Request; -import org.apache.coyote.Response; import org.apache.coyote.http11.filters.BufferedInputFilter; import org.apache.coyote.http11.filters.ChunkedInputFilter; import org.apache.coyote.http11.filters.ChunkedOutputFilter; @@ -71,18 +69,6 @@ public abstract class AbstractHttp11Proc /** - * Request object. - */ - protected Request request = null; - - - /** - * Response object. - */ - protected Response response = null; - - - /** * Error flag. */ protected boolean error = false; @@ -507,15 +493,6 @@ public abstract class AbstractHttp11Proc } - /** Get the request associated with this processor. - * - * @return The request - */ - public Request getRequest() { - return request; - } - - /** * Set the associated adapter. * --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org