Apache Tomcat 7.0.42

## org.apache.coyote.http11
Class Http11NioProcessor

    java.lang.Object
      org.apache.coyote.AbstractProcessor<S>
          org.apache.coyote.http11.AbstractHttp11Processor<NioChannel>
              org.apache.coyote.http11.Http11NioProcessor

All Implemented Interfaces:
  ActionHook, Processor<NioChannel>

    public class Http11NioProcessor

extends AbstractHttp11Processor<NioChannel>

Processes HTTP requests.

Author:
  Remy Maucherat, Filip Hanik

Field Summary
`protected InternalNioInputBuffer` `inputBuffer` Input.
`protected InternalNioOutputBuffer` `outputBuffer` Output.
`protected NioEndpoint.SendfileData` `sendfileData` Sendfile data.
`protected SocketWrapper<NioChannel>` `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, keptAlive, localAddr, localName, localPort, maxKeepAliveRequests, maxSavePostSize, noCompressionUserAgents, openSocket, readComplete, remoteAddr, remoteHost, remotePort, restrictedUserAgents, sendfileInProgress, server, sm, socketBuffer, upgradeInbound`

Fields inherited from class org.apache.coyote.AbstractProcessor
`adapter, asyncStateMachine, endpoint, request, response`

Constructor Summary
`Http11NioProcessor(int maxHttpHeaderSize, NioEndpoint endpoint, int maxTrailerSize)`

Method Summary
`void` `actionInternal(ActionCode actionCode, Object param)` Send an action to the connector.
`protected boolean` `breakKeepAliveLoop(SocketWrapper<NioChannel> socketWrapper)` Checks to see if the keep-alive loop should be broken, performing any processing (e.g. sendfile handling) that may have an impact on whether or not the keep-alive loop should be broken.
`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 pipelined HTTP requests using the specified input and output streams.
`protected AbstractInputBuffer<NioChannel>` `getInputBuffer()` Exposes input buffer to super class to allow better code re-use.
`protected Log` `getLog()`
`protected AbstractOutputBuffer<NioChannel>` `getOutputBuffer()` Exposes output buffer to super class to allow better code re-use.
`protected boolean` `handleIncompleteRequestLineRead()` Defines how a connector handles an incomplete request line read.
`protected void` `prepareRequestInternal()` Connector implementation specific request preparation.
`protected boolean` `prepareSendfile(OutputFilter[] outputFilters)`
`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.
`protected void` `setCometTimeouts(SocketWrapper<NioChannel> socketWrapper)` Provides a mechanism for those connectors (currently only NIO) that need that need to set comet timeouts.
`protected void` `setRequestLineReadTimeout()` Configures the timeout to be used for reading the request line.
`protected void` `setSocketTimeout(int timeout)` Set the socket timeout.
`protected void` `setSocketWrapper(SocketWrapper<NioChannel> socketWrapper)` Allows the super class to set the socket wrapper being used.
`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, getUpgradeInbound, initializeFilters, isComet, isUpgrade, parseHost, prepareRequest, process, recycle, setCompressableMimeTypes, setCompressableMimeTypes, setCompression, setCompressionMinSize, setConnectionUploadTimeout, setDisableUploadTimeout, setKeepAliveTimeout, setMaxKeepAliveRequests, setMaxSavePostSize, setNoCompressionUserAgents, setRestrictedUserAgents, setServer, setSocketBuffer, statusDropsConnection, upgradeDispatch`

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

### sslSupport

    protected SSLSupport sslSupport

  SSL information.

### inputBuffer

    protected InternalNioInputBuffer inputBuffer

  Input.

### outputBuffer

    protected InternalNioOutputBuffer outputBuffer

  Output.

### sendfileData

    protected NioEndpoint.SendfileData sendfileData

  Sendfile data.

### socket

    protected SocketWrapper<NioChannel> socket

  Socket associated with the current connection.

