Overview | Package | Class | Tree | Deprecated | Index | Help
| Apache Tomcat 7.0.29
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.coyote.ajp
Class AjpNioProcessor

    java.lang.Object
      org.apache.coyote.AbstractProcessor<S>
          org.apache.coyote.ajp.AbstractAjpProcessor<NioChannel>
              org.apache.coyote.ajp.AjpNioProcessor

All Implemented Interfaces:
  ActionHook, Processor<NioChannel>

    public class AjpNioProcessor

extends AbstractAjpProcessor<NioChannel>

Processes AJP requests using NIO.

Nested Class Summary

Nested classes/interfaces inherited from class org.apache.coyote.ajp.AbstractAjpProcessor
`AbstractAjpProcessor.SocketInputBuffer, AbstractAjpProcessor.SocketOutputBuffer`

Field Summary
`protected NioSelectorPool` | `pool` Selector pool for the associated endpoint.
`protected NioChannel` | `socket` Socket associated with the current connection.

Fields inherited from class org.apache.coyote.ajp.AbstractAjpProcessor
`bodyBytes, bodyMessage, bytesWritten, certificates, clientCertProvider, empty, endAndCloseMessageArray, endMessageArray, endOfStream, error, finished, first, flushMessageArray, getBodyMessageArray, hostNameC, keepAliveTimeout, packetSize, pongMessageArray, replay, requestHeaderMessage, requiredSecret, responseMessage, sm, tmpMB, tomcatAuthentication`

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

Constructor Summary
`AjpNioProcessor(int packetSize, NioEndpoint endpoint)`

Method Summary
`protected void` | `actionInternal(ActionCode actionCode, Object param)` Send an action to the connector.
`protected Log` | `getLog()`
`protected void` | `output(byte[] src, int offset, int length)`
`AbstractEndpoint.Handler.SocketState` | `process(SocketWrapper<NioChannel> socket)` Process pipelined HTTP requests using the specified input and output streams.
`protected int` | `read(byte[] buf, int pos, int n, boolean blockFirstRead)` Read the specified amount of bytes, and place them in the input buffer.
`protected int` | `readMessage(AjpMessage message, boolean blockFirstRead)` Read an AJP message.
`boolean` | `receive()` Receive a chunk of data.

Methods inherited from class org.apache.coyote.ajp.AbstractAjpProcessor
`action, asyncDispatch, event, finish, flush, getClientCertProvider, getKeepAliveTimeout, getTomcatAuthentication, getUpgradeInbound, isComet, isUpgrade, parseHost, prepareRequest, prepareResponse, recycle, refillReadBuffer, setClientCertProvider, setKeepAliveTimeout, setRequiredSecret, setSslSupport, setTomcatAuthentication, 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

### socket

    protected NioChannel socket

  Socket associated with the current connection.

### pool

    protected NioSelectorPool pool

  Selector pool for the associated endpoint.

Constructor Detail

### AjpNioProcessor

    public AjpNioProcessor(int packetSize,
                           NioEndpoint endpoint)

Method Detail

### getLog

    protected Log getLog()

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

### process

    public AbstractEndpoint.Handler.SocketState process(SocketWrapper<NioChannel> socket)
                                                 throws IOException

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

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

### actionInternal

    protected void actionInternal(ActionCode actionCode,
                                  Object param)

  Send an action to the connector.

  Specified by:
    `actionInternal` in class `AbstractAjpProcessor<NioChannel>`
  Parameters:
    `actionCode` - Type of the action
    `param` - Action parameter

### output

    protected void output(byte[] src,
                          int offset,
                          int length)
                   throws IOException

  Specified by:
    `output` in class `AbstractAjpProcessor<NioChannel>`
  Throws:
    `IOException`

### read

    protected int read(byte[] buf,
                       int pos,
                       int n,
                       boolean blockFirstRead)
                throws IOException

  Read the specified amount of bytes, and place them in the input buffer.

  Throws:
    `IOException`

### receive

    public boolean receive()
                    throws IOException

  Receive a chunk of data. Called to implement the 'special' packet in ajp13 and to receive the data after we send a GET_BODY packet

  Specified by:
    `receive` in class `AbstractAjpProcessor<NioChannel>`
  Throws:
    `IOException`

### readMessage

    protected int readMessage(AjpMessage message,
                              boolean blockFirstRead)
                       throws IOException

  Read an AJP message.

  Returns:
    The number of bytes read
  Throws:
    `IOException` - any other failure, including incomplete reads

Overview | Package | Class | Tree | Deprecated | Index | Help
| Apache Tomcat 7.0.29
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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