public abstract class AbstractHttp11Processor<S> extends AbstractProcessor<S>
| Modifier and Type | Field and Description | 
|---|---|
| protected boolean | cometComet used. | 
| protected String[] | compressableMimeTypesList of MIMES which could be gzipped
 Note: This is not spelled correctly but can't be changed without breaking
       compatibility | 
| protected int | compressionLevelAllowed compression level. | 
| protected int | compressionMinSizeMinimum content size to make compression. | 
| protected int | connectionUploadTimeoutMaximum timeout on uploads. 5 minutes as in Apache HTTPD server. | 
| protected boolean | contentDelimitationContent delimiter for the request (if false, the connection will
 be closed at the end of the request). | 
| protected boolean | disableUploadTimeoutFlag to disable setting a different time-out on uploads. | 
| protected boolean | expectationIs there an expectation ? | 
| protected boolean | http09HTTP/0.9 flag. | 
| protected boolean | http11HTTP/1.1 flag. | 
| protected HttpParser | httpParser | 
| protected HttpUpgradeHandler | httpUpgradeHandlerInstance of the new protocol to use after the HTTP connection has been
 upgraded using the Servlet 3.1 based upgrade process. | 
| protected boolean | keepAliveKeep-alive. | 
| protected int | keepAliveTimeoutThe number of seconds Tomcat will wait for a subsequent request
 before closing the connection. | 
| protected boolean | keptAliveFlag used to indicate that the socket should treat the next request
 processed like a keep-alive connection - i.e. one where there may not be
 any data to process. | 
