Apache Tomcat 7.0.21

org.apache.coyote.http11
Class Http11Processor

java.lang.Object
  extended by org.apache.coyote.AbstractProcessor<S>
      extended by org.apache.coyote.http11.AbstractHttp11Processor<Socket>
          extended by org.apache.coyote.http11.Http11Processor
All Implemented Interfaces:
ActionHook, Processor

public class Http11Processor
extends AbstractHttp11Processor<Socket>

Processes HTTP requests.

Author:
Remy Maucherat, fhanik

Field Summary
protected  InternalInputBuffer inputBuffer
          Input.
protected  InternalOutputBuffer outputBuffer
          Output.
protected  SocketWrapper<Socket> socket
          Socket associated with the current connection.
protected  SSLSupport sslSupport
          SSL information.
 
Fields inherited from class org.apache.coyote.http11.AbstractHttp11Processor
comet, compressableMimeTypes, compressionLevel, compressionMinSize, connectionUploadTimeout, contentDelimitation, disableUploadTimeout, error, expectation, hostNameC, http09, http11, keepAlive, keepAliveTimeout, localAddr, localName, localPort, maxKeepAliveRequests, maxSavePostSize, noCompressionUserAgents, remoteAddr, remoteHost, remotePort, restrictedUserAgents, server, sm, socketBuffer
 
Fields inherited from class org.apache.coyote.AbstractProcessor
adapter, asyncStateMachine, endpoint, request, response
 
Constructor Summary
Http11Processor(int headerBufferSize, JIoEndpoint endpoint, int maxTrailerSize)
           
 
Method Summary
 void actionInternal(ActionCode actionCode, Object param)
          Send an action to the connector.
protected  boolean disableKeepAlive()
          Processors (currently only HTTP BIO) may elect to disable HTTP keep-alive in some circumstances.
 AbstractEndpoint.Handler.SocketState event(SocketStatus status)
          Process in-progress Comet requests.
 int getDisableKeepAlivePercentage()
           
protected  AbstractInputBuffer<Socket> getInputBuffer()
          Exposes input buffer to super class to allow better code re-use.
protected  Log getLog()
           
protected  AbstractOutputBuffer<Socket> getOutputBuffer()
          Exposes output buffer to super class to allow better code re-use.
protected  void prepareRequestInternal()
          Connector implementation specific request preparation.
protected  boolean prepareSendfile(OutputFilter[] outputFilters)
           
 AbstractEndpoint.Handler.SocketState process(SocketWrapper<Socket> socketWrapper)
          Process pipelined HTTP requests using the specified input and output streams.
protected  void recycleInternal()
           
protected  void resetTimeouts()
          Provides a mechanism for those connector implementations (currently only NIO) that need to reset timeouts from Async timeouts to standard HTTP timeouts once async processing completes.
 void setDisableKeepAlivePercentage(int disableKeepAlivePercentage)
           
 void setSocketBuffer(int socketBuffer)
          Set the socket buffer flag.
 void setSSLSupport(SSLSupport sslSupport)
          Set the SSL information for this HTTP connection.
 
Methods inherited from class org.apache.coyote.http11.AbstractHttp11Processor
action, addCompressableMimeType, addInputFilter, asyncDispatch, endRequest, findBytes, getCompression, getConnectionUploadTimeout, getDisableUploadTimeout, getKeepAliveTimeout, getMaxKeepAliveRequests, getMaxSavePostSize, getServer, getSocketBuffer, initializeFilters, isComet, parseHost, prepareRequest, recycle, setCompressableMimeTypes, setCompressableMimeTypes, setCompression, setCompressionMinSize, setConnectionUploadTimeout, setDisableUploadTimeout, setKeepAliveTimeout, setMaxKeepAliveRequests, setMaxSavePostSize, setNoCompressionUserAgents, setRestrictedUserAgents, setServer, statusDropsConnection
 
