public abstract class AbstractProcessor extends AbstractProcessorLight implements ActionHook
Modifier and Type | Field and Description |
---|---|
protected Adapter |
adapter |
protected AsyncStateMachine |
asyncStateMachine |
protected AbstractEndpoint<?> |
endpoint |
protected Request |
request |
protected Response |
response |
protected SocketWrapperBase<?> |
socketWrapper |
protected SSLSupport |
sslSupport |
Modifier | Constructor and Description |
---|---|
|
AbstractProcessor(AbstractEndpoint<?> endpoint) |
protected |
AbstractProcessor(Request coyoteRequest,
Response coyoteResponse)
Used by HTTP/2.
|
Modifier and Type | Method and Description |
---|---|
AbstractEndpoint.Handler.SocketState |
asyncPostProcess() |
AbstractEndpoint.Handler.SocketState |
dispatch(SocketEvent status)
Process an in-progress request that is not longer in standard HTTP mode.
|
protected abstract AbstractEndpoint.Handler.SocketState |
dispatchEndRequest()
Perform any necessary clean-up processing if the dispatch resulted in the
completion of processing for the current request.
|
protected void |
dispatchNonBlockingRead()
Perform any necessary processing for a non-blocking read before
dispatching to the adapter.
|
protected abstract boolean |
flushBufferedWrite()
Flush any pending writes.
|
Adapter |
getAdapter()
Get the associated adapter.
|
long |
getAsyncTimeout() |
protected ErrorState |
getErrorState() |
protected Executor |
getExecutor() |
Request |
getRequest() |
protected SocketWrapperBase<?> |
getSocketWrapper() |
boolean |
isAsync() |
void |
recycle()
Recycle the processor, ready for the next request which may be on the
same connection or a different connection.
|
void |
setAdapter(Adapter adapter)
Set the associated adapter.
|
void |
setAsyncTimeout(long timeout) |
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(SocketWrapperBase<?> socketWrapper)
Set the socket wrapper being used.
|
void |
setSslSupport(SSLSupport sslSupport)
Set the SSL information for this HTTP connection.
|
void |
timeoutAsync(long now)
Check this processor to see if the async timeout has expired and process
a timeout if that is that case.
|
addDispatch, clearDispatches, getIteratorAndClearDispatches, getLog, process, service
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
action
getLeftoverInput, getUpgradeToken, isUpgrade, pause
protected Adapter adapter
protected final AsyncStateMachine asyncStateMachine
protected final AbstractEndpoint<?> endpoint
protected final Request request
protected final Response response
protected volatile SocketWrapperBase<?> socketWrapper
protected volatile SSLSupport sslSupport
protected AbstractProcessor(Request coyoteRequest, Response coyoteResponse)
coyoteRequest
- The requestcoyoteResponse
- The responsepublic AbstractProcessor(AbstractEndpoint<?> endpoint)
protected void setErrorState(ErrorState errorState, Throwable t)
errorState
- The error status detailst
- The error which occurredprotected ErrorState getErrorState()
public Request getRequest()
getRequest
in interface Processor
public void setAdapter(Adapter adapter)
adapter
- the new adapterpublic Adapter getAdapter()
protected final void setSocketWrapper(SocketWrapperBase<?> socketWrapper)
socketWrapper
- The socket wrapperprotected final SocketWrapperBase<?> getSocketWrapper()
public final void setSslSupport(SSLSupport sslSupport)
Processor
setSslSupport
in interface Processor
sslSupport
- The SSL support object to use for this connectionprotected Executor getExecutor()
public AbstractEndpoint.Handler.SocketState asyncPostProcess()
asyncPostProcess
in class AbstractProcessorLight
public final AbstractEndpoint.Handler.SocketState dispatch(SocketEvent status)
AbstractProcessorLight
dispatch
in class AbstractProcessorLight
status
- The event to processprotected void dispatchNonBlockingRead()
public void timeoutAsync(long now)
Processor
timeoutAsync
in interface Processor
now
- The time (as returned by System.currentTimeMillis()
to
use as the current time to determine whether the async timeout
has expired. If negative, the timeout will always be treated
as if it has expired.public void setAsyncTimeout(long timeout)
public long getAsyncTimeout()
public void recycle()
Processor
protected abstract boolean flushBufferedWrite() throws IOException
true
if data remains to be flushed at the end of
methodIOException
- If an I/O error occurs while attempting to flush the
dataprotected abstract AbstractEndpoint.Handler.SocketState dispatchEndRequest()
Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.