| protected String | localAddrThe local Host address. | 
| protected String | localNameLocal Host associated with the current connection. | 
| protected int | localPortLocal port to which the socket is connected | 
| protected int | maxKeepAliveRequestsMaximum number of Keep-Alive requests to honor. | 
| protected int | maxSavePostSizeMax saved post size. | 
| protected boolean | noCompressionStrongETagFlag to disable compression when the resource has a strong ETag. | 
| protected Pattern | noCompressionUserAgentsRegular expression that defines the user agents to not use gzip with | 
| protected boolean | openSocketFlag used to indicate that the socket should be kept open (e.g. for keep
 alive or send file. | 
| protected boolean | readCompleteFlag that indicates if the request headers have been completely read. | 
| protected String | remoteAddrRemote Address associated with the current connection. | 
| protected String | remoteHostRemote Host associated with the current connection. | 
| protected int | remotePortRemote port to which the socket is connected | 
| protected Pattern | restrictedUserAgentsRegular expression that defines the restricted user agents. | 
| protected boolean | sendfileInProgressFlag that indicates that send file processing is in progress and that the
 socket should not be returned to the poller (where a poller is used). | 
| protected String | serverAllow a customized the server header for the tin-foil hat folks. | 
| protected static StringManager | smThe string manager for this package. | 
| protected int | socketBufferSocket buffering. | 
| protected UpgradeInbound | upgradeInboundDeprecated. 
 Will be removed in Tomcat 8.0.x. | 
adapter, asyncStateMachine, endpoint, hostNameC, request, response, socketWrapper, userDataHelper| Constructor and Description | 
|---|
| AbstractHttp11Processor(AbstractEndpoint<S> endpoint) | 
| Modifier and Type | Method and Description | 
|---|---|
| void | action(ActionCode actionCode,
      Object param)Send an action to the connector. | 
| protected abstract void | actionInternal(ActionCode actionCode,
              Object param) | 
| void | addCompressableMimeType(String mimeType)Deprecated. 
 | 
| void | addCompressibleMimeType(String mimeType)Add a mime-type which will be compressible
 The mime-type String will be exactly matched
 in the response mime-type header . | 
| AbstractEndpoint.Handler.SocketState | asyncDispatch(SocketStatus status)Process in-progress Servlet 3.0 Async requests. | 
| protected abstract boolean | breakKeepAliveLoop(SocketWrapper<S> 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 abstract boolean | disableKeepAlive()Processors (currently only HTTP BIO) may elect to disable HTTP keep-alive
 in some circumstances. | 
| void | endRequest() | 
| protected int | findBytes(ByteChunk bc,
         byte[] b)Deprecated. 
 Unused. Will be removed in Tomcat 8.5.x. | 
| boolean | getAllowHostHeaderMismatch()Will Tomcat accept an HTTP 1.1 request where the host header does not
 agree with the host specified (if any) in the request line? | 
| String | getCompression()Return compression level. | 
| int | getConnectionUploadTimeout()Get the upload timeout. | 
| boolean | getDisableUploadTimeout()Get the flag that controls upload time-outs. | 
| HttpUpgradeHandler | getHttpUpgradeHandler() | 
| protected abstract AbstractInputBuffer<S> | getInputBuffer()Exposes input buffer to super class to allow better code re-use. | 
| int | getKeepAliveTimeout()Return the number Keep-Alive timeout. | 
| int | getMaxKeepAliveRequests()Return the number of Keep-Alive requests that we will honor. | 
| int | getMaxSavePostSize()Return the maximum size of a POST which will be buffered in SSL mode. | 
| protected abstract AbstractOutputBuffer<S> | getOutputBuffer()Exposes output buffer to super class to allow better code re-use. | 
| String | getServer()Get the server header name. | 
| int | getSocketBuffer()Get the socket buffer flag. | 
| UpgradeInbound | getUpgradeInbound()Deprecated. 
 Will be removed in Tomcat 8.0.x. | 
| protected abstract boolean | handleIncompleteRequestLineRead()Defines how a connector handles an incomplete request line read. | 
| protected void | initializeFilters(int maxTrailerSize,
                 Set<String> allowedTrailerHeaders,
                 int maxExtensionSize,
                 int maxSwallowSize)Initialize standard input and output filters. | 
| boolean | isComet() | 
| boolean | isUpgrade() | 
| protected void | populatePort()Called when a host header is not present or is empty in the request (e.g. | 
| protected void | prepareRequest()After reading the request headers, we have to setup the request filters. | 
| protected abstract void | prepareRequestInternal()Connector implementation specific request preparation. | 
| protected abstract boolean | prepareSendfile(OutputFilter[] outputFilters) | 
| AbstractEndpoint.Handler.SocketState | process(SocketWrapper<S> socketWrapper)Process pipelined HTTP requests using the specified input and output
 streams. | 
| void | recycle(boolean isSocketClosing) | 
| protected abstract void | recycleInternal() | 
| protected abstract 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 | setAllowHostHeaderMismatch(boolean allowHostHeaderMismatch)Will Tomcat accept an HTTP 1.1 request where the host header does not
 agree with the host specified (if any) in the request line? | 
| protected abstract void | setCometTimeouts(SocketWrapper<S> socketWrapper)Provides a mechanism for those connectors (currently only NIO) that need
 that need to set comet timeouts. | 
| void | setCompressableMimeTypes(String compressibleMimeTypes)Deprecated. 
 | 
| void | setCompressableMimeTypes(String[] compressibleMimeTypes)Deprecated. 
 | 
| void | setCompressibleMimeTypes(String compressibleMimeTypes)Set compressible mime-type list
 List contains users agents separated by ',' :
 ie: "text/html,text/xml,text/plain" | 
| void | setCompressibleMimeTypes(String[] compressibleMimeTypes)Set compressible mime-type list (this method is best when used with
 a large number of connectors, where it would be better to have all of
 them referenced a single array). | 
| void | setCompression(String compression)Set compression level. | 
| void | setCompressionMinSize(int compressionMinSize)Set Minimum size to trigger compression. | 
| void | setConnectionUploadTimeout(int timeout)Set the upload timeout. | 
| void | setDisableUploadTimeout(boolean isDisabled)Set the flag to control upload time-outs. | 
| void | setKeepAliveTimeout(int timeout)Set the Keep-Alive timeout. | 
| void | setMaxKeepAliveRequests(int mkar)Set the maximum number of Keep-Alive requests to honor. | 
| void | setMaxSavePostSize(int msps)Set the maximum size of a POST which will be buffered in SSL mode. | 
| void | setNoCompressionStrongETag(boolean noCompressionStrongETag) | 
| void | setNoCompressionUserAgents(String noCompressionUserAgents)Set no compression user agent pattern. | 
| protected abstract void | setRequestLineReadTimeout()Configures the timeout to be used for reading the request line. | 
| void | setRestrictedUserAgents(String restrictedUserAgents)Set restricted user agent list (which will downgrade the connector
 to HTTP/1.0 mode). | 
| void | setServer(String server)Set the server header name. | 
| void | setSocketBuffer(int socketBuffer)Set the socket buffer flag. | 
| protected abstract void | setSocketTimeout(int timeout)Set the socket timeout. | 
| protected boolean | statusDropsConnection(int status)Determine if we must drop the connection because of the HTTP status
 code. | 
| AbstractEndpoint.Handler.SocketState | upgradeDispatch()Processes data received on a connection that has been through an HTTP
 upgrade. | 
| AbstractEndpoint.Handler.SocketState | upgradeDispatch(SocketStatus status) | 
asyncPostProcess, errorDispatch, event, getAdapter, getAsyncStateMachine, getEndpoint, getErrorState, getExecutor, getLog, getMaxCookieCount, getRequest, getSocketWrapper, isAsync, parseHost, populateHost, resetErrorState, setAdapter, setErrorState, setMaxCookieCount, setSocketWrapperclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitsetSslSupportprotected static final StringManager sm
protected boolean keepAlive
protected boolean openSocket
protected boolean keptAlive
protected boolean sendfileInProgress
protected boolean readComplete
protected boolean http11
protected boolean http09
protected boolean contentDelimitation
protected boolean expectation
protected boolean comet
protected Pattern restrictedUserAgents
protected int maxKeepAliveRequests
protected int keepAliveTimeout
protected String remoteAddr
protected String remoteHost
protected String localName
protected int localPort
protected int remotePort
protected String localAddr
protected int connectionUploadTimeout
protected boolean disableUploadTimeout
protected int compressionLevel
protected boolean noCompressionStrongETag
protected int compressionMinSize
protected int socketBuffer
protected int maxSavePostSize
protected Pattern noCompressionUserAgents
protected String[] compressableMimeTypes
protected String server
@Deprecated protected UpgradeInbound upgradeInbound
protected HttpUpgradeHandler httpUpgradeHandler
protected HttpParser httpParser
public AbstractHttp11Processor(AbstractEndpoint<S> endpoint)
public boolean getAllowHostHeaderMismatch()
true if Tomcat will allow such requests, otherwise
         falsepublic void setAllowHostHeaderMismatch(boolean allowHostHeaderMismatch)
allowHostHeaderMismatch - true to allow such requests,
                                false to reject them with a 400public void setCompression(String compression)
public void setCompressionMinSize(int compressionMinSize)
public void setNoCompressionStrongETag(boolean noCompressionStrongETag)
public void setNoCompressionUserAgents(String noCompressionUserAgents)
Pattern.
 ie: "gorilla|desesplorer|tigrus"@Deprecated public void addCompressableMimeType(String mimeType)
addCompressibleMimeType(String)@Deprecated public void setCompressableMimeTypes(String[] compressibleMimeTypes)
setCompressibleMimeTypes(String[])@Deprecated public void setCompressableMimeTypes(String compressibleMimeTypes)
setCompressibleMimeTypes(String)public void addCompressibleMimeType(String mimeType)
mimeType - mime-type stringpublic void setCompressibleMimeTypes(String[] compressibleMimeTypes)
public void setCompressibleMimeTypes(String compressibleMimeTypes)
public String getCompression()
public void setRestrictedUserAgents(String restrictedUserAgents)
Pattern.
 ie: "gorilla|desesplorer|tigrus"public void setMaxKeepAliveRequests(int mkar)
public int getMaxKeepAliveRequests()
public void setKeepAliveTimeout(int timeout)
public int getKeepAliveTimeout()
public void setMaxSavePostSize(int msps)
public int getMaxSavePostSize()
public void setDisableUploadTimeout(boolean isDisabled)
public boolean getDisableUploadTimeout()
public void setSocketBuffer(int socketBuffer)
public int getSocketBuffer()
public void setConnectionUploadTimeout(int timeout)
public int getConnectionUploadTimeout()
public void setServer(String server)
public String getServer()
@Deprecated protected int findBytes(ByteChunk bc, byte[] b)
protected boolean statusDropsConnection(int status)
protected abstract AbstractInputBuffer<S> getInputBuffer()
protected abstract AbstractOutputBuffer<S> getOutputBuffer()
protected void initializeFilters(int maxTrailerSize,
                     Set<String> allowedTrailerHeaders,
                     int maxExtensionSize,
                     int maxSwallowSize)
public final void action(ActionCode actionCode, Object param)
actionCode - Type of the actionparam - Action parameterprotected abstract void actionInternal(ActionCode actionCode, Object param)
protected abstract boolean disableKeepAlive()
protected abstract void setRequestLineReadTimeout()
                                           throws IOException
IOExceptionprotected abstract boolean handleIncompleteRequestLineRead()
true if the processor should break out of the
         processing loop, otherwise false.protected abstract void setSocketTimeout(int timeout)
                                  throws IOException
IOExceptionpublic AbstractEndpoint.Handler.SocketState process(SocketWrapper<S> socketWrapper) throws IOException
process in interface Processor<S>process in class AbstractProcessor<S>socketWrapper - Socket from which the HTTP requests will be read
               and the HTTP responses will be written.IOException - error during an I/O operationprotected void prepareRequest()
                       throws IOException
IOExceptionprotected abstract void prepareRequestInternal()
protected abstract boolean prepareSendfile(OutputFilter[] outputFilters)
protected void populatePort()
The default implementation is a NO-OP.
This implementation provides the server port from the local port.
populatePort in class AbstractProcessor<S>public AbstractEndpoint.Handler.SocketState asyncDispatch(SocketStatus status)
AbstractProcessorasyncDispatch in interface Processor<S>asyncDispatch in class AbstractProcessor<S>public boolean isComet()
public AbstractEndpoint.Handler.SocketState upgradeDispatch() throws IOException
AbstractProcessorupgradeDispatch in interface Processor<S>upgradeDispatch in class AbstractProcessor<S>IOException - An IO error occurred@Deprecated public UpgradeInbound getUpgradeInbound()
getUpgradeInbound in interface Processor<S>getUpgradeInbound in class AbstractProcessor<S>public boolean isUpgrade()
public AbstractEndpoint.Handler.SocketState upgradeDispatch(SocketStatus status) throws IOException
IOExceptionpublic HttpUpgradeHandler getHttpUpgradeHandler()
protected abstract void resetTimeouts()
protected abstract void setCometTimeouts(SocketWrapper<S> socketWrapper)
public void endRequest()
protected abstract boolean breakKeepAliveLoop(SocketWrapper<S> socketWrapper)
public final void recycle(boolean isSocketClosing)
protected abstract void recycleInternal()
Copyright © 2000-2020 Apache Software Foundation. All Rights Reserved.