Methods inherited from class org.apache.coyote.AbstractProcessor
asyncPostProcess, getAdapter, getEndpoint, getExecutor, getRequest, isAsync, setAdapter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

inputBuffer

protected InternalInputBuffer inputBuffer
Input.


outputBuffer

protected InternalOutputBuffer outputBuffer
Output.


sslSupport

protected SSLSupport sslSupport
SSL information.


socket

protected SocketWrapper<Socket> socket
Socket associated with the current connection.

Constructor Detail

Http11Processor

public Http11Processor(int headerBufferSize,
                       JIoEndpoint endpoint,
                       int maxTrailerSize)
Method Detail

getLog

protected Log getLog()
Specified by:
getLog in class AbstractHttp11Processor<Socket>

setSSLSupport

public void setSSLSupport(SSLSupport sslSupport)
Set the SSL information for this HTTP connection.


getDisableKeepAlivePercentage

public int getDisableKeepAlivePercentage()

setDisableKeepAlivePercentage

public void setDisableKeepAlivePercentage(int disableKeepAlivePercentage)

process

public AbstractEndpoint.Handler.SocketState process(SocketWrapper<Socket> socketWrapper)
                                             throws IOException
Process pipelined HTTP requests using the specified input and output streams.

Specified by:
process in class AbstractProcessor<Socket>
Parameters:
socketWrapper - Socket from which the HTTP requests will be read and the HTTP responses will be written.
Throws:
IOException - error during an I/O operation

disableKeepAlive

protected boolean disableKeepAlive()
Description copied from class: AbstractHttp11Processor
Processors (currently only HTTP BIO) may elect to disable HTTP keep-alive in some circumstances. This method allows the processor implementation to determine if keep-alive should be disabled or not.

Specified by:
disableKeepAlive in class AbstractHttp11Processor<Socket>

resetTimeouts

protected void resetTimeouts()
Description copied from class: AbstractHttp11Processor
Provides a mechanism for those connector implementations (currently only NIO) that need to reset timeouts from Async timeouts to standard HTTP timeouts once async processing completes.

Specified by:
resetTimeouts in class AbstractHttp11Processor<Socket>

recycleInternal

protected void recycleInternal()
Specified by:
recycleInternal in class AbstractHttp11Processor<Socket>

event

public AbstractEndpoint.Handler.SocketState event(SocketStatus status)
                                           throws IOException
Description copied from class: AbstractProcessor
Process in-progress Comet requests. These will start as HTTP requests.

Specified by:
event in class AbstractProcessor<Socket>
Throws:
IOException

actionInternal

public void actionInternal(ActionCode actionCode,
                           Object param)
Send an action to the connector.

Parameters:
actionCode - Type of the action
param - Action parameter

prepareRequestInternal

protected void prepareRequestInternal()
Description copied from class: AbstractHttp11Processor
Connector implementation specific request preparation. Ideally, this will go away in the future.

Specified by:
prepareRequestInternal in class AbstractHttp11Processor<Socket>

prepareSendfile

protected boolean prepareSendfile(OutputFilter[] outputFilters)

getInputBuffer

protected AbstractInputBuffer<Socket> getInputBuffer()
Description copied from class: AbstractHttp11Processor
Exposes input buffer to super class to allow better code re-use.

Specified by:
getInputBuffer in class AbstractHttp11Processor<Socket>
Returns:
The input buffer used by the processor.

getOutputBuffer

protected AbstractOutputBuffer<Socket> getOutputBuffer()
Description copied from class: AbstractHttp11Processor
Exposes output buffer to super class to allow better code re-use.

Specified by:
getOutputBuffer in class AbstractHttp11Processor<Socket>
Returns:
The output buffer used by the processor.

setSocketBuffer

public void setSocketBuffer(int socketBuffer)
Set the socket buffer flag.

Overrides:
setSocketBuffer in class AbstractHttp11Processor<Socket>

Apache Tomcat 7.0.21

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