From 034699268ca818b861c97528e5110d1db2ddc074 Mon Sep 17 00:00:00 2001 From: nmittler Date: Thu, 9 Oct 2014 12:32:26 -0700 Subject: [PATCH] Restoring access to HTTP/2 decoder's listener. Motivation: This was lost in recent changes, just adding it back in. Modifications: Added listener() accessor to Http2ConnectionDecoder and the default impl. Result: The Http2FrameListener can be obtained from the decoder. --- .../handler/codec/http2/DefaultHttp2ConnectionDecoder.java | 5 +++++ .../io/netty/handler/codec/http2/Http2ConnectionDecoder.java | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/codec-http2/src/main/java/io/netty/handler/codec/http2/DefaultHttp2ConnectionDecoder.java b/codec-http2/src/main/java/io/netty/handler/codec/http2/DefaultHttp2ConnectionDecoder.java index 310e10a8b4..ee4c0da8ac 100644 --- a/codec-http2/src/main/java/io/netty/handler/codec/http2/DefaultHttp2ConnectionDecoder.java +++ b/codec-http2/src/main/java/io/netty/handler/codec/http2/DefaultHttp2ConnectionDecoder.java @@ -117,6 +117,11 @@ public class DefaultHttp2ConnectionDecoder implements Http2ConnectionDecoder { return connection; } + @Override + public Http2FrameListener listener() { + return listener; + } + @Override public boolean prefaceReceived() { return prefaceReceived; diff --git a/codec-http2/src/main/java/io/netty/handler/codec/http2/Http2ConnectionDecoder.java b/codec-http2/src/main/java/io/netty/handler/codec/http2/Http2ConnectionDecoder.java index a28da4fcdb..547a142b74 100644 --- a/codec-http2/src/main/java/io/netty/handler/codec/http2/Http2ConnectionDecoder.java +++ b/codec-http2/src/main/java/io/netty/handler/codec/http2/Http2ConnectionDecoder.java @@ -71,6 +71,11 @@ public interface Http2ConnectionDecoder extends Closeable { */ Http2Connection connection(); + /** + * Provides direct access to the underlying frame listener. + */ + Http2FrameListener listener(); + /** * Called by the {@link Http2ConnectionHandler} to decode the next frame from the input buffer. */