Constructor Detail

### Http11NioProcessor

    public Http11NioProcessor(int maxHttpHeaderSize,
                              NioEndpoint endpoint,
                              int maxTrailerSize)

Method Detail

### getLog

    protected Log getLog()

  Specified by:
    `getLog` in class `AbstractHttp11Processor<NioChannel>`

### event

    public AbstractEndpoint.Handler.SocketState event(SocketStatus status)
                                               throws IOException

  Process pipelined HTTP requests using the specified input and output streams.

  Specified by:
    `event` in interface `Processor<NioChannel>`
  Specified by:
    `event` in class `AbstractProcessor<NioChannel>`
  Throws:
    `IOException` - error during an I/O operation

### 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<NioChannel>`

### 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<NioChannel>`

### setRequestLineReadTimeout

    protected void setRequestLineReadTimeout()
                                      throws IOException

  Description copied from class: `AbstractHttp11Processor`
  Configures the timeout to be used for reading the request line.

  Specified by:
    `setRequestLineReadTimeout` in class `AbstractHttp11Processor<NioChannel>`
  Throws:
    `IOException`

### handleIncompleteRequestLineRead

    protected boolean handleIncompleteRequestLineRead()

  Description copied from class: `AbstractHttp11Processor`
  Defines how a connector handles an incomplete request line read.

  Specified by:
    `handleIncompleteRequestLineRead` in class `AbstractHttp11Processor<NioChannel>`
  Returns:
    `true` if the processor should break out of the processing loop, otherwise `false`.

### setSocketTimeout

    protected void setSocketTimeout(int timeout)
                             throws IOException

  Description copied from class: `AbstractHttp11Processor`
  Set the socket timeout.

  Specified by:
    `setSocketTimeout` in class `AbstractHttp11Processor<NioChannel>`
  Throws:
    `IOException`

### setCometTimeouts

    protected void setCometTimeouts(SocketWrapper<NioChannel> socketWrapper)

  Description copied from class: `AbstractHttp11Processor`
  Provides a mechanism for those connectors (currently only NIO) that need that need to set comet timeouts.

  Specified by:
    `setCometTimeouts` in class `AbstractHttp11Processor<NioChannel>`

### breakKeepAliveLoop

    protected boolean breakKeepAliveLoop(SocketWrapper<NioChannel> socketWrapper)

  Description copied from class: `AbstractHttp11Processor`
  Checks to see if the keep-alive loop should be broken, performing any processing (e.g. sendfile handling) that may have an impact on whether or not the keep-alive loop should be broken.

  Specified by:
    `breakKeepAliveLoop` in class `AbstractHttp11Processor<NioChannel>`
  Returns:
    true if the keep-alive loop should be broken

### recycleInternal

    public void recycleInternal()

  Specified by:
    `recycleInternal` in class `AbstractHttp11Processor<NioChannel>`

### 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<NioChannel>`

### prepareSendfile

    protected boolean prepareSendfile(OutputFilter[] outputFilters)

### setSocketWrapper

    protected void setSocketWrapper(SocketWrapper<NioChannel> socketWrapper)

  Description copied from class: `AbstractHttp11Processor`
  Allows the super class to set the socket wrapper being used.

  Specified by:
    `setSocketWrapper` in class `AbstractHttp11Processor<NioChannel>`

### getInputBuffer

    protected AbstractInputBuffer<NioChannel> getInputBuffer()

  Description copied from class: `AbstractHttp11Processor`
  Exposes input buffer to super class to allow better code re-use.

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

### getOutputBuffer

    protected AbstractOutputBuffer<NioChannel> getOutputBuffer()

  Description copied from class: `AbstractHttp11Processor`
  Exposes output buffer to super class to allow better code re-use.

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

### setSslSupport

    public void setSslSupport(SSLSupport sslSupport)

  Set the SSL information for this HTTP connection.

Apache Tomcat 7.0.42

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