Apache Tomcat 7.0.2

org.apache.coyote.http11
Class Http11Processor

java.lang.Object
  extended by org.apache.coyote.http11.AbstractHttp11Processor
      extended by org.apache.coyote.http11.Http11Processor
All Implemented Interfaces:
ActionHook

public class Http11Processor
extends AbstractHttp11Processor
implements ActionHook

Processes HTTP requests.

Author:
Remy Maucherat, fhanik

Field Summary
protected  boolean async
          Async used
protected  JIoEndpoint endpoint
          Associated endpoint.
protected  InternalInputBuffer inputBuffer
          Input.
protected  InternalOutputBuffer outputBuffer
          Output.
protected  SocketWrapper<Socket> socket
          Socket associated with the current connection.
protected  SSLSupport sslSupport
          SSL information.
protected  boolean started
          State flag.
 
Fields inherited from class org.apache.coyote.http11.AbstractHttp11Processor
adapter, compressableMimeTypes, compressionLevel, compressionMinSize, contentDelimitation, disableUploadTimeout, error, expectation, hostNameC, http09, http11, isSecurityEnabled, keepAlive, keepAliveTimeout, localAddr, localName, localPort, maxKeepAliveRequests, maxSavePostSize, noCompressionUserAgents, remoteAddr, remoteHost, remotePort, request, response, restrictedUserAgents, server, sm, socketBuffer, timeout
 
Constructor Summary
Http11Processor(int headerBufferSize, JIoEndpoint endpoint)
           
 
Method Summary
 void action(ActionCode actionCode, Object param)
          Send an action to the connector.
 AbstractEndpoint.Handler.SocketState asyncDispatch(SocketStatus status)
           
 void endRequest()
           
protected  AbstractInputBuffer getInputBuffer()
          Exposes input buffer to super class to allow better code re-use.
protected  AbstractOutputBuffer getOutputBuffer()
          Exposes output buffer to super class to allow better code re-use.
protected  void parseHost(MessageBytes valueMB)
          Parse host.
protected  void prepareRequest()
          After reading the request headers, we have to setup the request filters.
protected  void prepareResponse()
          When committing the response, we have to validate the set of headers, as well as setup the response filters.
 AbstractEndpoint.Handler.SocketState process(SocketWrapper<Socket> socketWrapper)
          Process pipelined HTTP requests on the specified socket.
 void recycle()
           
 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
addCompressableMimeType, addFilter, addInputFilter, addNoCompressionUserAgent, addRestrictedUserAgent, findBytes, findCompressableMimeTypes, findRestrictedUserAgents, getAdapter, getCompression, getDisableUploadTimeout, getKeepAliveTimeout, getMaxKeepAliveRequests, getMaxSavePostSize, getRequest, getServer, getSocketBuffer, getTimeout, initializeFilters, isCompressable, setAdapter, setCompressableMimeTypes, setCompressableMimeTypes, setCompression, setCompressionMinSize, setDisableUploadTimeout, setKeepAliveTimeout, setMaxKeepAliveRequests, setMaxSavePostSize, setNoCompressionUserAgents, setNoCompressionUserAgents, setRestrictedUserAgents, setRestrictedUserAgents, setServer, setTimeout, statusDropsConnection
 
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.


async

protected boolean async
Async used


started

protected boolean started
State flag.


socket

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


endpoint

protected JIoEndpoint endpoint
Associated endpoint.

Constructor Detail

Http11Processor

public Http11Processor(int headerBufferSize,
                       JIoEndpoint endpoint)
Method Detail

setSSLSupport

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


process

public AbstractEndpoint.Handler.SocketState process(SocketWrapper<Socket> socketWrapper)
                                             throws IOException
Process pipelined HTTP requests on the specified 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

asyncDispatch

public AbstractEndpoint.Handler.SocketState asyncDispatch(SocketStatus status)
                                                   throws IOException
Throws:
IOException

endRequest

public void endRequest()

recycle

public void recycle()

action

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

Specified by:
action in interface ActionHook
Parameters:
actionCode - Type of the action
param - Action parameter

prepareRequest

protected void prepareRequest()
After reading the request headers, we have to setup the request filters.


prepareResponse

protected void prepareResponse()
When committing the response, we have to validate the set of headers, as well as setup the response filters.


parseHost

protected void parseHost(MessageBytes valueMB)
Parse host.


getInputBuffer

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

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

getOutputBuffer

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

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

setSocketBuffer

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

Overrides:
setSocketBuffer in class AbstractHttp11Processor

Apache Tomcat 7.0.2

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