-
- All Superinterfaces:
AutoCloseable
,Closeable
- All Known Implementing Classes:
DecoratingHttp2ConnectionDecoder
,DefaultHttp2ConnectionDecoder
@UnstableApi public interface Http2ConnectionDecoder extends Closeable
Handler for inbound traffic on behalf ofHttp2ConnectionHandler
. Performs basic protocol conformance on inbound frames before calling the delegateHttp2FrameListener
for application-specific processing. Note that frames of an unknown type (i.e. HTTP/2 extensions) will skip all protocol checks and be given directly to the listener for processing.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
close()
Http2Connection
connection()
Provides direct access to the underlying connection.void
decodeFrame(ChannelHandlerContext ctx, Buffer in)
Called by theHttp2ConnectionHandler
to decode the next frame from the input buffer.Http2LocalFlowController
flowController()
Provides the local flow controller for managing inbound traffic.Http2FrameListener
frameListener()
Get theHttp2FrameListener
which will be notified when frames are decoded.void
frameListener(Http2FrameListener listener)
Set theHttp2FrameListener
which will be notified when frames are decoded.void
lifecycleManager(Http2LifecycleManager lifecycleManager)
Sets the lifecycle manager.Http2Settings
localSettings()
Gets the local settings for this endpoint of the HTTP/2 connection.boolean
prefaceReceived()
Indicates whether or not the first initialSETTINGS
frame was received from the remote endpoint.
-
-
-
Method Detail
-
lifecycleManager
void lifecycleManager(Http2LifecycleManager lifecycleManager)
Sets the lifecycle manager. Must be called as part of initialization before the decoder is used.
-
connection
Http2Connection connection()
Provides direct access to the underlying connection.
-
flowController
Http2LocalFlowController flowController()
Provides the local flow controller for managing inbound traffic.
-
frameListener
void frameListener(Http2FrameListener listener)
Set theHttp2FrameListener
which will be notified when frames are decoded.This must be set before frames are decoded.
-
frameListener
Http2FrameListener frameListener()
Get theHttp2FrameListener
which will be notified when frames are decoded.
-
decodeFrame
void decodeFrame(ChannelHandlerContext ctx, Buffer in) throws Http2Exception
Called by theHttp2ConnectionHandler
to decode the next frame from the input buffer.- Throws:
Http2Exception
-
localSettings
Http2Settings localSettings()
Gets the local settings for this endpoint of the HTTP/2 connection.
-
prefaceReceived
boolean prefaceReceived()
Indicates whether or not the first initialSETTINGS
frame was received from the remote endpoint.
-
close
void close()
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-
-