Top Description Fields Constructors Methods
org.apache.coyote

public abstract Class AbstractProcessorLight

extends Object
implements Processor
Class Inheritance
All Implemented Interfaces
org.apache.coyote.Processor
Known Direct Subclasses
org.apache.coyote.http11.upgrade.UpgradeProcessorBase, org.apache.coyote.AbstractProcessor
Imports
java.io.IOException, java.util.Iterator, .Set, java.util.concurrent.CopyOnWriteArraySet, org.apache.juli.logging.Log, org.apache.tomcat.util.net.AbstractEndpoint.Handler.SocketState, .DispatchType, .SocketEvent, .SocketWrapperBase

This is a light-weight abstract processor implementation that is intended as a basis for all Processor implementations from the light-weight upgrade processors to the HTTP/AJP processors.

Field Summary

Modifier and TypeField and Description
private Set<DispatchType>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
addDispatch(DispatchType dispatchType)

protected abstract AbstractEndpoint.Handler.SocketState
private AbstractEndpoint.Handler.SocketState
protected void
protected abstract AbstractEndpoint.Handler.SocketState

Returns:

The state the caller should put the socket in when this method returns
dispatch
(SocketEvent
The event to process
status
)

Process an in-progress request that is not longer in standard HTTP mode.

public Iterator<DispatchType>
protected abstract Log
protected void
logAccess(SocketWrapperBase<?>
The connection to process
socketWrapper
)

Add an entry to the access log for a failed connection attempt.

public AbstractEndpoint.Handler.SocketState
process(SocketWrapperBase<?>
The connection to process
socketWrapper
,
SocketEvent
The status of the connection that triggered this additional processing
status
)

Implements org.apache.coyote.Processor.process.

Process a connection.

protected abstract AbstractEndpoint.Handler.SocketState

Returns:

The state the caller should put the socket in when this method returns
service
(SocketWrapperBase<?>
The connection to process
socketWrapper
)

Service a 'standard' HTTP request.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

dispatchesback to summary
private Set<DispatchType> dispatches

Constructor Detail

AbstractProcessorLightback to summary
public AbstractProcessorLight()

Method Detail

addDispatchback to summary
public void addDispatch(DispatchType dispatchType)
asyncPostProcessback to summary
protected abstract AbstractEndpoint.Handler.SocketState asyncPostProcess()
checkForPipelinedDataback to summary
private AbstractEndpoint.Handler.SocketState checkForPipelinedData(AbstractEndpoint.Handler.SocketState inState, SocketWrapperBase<?> socketWrapper) throws IOException
clearDispatchesback to summary
protected void clearDispatches()
dispatchback to summary
protected abstract AbstractEndpoint.Handler.SocketState dispatch(SocketEvent status) throws IOException

Process an in-progress request that is not longer in standard HTTP mode. Uses currently include Servlet 3.0 Async and HTTP upgrade connections. Further uses may be added in the future. These will typically start as HTTP requests.

Parameters
status:SocketEvent

The event to process

Returns:AbstractEndpoint.Handler.SocketState

The state the caller should put the socket in when this method returns

Exceptions
IOException:
If an I/O error occurs during the processing of the request
getIteratorAndClearDispatchesback to summary
public Iterator<DispatchType> getIteratorAndClearDispatches()
getLogback to summary
protected abstract Log getLog()
logAccessback to summary
protected void logAccess(SocketWrapperBase<?> socketWrapper) throws IOException

Add an entry to the access log for a failed connection attempt.

Parameters
socketWrapper:SocketWrapperBase<?>

The connection to process

Exceptions
IOException:
If an I/O error occurs during the processing of the request
processback to summary
public AbstractEndpoint.Handler.SocketState process(SocketWrapperBase<?> socketWrapper, SocketEvent status) throws IOException

Implements org.apache.coyote.Processor.process.

Doc from org.apache.coyote.Processor.process.

Process a connection. This is called whenever an event occurs (e.g. more data arrives) that allows processing to continue for a connection that is not currently being processed.

Parameters
socketWrapper:SocketWrapperBase<?>

The connection to process

status:SocketEvent

The status of the connection that triggered this additional processing

Returns:AbstractEndpoint.Handler.SocketState

The state the caller should put the socket in when this method returns

Annotations
@Override
Exceptions
IOException:
If an I/O error occurs during the processing of the request
serviceback to summary
protected abstract AbstractEndpoint.Handler.SocketState service(SocketWrapperBase<?> socketWrapper) throws IOException

Service a 'standard' HTTP request. This method is called for both new requests and for requests that have partially read the HTTP request line or HTTP headers. Once the headers have been fully read this method is not called again until there is a new HTTP request to process. Note that the request type may change during processing which may result in one or more calls to dispatch(SocketEvent). Requests may be pipe-lined.

Parameters
socketWrapper:SocketWrapperBase<?>

The connection to process

Returns:AbstractEndpoint.Handler.SocketState

The state the caller should put the socket in when this method returns

Exceptions
IOException:
If an I/O error occurs during the processing of the request