public class Http2ClientFilter extends Http2BaseFilter
FIXED_LENGTH_ENCODING
Constructor and Description |
---|
Http2ClientFilter() |
Http2ClientFilter(DraftVersion... supportedDraftVersions) |
Http2ClientFilter(ExecutorService threadPool,
DraftVersion... supportedDraftVersions) |
Modifier and Type | Method and Description |
---|---|
protected Http2Connection |
createClientHttp2Connection(DraftVersion draftVersion,
Connection connection)
Creates client-side
Http2Connection with preconfigured
initial-windows-size and max-concurrent-streams. |
protected org.glassfish.grizzly.npn.AlpnClientNegotiator |
getClientAlpnNegotioator() |
NextAction |
handleConnect(FilterChainContext ctx)
Execute a unit of processing work to be performed, when channel gets
connected.
|
NextAction |
handleEvent(FilterChainContext ctx,
FilterChainEvent event)
Handle custom event associated with the
Connection . |
NextAction |
handleRead(FilterChainContext ctx)
Execute a unit of processing work to be performed, when channel will
become available for reading.
|
NextAction |
handleWrite(FilterChainContext ctx)
Execute a unit of processing work to be performed, when some data should
be written on channel.
|
boolean |
isNeverForceUpgrade() |
boolean |
isSendPushRequestUpstream() |
protected SettingsFrame.SettingsFrameBuilder |
prepareSettings() |
protected SettingsFrame.SettingsFrameBuilder |
prepareSettings(DraftVersion version) |
protected SettingsFrame.SettingsFrameBuilder |
prepareSettings(DraftVersion version,
SettingsFrame.SettingsFrameBuilder builder) |
protected void |
processCompleteHeader(Http2Connection http2Connection,
FilterChainContext context,
HeaderBlockHead firstHeaderFrame)
The method is called once complete HTTP header block arrives on
Http2Connection . |
protected void |
processOutgoingHttpHeader(FilterChainContext ctx,
Http2Connection http2Connection,
HttpHeader httpHeader,
HttpPacket entireHttpPacket) |
void |
setNeverForceUpgrade(boolean neverForceUpgrade) |
void |
setSendPushRequestUpstream(boolean sendPushRequestUpstream) |
checkRequestHeadersOnUpgrade, checkResponseHeadersOnUpgrade, createHttp2Connection, getHttp2UpgradeSettings, getHttp2UpgradingVersion, getInitialWindowSize, getLocalMaxFramePayloadSize, getMaxConcurrentStreams, obtainHttp2Connection, onHttpContentEncoded, onHttpContentError, onHttpContentParsed, onHttpHeaderError, onHttpHeaderParsed, onHttpHeadersEncoded, onHttpHeadersParsed, onHttpPacketParsed, onInitialLineEncoded, onInitialLineParsed, onPrefaceReceived, prepareOutgoingRequest, processFrames, sendSettings, setInitialWindowSize, setLocalMaxFramePayloadSize, setMaxConcurrentStreams
bind
createContext, exceptionOccurred, handleAccept, handleClose, onAdded, onFilterChainChanged, onRemoved, toString
public Http2ClientFilter()
public Http2ClientFilter(DraftVersion... supportedDraftVersions)
public Http2ClientFilter(ExecutorService threadPool, DraftVersion... supportedDraftVersions)
public boolean isNeverForceUpgrade()
public void setNeverForceUpgrade(boolean neverForceUpgrade)
public boolean isSendPushRequestUpstream()
public void setSendPushRequestUpstream(boolean sendPushRequestUpstream)
sendPushRequestUpstream
- true if the push request has to
be sent upstream, so a user have a chance to process it,
or false otherwisepublic NextAction handleConnect(FilterChainContext ctx) throws IOException
BaseFilter
Filter
may either complete the required processing and
return false, or delegate remaining processing to the next
Filter
in a FilterChain
containing this Filter
by returning true.handleConnect
in interface Filter
handleConnect
in class BaseFilter
ctx
- FilterChainContext
NextAction
instruction for FilterChain
, how it
should continue the executionIOException
public NextAction handleRead(FilterChainContext ctx) throws IOException
BaseFilter
Filter
may either complete the required processing and
return false, or delegate remaining processing to the next
Filter
in a FilterChain
containing this Filter
by returning true.handleRead
in interface Filter
handleRead
in class BaseFilter
ctx
- FilterChainContext
NextAction
instruction for FilterChain
, how it
should continue the executionIOException
public NextAction handleWrite(FilterChainContext ctx) throws IOException
BaseFilter
Filter
may either complete the required processing and
return false, or delegate remaining processing to the next
Filter
in a FilterChain
containing this Filter
by returning true.handleWrite
in interface Filter
handleWrite
in class Http2BaseFilter
ctx
- FilterChainContext
NextAction
instruction for FilterChain
, how it
should continue the executionIOException
public NextAction handleEvent(FilterChainContext ctx, FilterChainEvent event) throws IOException
BaseFilter
Connection
.
This Filter
may either complete the required processing and
return StopAction
, or delegate remaining processing to the next
Filter
in a FilterChain
containing this Filter
by returning InvokeAction
.handleEvent
in interface Filter
handleEvent
in class Http2BaseFilter
ctx
- FilterChainContext
NextAction
instruction for FilterChain
, how it
should continue the executionIOException
protected void processOutgoingHttpHeader(FilterChainContext ctx, Http2Connection http2Connection, HttpHeader httpHeader, HttpPacket entireHttpPacket) throws IOException
processOutgoingHttpHeader
in class Http2BaseFilter
ctx
- http2Connection
- httpHeader
- entireHttpPacket
- IOException
protected Http2Connection createClientHttp2Connection(DraftVersion draftVersion, Connection connection)
Http2Connection
with preconfigured
initial-windows-size and max-concurrent-streams.
Note: Should be called with disabled OP_READ (or during OP_READ processing),
because peer frames must not be processed at the time this method
is running.draftVersion
- connection
- Http2Connection
protected org.glassfish.grizzly.npn.AlpnClientNegotiator getClientAlpnNegotioator()
protected void processCompleteHeader(Http2Connection http2Connection, FilterChainContext context, HeaderBlockHead firstHeaderFrame) throws IOException
Http2BaseFilter
Http2Connection
.processCompleteHeader
in class Http2BaseFilter
IOException
protected final SettingsFrame.SettingsFrameBuilder prepareSettings()
protected final SettingsFrame.SettingsFrameBuilder prepareSettings(DraftVersion version)
protected SettingsFrame.SettingsFrameBuilder prepareSettings(DraftVersion version, SettingsFrame.SettingsFrameBuilder builder)
Copyright © 2017 Oracle Corporation. All rights reserved.