public abstract class AbstractProcessor<S> extends Object implements ActionHook, Processor<S>
Modifier and Type | Field and Description |
---|---|
protected Adapter |
adapter |
protected AsyncStateMachine |
asyncStateMachine |
protected AbstractEndpoint<S> |
endpoint |
protected Request |
request |
protected Response |
response |
protected static StringManager |
sm |
protected SocketWrapper<S> |
socketWrapper |
Modifier | Constructor and Description |
---|---|
protected |
AbstractProcessor()
Intended for use by the Upgrade sub-classes that have no need to
initialise the request, response, etc.
|
|
AbstractProcessor(AbstractEndpoint<S> endpoint) |
Modifier and Type | Method and Description |
---|---|
abstract AbstractEndpoint.Handler.SocketState |
asyncDispatch(SocketStatus status)
Process in-progress Servlet 3.0 Async requests.
|
AbstractEndpoint.Handler.SocketState |
asyncPostProcess() |
void |
errorDispatch() |
abstract AbstractEndpoint.Handler.SocketState |
event(SocketStatus status)
Process in-progress Comet requests.
|
Adapter |
getAdapter()
Get the associated adapter.
|
protected AbstractEndpoint<S> |
getEndpoint()
The endpoint receiving connections that are handled by this processor.
|
protected ErrorState |
getErrorState() |
Executor |
getExecutor()
Obtain the Executor used by the underlying endpoint.
|
abstract HttpUpgradeHandler |
getHttpUpgradeHandler() |
protected abstract Log |
getLog() |
Request |
getRequest()
The request associated with this processor.
|
protected SocketWrapper<S> |
getSocketWrapper()
Get the socket wrapper being used.
|
boolean |
isAsync() |
abstract boolean |
isComet() |
abstract boolean |
isUpgrade() |
abstract AbstractEndpoint.Handler.SocketState |
process(SocketWrapper<S> socket)
Process HTTP requests.
|
protected abstract void |
registerForEvent(boolean read,
boolean write)
Register the socket for the specified events.
|
protected void |
resetErrorState() |
void |
setAdapter(Adapter adapter)
Set the associated adapter.
|
protected void |
setErrorState(ErrorState errorState,
Throwable t)
Update the current error state to the new error state if the new error
state is more severe than the current error state.
|
protected void |
setSocketWrapper(SocketWrapper<S> socketWrapper)
Set the socket wrapper being used.
|
abstract AbstractEndpoint.Handler.SocketState |
upgradeDispatch(SocketStatus status)
Processes data received on a connection that has been through an HTTP
upgrade.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
action
recycle, setSslSupport
protected static final StringManager sm
protected Adapter adapter
protected final AsyncStateMachine asyncStateMachine
protected final AbstractEndpoint<S> endpoint
protected final Request request
protected final Response response
protected SocketWrapper<S> socketWrapper
protected AbstractProcessor()
public AbstractProcessor(AbstractEndpoint<S> endpoint)
protected void setErrorState(ErrorState errorState, Throwable t)
protected void resetErrorState()
protected ErrorState getErrorState()
protected AbstractEndpoint<S> getEndpoint()
public Request getRequest()
getRequest
in interface Processor<S>
public void setAdapter(Adapter adapter)
adapter
- the new adapterpublic Adapter getAdapter()
protected final void setSocketWrapper(SocketWrapper<S> socketWrapper)
protected final SocketWrapper<S> getSocketWrapper()
public Executor getExecutor()
getExecutor
in interface Processor<S>
public AbstractEndpoint.Handler.SocketState asyncPostProcess()
asyncPostProcess
in interface Processor<S>
public void errorDispatch()
errorDispatch
in interface Processor<S>
public abstract AbstractEndpoint.Handler.SocketState process(SocketWrapper<S> socket) throws IOException
process
in interface Processor<S>
IOException
public abstract AbstractEndpoint.Handler.SocketState event(SocketStatus status) throws IOException
event
in interface Processor<S>
IOException
public abstract AbstractEndpoint.Handler.SocketState asyncDispatch(SocketStatus status)
asyncDispatch
in interface Processor<S>
public abstract AbstractEndpoint.Handler.SocketState upgradeDispatch(SocketStatus status) throws IOException
upgradeDispatch
in interface Processor<S>
IOException
public abstract HttpUpgradeHandler getHttpUpgradeHandler()
getHttpUpgradeHandler
in interface Processor<S>
protected abstract void registerForEvent(boolean read, boolean write)
read
- Register the socket for read eventswrite
- Register the socket for write eventsprotected abstract Log getLog()
Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.