Top Fields Constructors Methods
org.glassfish.grizzly.http2

public Class Http2ServerFilter

extends Http2BaseFilter
Class Inheritance
Static Imports
org.glassfish.grizzly.http2.Termination.IN_FIN_TERMINATION

Author
oleksiys

Field Summary

Modifier and TypeField and Description
private final Collection<Connection<L>>
private boolean
private final Attribute<Connection<L>>
private static final String[]
private static final Logger
private final AtomicBoolean
Inherited from org.glassfish.grizzly.http2.Http2BaseFilter:
FIXED_LENGTH_ENCODINGframeCodecHTTP2_CLEARHTTP2_PUSH_ENABLEDPRI_PAYLOADthreadPool

Constructor Summary

AccessConstructor and Description
public
Http2ServerFilter(final Http2Configuration configuration)

Create a new Http2ServerFilter using the specified Http2Configuration.

Method Summary

Modifier and TypeMethod and Description
private boolean
private boolean
checkPRI(final HttpRequestPacket httpRequest, final HttpContent httpContent)

private Http2State
private void
doPush(final FilterChainContext ctx, final PushEvent pushEvent)

private void
public NextAction
handleAccept(final FilterChainContext ctx)

Overrides org.glassfish.grizzly.filterchain.BaseFilter.handleAccept.

Implements org.glassfish.grizzly.filterchain.Filter.handleAccept.

Execute a unit of processing work to be performed, when server channel has accepted the client connection.

public NextAction
handleClose(final FilterChainContext ctx)

Overrides org.glassfish.grizzly.filterchain.BaseFilter.handleClose.

Implements org.glassfish.grizzly.filterchain.Filter.handleClose.

Execute a unit of processing work to be performed, when connection has been closed.

public NextAction
public NextAction
handleRead(final FilterChainContext ctx)

Overrides org.glassfish.grizzly.filterchain.BaseFilter.handleRead.

Implements org.glassfish.grizzly.filterchain.Filter.handleRead.

Execute a unit of processing work to be performed, when channel will become available for reading.

public boolean

Returns:

true if "undefined" methods support payload, or false otherwise
isAllowPayloadForUndefinedHttpMethods
()

The flag, which enables/disables payload support for HTTP methods, for which HTTP spec doesn't clearly state whether they support payload.

protected void
protected void
private void
protected void
processCompleteHeader(final Http2Session http2Session, final FilterChainContext context, final HeaderBlockHead firstHeaderFrame)

Implements abstract org.glassfish.grizzly.http2.Http2BaseFilter.processCompleteHeader.

The method is called once complete HTTP header block arrives on Http2Session.

private void
processInRequest(final Http2Session http2Session, final FilterChainContext context, final HeadersFrame headersFrame)

protected void
processOutgoingHttpHeader(final FilterChainContext
the current FilterChainContext
ctx
,
final Http2Session
the Http2Session associated with this HttpHeader
http2Session
,
final HttpHeader
the out-going HttpHeader
httpHeader
,
final HttpPacket
the complete HttpPacket
entireHttpPacket
)

Implements abstract org.glassfish.grizzly.http2.Http2BaseFilter.processOutgoingHttpHeader.

public void
setAllowPayloadForUndefinedHttpMethods(boolean
true if "undefined" methods support payload, or false otherwise
allowPayloadForUndefinedHttpMethods
)

The flag, which enables/disables payload support for HTTP methods, for which HTTP spec doesn't clearly state whether they support payload.

pack-priv Collection<Connection<L>>
private void
submit(final Connection<L> c, final Runnable runnable)

private boolean
tryHttpUpgrade(final FilterChainContext ctx, final HttpRequestPacket httpRequest, final boolean isLast)

Inherited from org.glassfish.grizzly.http2.Http2BaseFilter:
applySettingscheckIfHttp2StreamChaincheckRequestHeadersOnUpgradecheckResponseHeadersOnUpgradecreateHttp2SessiongetConfigurationgetHttp2UpgradeSettingsgetLocalMaxFramePayloadSizehandleWriteignoreFrameForStreamIdisHttp2UpgradingVersionobtainHttp2SessionobtainHttp2SessiononHttpContentEncodedonHttpContentErroronHttpContentParsedonHttpHeaderErroronHttpHeaderParsedonHttpHeadersEncodedonHttpPacketParsedonInitialLineEncodedonInitialLineParsedprepareIncomingRequestprepareOutgoingRequestprocessFramessendRstStreamsendUpstreamsetLocalMaxFramePayloadSize

Field Detail

activeConnectionsback to summary
private final Collection<Connection<L>> activeConnections
allowPayloadForUndefinedHttpMethodsback to summary
private boolean allowPayloadForUndefinedHttpMethods
CIPHER_CHECKEDback to summary
private final Attribute<Connection<L>> CIPHER_CHECKED
CIPHER_SUITE_BLACK_LISTback to summary
private static final String[] CIPHER_SUITE_BLACK_LIST
LOGGERback to summary
private static final Logger LOGGER

Hides org.glassfish.grizzly.http2.Http2BaseFilter.LOGGER.

shuttingDownback to summary
private final AtomicBoolean shuttingDown

Constructor Detail

Http2ServerFilterback to summary
public Http2ServerFilter(final Http2Configuration configuration)

Create a new Http2ServerFilter using the specified Http2Configuration. Configuration may be changed post-construction by calling getConfiguration().

Method Detail

