Apache Tomcat 7.0.25

org.apache.coyote
Class AbstractProcessor<S>

java.lang.Object
  extended by org.apache.coyote.AbstractProcessor<S>
All Implemented Interfaces:
ActionHook, Processor
Direct Known Subclasses:
AbstractAjpProcessor, AbstractHttp11Processor

public abstract class AbstractProcessor<S>
extends java.lang.Object
implements ActionHook, Processor

Provides functionality and attributes common to all supported protocols (currently HTTP and AJP).


Field Summary
protected  Adapter adapter
           
protected  AsyncStateMachine asyncStateMachine
           
protected  AbstractEndpoint endpoint
           
protected  Request request
           
protected  Response response
           
 
Constructor Summary
AbstractProcessor(AbstractEndpoint endpoint)
           
 
Method Summary
abstract  AbstractEndpoint.Handler.SocketState asyncDispatch(SocketStatus status)
          Process in-progress Servlet 3.0 Async requests.
 AbstractEndpoint.Handler.SocketState asyncPostProcess()
           
abstract  AbstractEndpoint.Handler.SocketState event(SocketStatus status)
          Process in-progress Comet requests.
 Adapter getAdapter()
          Get the associated adapter.
protected  AbstractEndpoint getEndpoint()
          The endpoint receiving connections that are handled by this processor.
 java.util.concurrent.Executor getExecutor()
          Obtain the Executor used by the underlying endpoint.
 Request getRequest()
          The request associated with this processor.
 boolean isAsync()
           
protected abstract  boolean isComet()
           
abstract  AbstractEndpoint.Handler.SocketState process(SocketWrapper<S> socket)
          Process HTTP requests.
 void setAdapter(Adapter adapter)
          Set the associated adapter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.coyote.ActionHook
action
 

Field Detail

adapter

protected Adapter adapter

asyncStateMachine

protected final AsyncStateMachine asyncStateMachine

endpoint

protected final AbstractEndpoint endpoint

request

protected final Request request

response

protected final Response response
Constructor Detail

AbstractProcessor

public AbstractProcessor(AbstractEndpoint endpoint)
Method Detail

getEndpoint

protected AbstractEndpoint getEndpoint()
The endpoint receiving connections that are handled by this processor.


getRequest

public Request getRequest()
The request associated with this processor.


setAdapter

public void setAdapter(Adapter adapter)
Set the associated adapter.

Parameters:
adapter - the new adapter

getAdapter

public Adapter getAdapter()
Get the associated adapter.

Returns:
the associated adapter

getExecutor

public java.util.concurrent.Executor getExecutor()
Obtain the Executor used by the underlying endpoint.

Specified by:
getExecutor in interface Processor

isAsync

public boolean isAsync()

asyncPostProcess

public AbstractEndpoint.Handler.SocketState asyncPostProcess()

isComet

protected abstract boolean isComet()

process

public abstract AbstractEndpoint.Handler.SocketState process(SocketWrapper<S> socket)
                                                      throws java.io.IOException
Process HTTP requests. All requests are treated as HTTP requests to start with although they may change type during processing.

Throws:
java.io.IOException

event

public abstract AbstractEndpoint.Handler.SocketState event(SocketStatus status)
                                                    throws java.io.IOException
Process in-progress Comet requests. These will start as HTTP requests.

Throws:
java.io.IOException

asyncDispatch

public abstract AbstractEndpoint.Handler.SocketState asyncDispatch(SocketStatus status)
Process in-progress Servlet 3.0 Async requests. These will start as HTTP requests.


Apache Tomcat 7.0.25

Copyright © 2000-2012 Apache Software Foundation. All Rights Reserved.