| Modifier and Type | Field and Description |
|---|---|
| private boolean | contentDelimitation
Content delimiter for the request (if false, the connection will be closed at the end of the request). |
| private boolean | http09
HTTP/0.9 flag. |
| private boolean | http11
HTTP/1.1 flag. |
| private final HttpParser | |
| private final Http11InputBuffer | inputBuffer
Input. |
| private volatile boolean | keepAlive
Keep-alive. |
| private static final Log | |
| private volatile boolean | openSocket
Flag used to indicate that the socket should be kept open (e.g. for keep alive or send file). |
| private final Http11OutputBuffer | outputBuffer
Output. |
| private int | pluggableFilterIndex
Tracks how many internal filters are in the filter library so they are skipped when looking for pluggable filters. |
| private final AbstractHttp11Protocol | |
| private volatile boolean | readComplete
Flag that indicates if the request headers have been completely read. |
| private SendfileDataBase | sendfileData
Sendfile data. |
| private static final StringManager | sm
The string manager for this package.
|
| private UpgradeToken | upgradeToken
Instance of the new protocol to use after the HTTP connection has been upgraded. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected final void | ack(ContinueResponseTiming continueResponseTiming)
Implements abstract org.
|
| private void | addInputFilter(InputFilter[] inputFilters, String encodingName)
Add an input filter to the current request. |
| protected final int | |
| private void | |
| private void | |
| private void | |
| private Request | |
| protected final void | disableSwallowRequest()
Implements abstract org.
|
| protected AbstractEndpoint. | dispatchEndRequest()
Implements abstract org. Perform any necessary clean-up processing if the dispatch resulted in the completion of processing for the current request. |
| protected final void | doHttpUpgrade(UpgradeToken
Contains all the information necessary for the Processor to process the upgrade upgradeToken)Overrides org. Process an HTTP upgrade. |
| private void | |
| protected final void | |
| protected final void | |
| protected boolean | flushBufferedWrite()
Implements abstract org. Flush any pending writes. |
| public ByteBuffer | getLeftoverInput()
Overrides org. Implements org. Allows retrieving additional input during the upgrade process. |
| protected Log | |
| protected ServletConnection | getServletConnection()
Implements abstract org. Protocols must override this method and return an appropriate ServletConnection instance |
| public UpgradeToken | getUpgradeToken()
Overrides org. Implements org. Generate an upgrade token. |
| private boolean | |
| private static boolean | |
| protected final boolean | |
| protected final boolean | isRequestBodyFullyRead()
Implements abstract org.
|
| protected boolean | |
| protected boolean | isTrailerFieldsSupported()
Overrides org. Protocols that support trailer fields should override this method and return |
| public boolean | isUpgrade()
Overrides org. Implements org. Processors that implement HTTP upgrade must override this method. |
| public void | pause()
Implements org. Informs the processor that the underlying I/O layer has stopped accepting new connections. |
| protected void | populatePort()
Overrides org. Called when a host header is not present or is empty in the request (e.g. HTTP/1.0). |
| private void | |
| private void | |
| private void | |
| private void | |
| protected final void | prepareResponse()
Implements abstract org. When committing the response, we have to validate the set of headers, as well as setup the response filters. |
| private void | |
| private SendfileState | Returns: The state of send file processingTrigger sendfile processing if required. |
| public final void | recycle()
Overrides org. Implements org. Recycle the processor, ready for the next request which may be on the same connection or a different connection. |
| protected final void | |
| public AbstractEndpoint. | service(SocketWrapperBase<?>
The connection to process socketWrapper)Implements abstract org. Service a 'standard' HTTP request. |
| protected final void | setRequestBody(ByteChunk body)
Implements abstract org.
|
| protected final void | setSocketWrapper(SocketWrapperBase<?>
The socket wrapper socketWrapper)Overrides org. Set the socket wrapper being used. |
| protected final void | |
| protected final void | sslReHandShake()
Overrides org. Processors that can perform a TLS re-handshake (e.g. HTTP/1.1) should override this method and implement the re-handshake. |
| private static boolean | statusDropsConnection(int status)
Determine if we must drop the connection because of the HTTP status code. |
| contentDelimitation | back to summary |
|---|---|
| private boolean contentDelimitation Content delimiter for the request (if false, the connection will be closed at the end of the request). | |
| http09 | back to summary |
|---|---|
| private boolean http09 HTTP/0.9 flag. | |
| http11 | back to summary |
|---|---|
| private boolean http11 HTTP/1.1 flag. | |
| httpParser | back to summary |
|---|---|
| private final HttpParser httpParser | |
| inputBuffer | back to summary |
|---|---|
| private final Http11InputBuffer inputBuffer Input. | |
| keepAlive | back to summary |
|---|---|
| private volatile boolean keepAlive Keep-alive. | |
| log | back to summary |
|---|---|
| private static final Log log | |
| openSocket | back to summary |
|---|---|
| private volatile boolean openSocket Flag used to indicate that the socket should be kept open (e.g. for keep alive or send file). | |
| outputBuffer | back to summary |
|---|---|
| private final Http11OutputBuffer outputBuffer Output. | |
| pluggableFilterIndex | back to summary |
|---|---|
| private int pluggableFilterIndex Tracks how many internal filters are in the filter library so they are skipped when looking for pluggable filters. | |
| protocol | back to summary |
|---|---|
| private final AbstractHttp11Protocol<?> protocol | |
| readComplete | back to summary |
|---|---|
| private volatile boolean readComplete Flag that indicates if the request headers have been completely read. | |
| sendfileData | back to summary |
|---|---|
| private SendfileDataBase sendfileData Sendfile data. | |
| sm | back to summary |
|---|---|
| private static final StringManager sm Hides org. The string manager for this package. | |
| upgradeToken | back to summary |
|---|---|
| private UpgradeToken upgradeToken Instance of the new protocol to use after the HTTP connection has been upgraded. | |
| Http11Processor | back to summary |
|---|---|
public Http11Processor(AbstractHttp11Protocol<?> protocol, Adapter adapter)
| |
| ack | back to summary |
|---|---|
| protected final void ack(ContinueResponseTiming continueResponseTiming) Implements abstract org.
| |
| addInputFilter | back to summary |
|---|---|
| private void addInputFilter(InputFilter[] inputFilters, String encodingName) Add an input filter to the current request. If the encoding is not supported, a 501 response will be returned to the client. | |
| available | back to summary |
|---|---|
| protected final int available(boolean doRead) Implements abstract org.
| |
| badRequest | back to summary |
|---|---|
| private void badRequest(String errorKey) | |
| checkExpectationAndResponseStatus | back to summary |
|---|---|
| private void checkExpectationAndResponseStatus() | |
| checkMaxSwallowSize | back to summary |
|---|---|
| private void checkMaxSwallowSize() | |
| cloneRequest | back to summary |
|---|---|
| private Request cloneRequest(Request source) throws IOException | |
| disableSwallowRequest | back to summary |
|---|---|
| protected final void disableSwallowRequest() Implements abstract org.
| |
| dispatchEndRequest | back to summary |
|---|---|
| protected AbstractEndpoint. Implements abstract org. Doc from org. Perform any necessary clean-up processing if the dispatch resulted in the completion of processing for the current request.
| |
| doHttpUpgrade | back to summary |
|---|---|
| protected final void doHttpUpgrade(UpgradeToken upgradeToken) Overrides org. Doc from org. Process an HTTP upgrade. Processors that support HTTP upgrade should override this method and process the provided token.
| |
| endRequest | back to summary |
|---|---|
| private void endRequest() | |
| finishResponse | back to summary |
|---|---|
| protected final void finishResponse() throws IOException Implements abstract org.
| |
| flush | back to summary |
|---|---|
| protected final void flush() throws IOException Implements abstract org.
| |
| flushBufferedWrite | back to summary |
|---|---|
| protected boolean flushBufferedWrite() throws IOException Implements abstract org. Doc from org. Flush any pending writes. Used during non-blocking writes to flush any remaining data from a previous incomplete write.
| |
| getLeftoverInput | back to summary |
|---|---|
| public ByteBuffer getLeftoverInput() Overrides org. Implements org. Doc from org. Allows retrieving additional input during the upgrade process. Processors that implement HTTP upgrade must override this method.
| |
| getLog | back to summary |
|---|---|
| protected Log getLog() Implements abstract org.
| |
| getServletConnection | back to summary |
|---|---|
| protected ServletConnection getServletConnection() Implements abstract org. Doc from org. Protocols must override this method and return an appropriate ServletConnection instance
| |
| getUpgradeToken | back to summary |
|---|---|
| public UpgradeToken getUpgradeToken() Overrides org. Implements org. Doc from org. Generate an upgrade token. Processors that implement HTTP upgrade must override this method and provide the necessary token.
| |
| handleIncompleteRequestLineRead | back to summary |
|---|---|
| private boolean handleIncompleteRequestLineRead() | |
| isConnectionToken | back to summary |
|---|---|
| private static boolean isConnectionToken(MimeHeaders headers, String token) throws IOException | |
| isReadyForWrite | back to summary |
|---|---|
| protected final boolean isReadyForWrite() Implements abstract org.
| |
| isRequestBodyFullyRead | back to summary |
|---|---|
| protected final boolean isRequestBodyFullyRead() Implements abstract org.
| |
| isTrailerFieldsReady | back to summary |
|---|---|
| protected boolean isTrailerFieldsReady() Implements abstract org.
| |
| isTrailerFieldsSupported | back to summary |
|---|---|
| protected boolean isTrailerFieldsSupported() Overrides org. Doc from org. Protocols that support trailer fields should override this method and return
| |
| isUpgrade | back to summary |
|---|---|
| public boolean isUpgrade() Overrides org. Implements org. Doc from org. Processors that implement HTTP upgrade must override this method.
| |
| pause | back to summary |
|---|---|
| public void pause() Implements org. Doc from org. Informs the processor that the underlying I/O layer has stopped accepting new connections. This is primarily intended to enable processors that use multiplexed connections to prevent further 'streams' being added to an existing multiplexed connection.
| |
| populatePort | back to summary |
|---|---|
| protected void populatePort() Overrides org. Doc from org. Called when a host header is not present or is empty in the request (e.g. HTTP/1.0). It populates the server port with appropriate information. The source is expected to vary by protocol. The default implementation is a NO-OP. This implementation provides the server port from the local port.
| |
| prepareExpectation | back to summary |
|---|---|
| private void prepareExpectation(MimeHeaders headers) | |
| prepareInputFilters | back to summary |
|---|---|
| private void prepareInputFilters(MimeHeaders headers) throws IOException | |
| prepareRequest | back to summary |
|---|---|
| private void prepareRequest() throws IOException After reading the request headers, we have to setup the request filters.
| |
| prepareRequestProtocol | back to summary |
|---|---|
| private void prepareRequestProtocol() | |
| prepareResponse | back to summary |
|---|---|
| protected final void prepareResponse() throws IOException Implements abstract org. When committing the response, we have to validate the set of headers, as well as setup the response filters.
| |
| prepareSendfile | back to summary |
|---|---|
| private void prepareSendfile(OutputFilter[] outputFilters) | |
| processSendfile | back to summary |
|---|---|
| private SendfileState processSendfile(SocketWrapperBase<?> socketWrapper) Trigger sendfile processing if required.
| |
| recycle | back to summary |
|---|---|
| public final void recycle() Overrides org. Implements org. Doc from org. Recycle the processor, ready for the next request which may be on the same connection or a different connection.
| |
| registerReadInterest | back to summary |
|---|---|
| protected final void registerReadInterest() Implements abstract org.
| |
| service | back to summary |
|---|---|
| public AbstractEndpoint. Implements abstract org. Doc from org. Service a 'standard' HTTP request. This method is called for both new requests and for requests that have
partially read the HTTP request line or HTTP headers. Once the headers have been fully read this method is not
called again until there is a new HTTP request to process. Note that the request type may change during
processing which may result in one or more calls to
| |
| setRequestBody | back to summary |
|---|---|
| protected final void setRequestBody(ByteChunk body) Implements abstract org.
| |
| setSocketWrapper | back to summary |
|---|---|
| protected final void setSocketWrapper(SocketWrapperBase<?> socketWrapper) Overrides org. Doc from org. Set the socket wrapper being used.
| |
| setSwallowResponse | back to summary |
|---|---|
| protected final void setSwallowResponse() Implements abstract org.
| |
| sslReHandShake | back to summary |
|---|---|
| protected final void sslReHandShake() throws IOException Overrides org. Doc from org. Processors that can perform a TLS re-handshake (e.g. HTTP/1.1) should override this method and implement the re-handshake.
| |
| statusDropsConnection | back to summary |
|---|---|
| private static boolean statusDropsConnection(int status) Determine if we must drop the connection because of the HTTP status code. Use the same list of codes as Apache/httpd. | |