org.glassfish.grizzly.http
Class HttpServerFilter
java.lang.Object
org.glassfish.grizzly.filterchain.BaseFilter
org.glassfish.grizzly.http.HttpCodecFilter
org.glassfish.grizzly.http.HttpServerFilter
- All Implemented Interfaces:
- Filter, JmxMonitoringAware<HttpProbe>, MonitoringAware<HttpProbe>
public class HttpServerFilter
- extends HttpCodecFilter
Server side HttpCodecFilter implementation, which is responsible for
decoding HttpRequestPacket and encoding HttpResponsePacket messages.
This Filter is usually used, when we build an asynchronous HTTP server
connection.
- Author:
- Alexey Stashok
- See Also:
HttpCodecFilter,
HttpClientFilter
|
Constructor Summary |
HttpServerFilter()
Constructor, which creates HttpServerFilter instance |
HttpServerFilter(Boolean isSecure,
boolean chunkingEnabled,
int maxHeadersSize,
KeepAlive keepAlive,
DelayedExecutor executor)
Constructor, which creates HttpServerFilter instance,
with the specific max header size parameter. |
HttpServerFilter(boolean chunkingEnabled,
int maxHeadersSize,
KeepAlive keepAlive,
DelayedExecutor executor)
Constructor, which creates HttpServerFilter instance,
with the specific max header size parameter. |
| Methods inherited from class org.glassfish.grizzly.http.HttpCodecFilter |
addContentEncoding, addTransferEncoding, autoDetectSecure, checkEOL, createJmxManagementObject, decodeHttpPacket, encodeKnownHeaders, encodeMimeHeader, encodeMimeHeaders, findEOL, findSpace, getContentEncodings, getMonitoringConfig, getTransferEncodings, handleRead, handleWrite, indexOf, onAdded, onFilterChainChanged, parseHeader, parseHeaderName, parseHeaders, parseHeaderValue, put, put, put, put, removeContentEncoding, removeTransferEncoding, resizeBuffer, skipSpaces |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RESPONSE_COMPLETE_EVENT
public static final Object RESPONSE_COMPLETE_EVENT
HttpServerFilter
public HttpServerFilter()
- Constructor, which creates HttpServerFilter instance
HttpServerFilter
public HttpServerFilter(boolean chunkingEnabled,
int maxHeadersSize,
KeepAlive keepAlive,
DelayedExecutor executor)
- Constructor, which creates HttpServerFilter instance,
with the specific max header size parameter.
- Parameters:
maxHeadersSize - the maximum size of the HTTP message header.
HttpServerFilter
public HttpServerFilter(Boolean isSecure,
boolean chunkingEnabled,
int maxHeadersSize,
KeepAlive keepAlive,
DelayedExecutor executor)
- Constructor, which creates HttpServerFilter instance,
with the specific max header size parameter.
- Parameters:
isSecure - true, if the Filter will be used for secured HTTPS communication,
or false otherwise. It's possible to pass null, in this
case Filter will try to autodetect security.maxHeadersSize - the maximum size of the HTTP message header.
handleRead
public NextAction handleRead(FilterChainContext ctx)
throws IOException
- The method is called, once we have received a
Buffer,
which has to be transformed into HTTP request packet part.
Filter gets Buffer, which represents a part or complete HTTP
request message. As the result of "read" transformation - we will get
HttpContent message, which will represent HTTP request packet
content (might be zero length content) and reference
to a HttpHeader, which contains HTTP request message header.
- Specified by:
handleRead in interface Filter- Overrides:
handleRead in class BaseFilter
- Parameters:
ctx - Request processing context
- Returns:
NextAction
- Throws:
IOException
handleEvent
public NextAction handleEvent(FilterChainContext ctx,
Object event)
throws IOException
- Specified by:
handleEvent in interface Filter- Overrides:
handleEvent in class BaseFilter
- Throws:
IOException
encodeHttpPacket
protected Buffer encodeHttpPacket(Connection connection,
HttpPacket input)
- Overrides:
encodeHttpPacket in class HttpCodecFilter
customizeErrorResponse
protected HttpContent customizeErrorResponse(HttpResponsePacket response)
Copyright © 2010 Oracle Corpration. All Rights Reserved.