checkHttpMethodOnUpgradeback to summary
private boolean checkHttpMethodOnUpgrade(final HttpRequestPacket httpRequest)
checkPRIback to summary
private boolean checkPRI(final HttpRequestPacket httpRequest, final HttpContent httpContent)
doDirectUpgradeback to summary
private Http2State doDirectUpgrade(final FilterChainContext ctx)
doPushback to summary
private void doPush(final FilterChainContext ctx, final PushEvent pushEvent)
enableOpReadNowback to summary
private void enableOpReadNow(final FilterChainContext ctx)
handleAcceptback to summary
public NextAction handleAccept(final FilterChainContext ctx) throws IOException

Overrides org.glassfish.grizzly.filterchain.BaseFilter.handleAccept.

Implements org.glassfish.grizzly.filterchain.Filter.handleAccept.

Doc from org.glassfish.grizzly.filterchain.BaseFilter.handleAccept.

Execute a unit of processing work to be performed, when server channel has accepted the client connection. This 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.

Annotations
@Override
handleCloseback to summary
public NextAction handleClose(final FilterChainContext ctx) throws IOException

Overrides org.glassfish.grizzly.filterchain.BaseFilter.handleClose.

Implements org.glassfish.grizzly.filterchain.Filter.handleClose.

Doc from org.glassfish.grizzly.filterchain.BaseFilter.handleClose.

Execute a unit of processing work to be performed, when connection has been closed. This 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.

Annotations
@Override
handleEventback to summary
public NextAction handleEvent(final FilterChainContext ctx, final FilterChainEvent event) throws IOException

Overrides org.glassfish.grizzly.http2.Http2BaseFilter.handleEvent.

Implements org.glassfish.grizzly.filterchain.Filter.handleEvent.

Doc from org.glassfish.grizzly.filterchain.BaseFilter.handleEvent.

Handle custom event associated with the 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.

Annotations
@Override
handleReadback to summary
public NextAction handleRead(final FilterChainContext ctx) throws IOException

Overrides org.glassfish.grizzly.filterchain.BaseFilter.handleRead.

Implements org.glassfish.grizzly.filterchain.Filter.handleRead.

Doc from org.glassfish.grizzly.filterchain.BaseFilter.handleRead.

Execute a unit of processing work to be performed, when channel will become available for reading. This 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.

Annotations
@Override
isAllowPayloadForUndefinedHttpMethodsback to summary
public boolean isAllowPayloadForUndefinedHttpMethods()

The flag, which enables/disables payload support for HTTP methods, for which HTTP spec doesn't clearly state whether they support payload.

Known "undefined" methods are: GET, HEAD, DELETE.

Returns:boolean

true if "undefined" methods support payload, or false otherwise

onHttpHeadersParsedback to summary
protected void onHttpHeadersParsed(final HttpHeader httpHeader, final FilterChainContext ctx)

Overrides org.glassfish.grizzly.http2.Http2BaseFilter.onHttpHeadersParsed.

Annotations
@Override
onPrefaceReceivedback to summary
protected void onPrefaceReceived(Http2Session http2Session)

Overrides org.glassfish.grizzly.http2.Http2BaseFilter.onPrefaceReceived.

Annotations
@Override
prepareOutgoingResponseback to summary
private void prepareOutgoingResponse(final HttpResponsePacket response)
processCompleteHeaderback to summary
protected void processCompleteHeader(final Http2Session http2Session, final FilterChainContext context, final HeaderBlockHead firstHeaderFrame) throws IOException

Implements abstract org.glassfish.grizzly.http2.Http2BaseFilter.processCompleteHeader.

Doc from org.glassfish.grizzly.http2.Http2BaseFilter.processCompleteHeader.

The method is called once complete HTTP header block arrives on Http2Session.

Annotations
@Override
Exceptions
IOException:
if an error occurs when dealing with the event.
processInRequestback to summary
private void processInRequest(final Http2Session http2Session, final FilterChainContext context, final HeadersFrame headersFrame) throws IOException
processOutgoingHttpHeaderback to summary
protected void processOutgoingHttpHeader(final FilterChainContext ctx, final Http2Session http2Session, final HttpHeader httpHeader, final HttpPacket entireHttpPacket) throws IOException

Implements abstract org.glassfish.grizzly.http2.Http2BaseFilter.processOutgoingHttpHeader.

Parameters
ctx:FilterChainContext

the current FilterChainContext

http2Session:Http2Session

the Http2Session associated with this HttpHeader

httpHeader:HttpHeader

the out-going HttpHeader

entireHttpPacket:HttpPacket

the complete HttpPacket

Annotations
@Override
@SuppressWarnings:unchecked
Exceptions
IOException:
if an error occurs sending the packet
setAllowPayloadForUndefinedHttpMethodsback to summary
public void setAllowPayloadForUndefinedHttpMethods(boolean allowPayloadForUndefinedHttpMethods)

The flag, which enables/disables payload support for HTTP methods, for which HTTP spec doesn't clearly state whether they support payload.

Known "undefined" methods are: GET, HEAD, DELETE.

Parameters
allowPayloadForUndefinedHttpMethods:boolean

true if "undefined" methods support payload, or false otherwise

shuttingDownback to summary
pack-priv Collection<Connection<L>> shuttingDown()
submitback to summary
private void submit(final Connection<L> c, final Runnable runnable)
tryHttpUpgradeback to summary
private boolean tryHttpUpgrade(final FilterChainContext ctx, final HttpRequestPacket httpRequest, final boolean isLast) throws Http2StreamException