org.glassfish.grizzly.filterchain.Filter serves as a bridge between HTTP2 frames and upper-level HTTP
layers by converting Http2Frames into HttpPackets and passing them up/down by the
FilterChain.
Additionally this org.glassfish.grizzly.filterchain.Filter has logic responsible for checking HTTP2 protocol
semantics and fire correspondent events and messages in case when HTTP2 semantics is broken.
| Modifier and Type | Field and Description |
|---|---|
| private final Http2Configuration | |
| protected static final TransferEncoding | |
| pack-priv final Http2FrameCodec | |
| pack-priv static final String | HTTP2_CLEAR
Token for clear-text HTTP/2.0. |
| pack-priv static final String | HTTP2_PUSH_ENABLED
Attribute name for associating push status. |
| private int | |
| private static final Logger | |
| pack-priv static final byte[] | |
| protected final ExecutorService |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv void | |
| pack-priv boolean | |
| protected boolean | |
| protected boolean | |
| protected Http2Session | Returns: Http2Sessionthe TCP connection, final boolean Connectionflag indicating whether this connection is server side or not. isServer)Creates |
| public Http2Configuration | |
| protected SettingsFrame | |
| public int | |
| public NextAction | handleEvent(final FilterChainContext ctx, final FilterChainEvent event)
Overrides org. Implements org. Handle custom event associated with the |
| public NextAction | handleWrite(final FilterChainContext ctx)
Overrides org. Implements org. Execute a unit of processing work to be performed, when some data should be written on channel. |
| protected static boolean | |
| protected boolean | |
| protected final Http2Session | obtainHttp2Session(final FilterChainContext context, final boolean
true if the isUpStream)FilterChainContext represents upstream FilterChain execution,
or false otherwiseObtain |
| pack-priv final Http2Session | obtainHttp2Session(final Http2State
Http2State associated with the Connectiontrue if the isUpStream)FilterChainContext represents upstream FilterChain execution,
or false otherwiseObtain |
| protected void | |
| protected void | |
| protected void | |
| protected void | |
| protected boolean | |
| protected void | |
| protected void | |
| protected boolean | |
| protected void | |
| protected void | |
| protected void | |
| pack-priv void | |
| protected void | |
| protected abstract void | processCompleteHeader(final Http2Session
the http2Session, final FilterChainContext Http2Session associated with this header.the current context, final HeaderBlockHead FilterChainContextthe first firstHeaderFrame)HeaderBlockHead from the first HeadersFrame received.The method is called once complete HTTP header block arrives on |
| private static void | processDataFrame(final Http2Session http2Session, final FilterChainContext context, final Http2Frame frame)
|
| protected boolean | processFrames(final FilterChainContext ctx, final Http2Session http2Session, final List<Http2Frame> framesList)
|
| private void | |
| private void | processHeadersFrame(final Http2Session http2Session, final FilterChainContext context, final Http2Frame frame)
|
| private void | processInFrame(final Http2Session http2Session, final FilterChainContext context, final Http2Frame frame)
|
| protected abstract void | processOutgoingHttpHeader(final FilterChainContext ctx, final Http2Session http2Session, final HttpHeader httpHeader, final HttpPacket entireHttpPacket)
|
| private void | |
| private void | |
| private void | |
| private void | processSettingsFrame(final Http2Session http2Session, final FilterChainContext context, final Http2Frame frame)
|
| private void | |
| pack-priv void | sendRstStream(final FilterChainContext ctx, final Http2Session http2Session, final int streamId, final ErrorCode errorCode)
|
| private void | |
| pack-priv void | |
| public void | setLocalMaxFramePayloadSize(final int
the maximum allowed HTTP2 frame size localMaxFramePayloadSize)Sets the maximum allowed HTTP2 frame size. |
| configuration | back to summary |
|---|---|
| private final Http2Configuration configuration | |
| FIXED_LENGTH_ENCODING | back to summary |
|---|---|
| protected static final TransferEncoding FIXED_LENGTH_ENCODING | |
| frameCodec | back to summary |
|---|---|
| pack-priv final Http2FrameCodec frameCodec | |
| HTTP2_CLEAR | back to summary |
|---|---|
| pack-priv static final String HTTP2_CLEAR Token for clear-text HTTP/2.0. | |
| HTTP2_PUSH_ENABLED | back to summary |
|---|---|
| pack-priv static final String HTTP2_PUSH_ENABLED Attribute name for associating push status. | |
| localMaxFramePayloadSize | back to summary |
|---|---|
| private int localMaxFramePayloadSize | |
| LOGGER | back to summary |
|---|---|
| private static final Logger LOGGER | |
| PRI_PAYLOAD | back to summary |
|---|---|
| pack-priv static final byte[] PRI_PAYLOAD | |
| threadPool | back to summary |
|---|---|
| protected final ExecutorService threadPool | |
| Http2BaseFilter | back to summary |
|---|---|
| public Http2BaseFilter(final Http2Configuration configuration) Constructs Http2HandlerFilter. | |
| applySettings | back to summary |
|---|---|
| pack-priv void applySettings(final Http2Session http2Session, final SettingsFrame settingsFrame) throws Http2SessionException, Http2StreamException | |
| checkIfHttp2StreamChain | back to summary |
|---|---|
| pack-priv boolean checkIfHttp2StreamChain(final FilterChainContext ctx) throws IOException | |
| checkRequestHeadersOnUpgrade | back to summary |
|---|---|
| protected boolean checkRequestHeadersOnUpgrade(final HttpRequestPacket httpRequest) | |
| checkResponseHeadersOnUpgrade | back to summary |
|---|---|
| protected boolean checkResponseHeadersOnUpgrade(final HttpResponsePacket httpResponse) | |
| createHttp2Session | back to summary |
|---|---|
| protected Http2Session createHttp2Session(final Connection<L> connection, final boolean isServer) Creates
| |
| getConfiguration | back to summary |
|---|---|
public Http2Configuration getConfiguration()
| |
| getHttp2UpgradeSettings | back to summary |
|---|---|
| protected SettingsFrame getHttp2UpgradeSettings(final HttpRequestPacket httpRequest) | |
| getLocalMaxFramePayloadSize | back to summary |
|---|---|
public int getLocalMaxFramePayloadSize()
| |
| handleEvent | back to summary |
|---|---|
| public NextAction handleEvent(final FilterChainContext ctx, final FilterChainEvent event) throws IOException Overrides org. Implements org. Doc from org. Handle custom event associated with the
| |
| handleWrite | back to summary |
|---|---|
| public NextAction handleWrite(final FilterChainContext ctx) throws IOException Overrides org. Implements org. Doc from org. Execute a unit of processing work to be performed, when some data should be written on channel. This
| |
| ignoreFrameForStreamId | back to summary |
|---|---|
| protected static boolean ignoreFrameForStreamId(final Http2Session session, final int streamId) | |
| isHttp2UpgradingVersion | back to summary |
|---|---|
| protected boolean isHttp2UpgradingVersion(final HttpHeader httpHeader) | |
| obtainHttp2Session | back to summary |
|---|---|
| protected final Http2Session obtainHttp2Session(final FilterChainContext context, final boolean isUpStream) Obtain
| |
| obtainHttp2Session | back to summary |
|---|---|
| pack-priv final Http2Session obtainHttp2Session(final Http2State http2State, final FilterChainContext context, final boolean isUpStream) Obtain
| |
| onHttpContentEncoded | back to summary |
|---|---|
protected void onHttpContentEncoded(final HttpContent content, final FilterChainContext ctx)
| |
| onHttpContentError | back to summary |
|---|---|
protected void onHttpContentError(HttpHeader httpHeader, FilterChainContext ctx, Throwable t) throws IOException
| |
| onHttpContentParsed | back to summary |
|---|---|
protected void onHttpContentParsed(final HttpContent content, final FilterChainContext ctx)
| |
| onHttpHeaderError | back to summary |
|---|---|
protected void onHttpHeaderError(final HttpHeader httpHeader, final FilterChainContext ctx, final Throwable t) throws IOException
| |
| onHttpHeaderParsed | back to summary |
|---|---|
protected boolean onHttpHeaderParsed(HttpHeader httpHeader, Buffer buffer, FilterChainContext ctx)
| |
| onHttpHeadersEncoded | back to summary |
|---|---|
protected void onHttpHeadersEncoded(final HttpHeader httpHeader, final FilterChainContext ctx)
| |
| onHttpHeadersParsed | back to summary |
|---|---|
protected void onHttpHeadersParsed(final HttpHeader httpHeader, final FilterChainContext ctx)
| |
| onHttpPacketParsed | back to summary |
|---|---|
protected boolean onHttpPacketParsed(HttpHeader httpHeader, FilterChainContext ctx)
| |
| onInitialLineEncoded | back to summary |
|---|---|
protected void onInitialLineEncoded(final HttpHeader httpHeader, final FilterChainContext ctx)
| |
| onInitialLineParsed | back to summary |
|---|---|
protected void onInitialLineParsed(final HttpHeader httpHeader, final FilterChainContext ctx)
| |
| onPrefaceReceived | back to summary |
|---|---|
| protected void onPrefaceReceived(final Http2Session http2Session) | |
| prepareIncomingRequest | back to summary |
|---|---|
| pack-priv void prepareIncomingRequest(final Http2Stream stream, final Http2Request request) | |
| prepareOutgoingRequest | back to summary |
|---|---|
| protected void prepareOutgoingRequest(final HttpRequestPacket request) | |
| processCompleteHeader | back to summary |
|---|---|
| protected abstract void processCompleteHeader(final Http2Session http2Session, final FilterChainContext context, final HeaderBlockHead firstHeaderFrame) throws IOException The method is called once complete HTTP header block arrives on
| |
| processDataFrame | back to summary |
|---|---|
| private static void processDataFrame(final Http2Session http2Session, final FilterChainContext context, final Http2Frame frame) throws IOException | |
| processFrames | back to summary |
|---|---|
| protected boolean processFrames(final FilterChainContext ctx, final Http2Session http2Session, final List<Http2Frame> framesList) | |
| processGoAwayFrame | back to summary |
|---|---|
| private void processGoAwayFrame(final Http2Session http2Session, final Http2Frame frame) throws Http2SessionException | |
| processHeadersFrame | back to summary |
|---|---|
| private void processHeadersFrame(final Http2Session http2Session, final FilterChainContext context, final Http2Frame frame) throws IOException | |
| processInFrame | back to summary |
|---|---|
private void processInFrame(final Http2Session http2Session, final FilterChainContext context, final Http2Frame frame) throws Http2StreamException, Http2SessionException, IOException
| |
| processOutgoingHttpHeader | back to summary |
|---|---|
| protected abstract void processOutgoingHttpHeader(final FilterChainContext ctx, final Http2Session http2Session, final HttpHeader httpHeader, final HttpPacket entireHttpPacket) throws IOException | |
| processPingFrame | back to summary |
|---|---|
| private void processPingFrame(final Http2Session http2Session, final Http2Frame frame) throws Http2SessionException | |
| processPriorityFrame | back to summary |
|---|---|
| private void processPriorityFrame(final Http2Frame frame) throws Http2SessionException, Http2StreamException | |
| processRstStreamFrame | back to summary |
|---|---|
| private void processRstStreamFrame(final Http2Session http2Session, final Http2Frame frame) throws Http2SessionException | |
| processSettingsFrame | back to summary |
|---|---|
| private void processSettingsFrame(final Http2Session http2Session, final FilterChainContext context, final Http2Frame frame) throws Http2SessionException, Http2StreamException | |
| processWindowUpdateFrame | back to summary |
|---|---|
| private void processWindowUpdateFrame(final Http2Session http2Session, final Http2Frame frame) throws Http2StreamException, Http2SessionException | |
| sendRstStream | back to summary |
|---|---|
| pack-priv void sendRstStream(final FilterChainContext ctx, final Http2Session http2Session, final int streamId, final ErrorCode errorCode) | |
| sendSettingsAck | back to summary |
|---|---|
| private void sendSettingsAck(final Http2Session http2Session, final FilterChainContext context) | |
| sendUpstream | back to summary |
|---|---|
| pack-priv void sendUpstream(final Http2Session http2Session, final Http2Stream stream, final HttpContent content) | |
| setLocalMaxFramePayloadSize | back to summary |
|---|---|
| public void setLocalMaxFramePayloadSize(final int localMaxFramePayloadSize) Sets the maximum allowed HTTP2 frame size.
| |