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();
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;
/**
- * Request object.
- */
- protected Request request = null;
-
-
- /**
- * Response object.
- */
- protected Response response = null;
-
-
- /**
* AJP packet size.
*/
protected int packetSize;
// --------------------------------------------------------- Public Methods
- /** Get the request associated with this processor.
- *
- * @return The request
- */
- public Request getRequest() {
- return request;
- }
-
-
/**
* Send an action to the connector.
*
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;
/**
- * Request object.
- */
- protected Request request = null;
-
-
- /**
- * Response object.
- */
- protected Response response = null;
-
-
- /**
* Error flag.
*/
protected boolean error = false;
}
- /** Get the request associated with this processor.
- *
- * @return The request
- */
- public Request getRequest() {
- return request;
- }
-
-
/**
* Set the associated adapter.
*