public abstract class SpdyOrHttpChooser extends Object implements ChannelUpstreamHandler
ChannelUpstreamHandler which is responsible to setup the ChannelPipeline either for
HTTP or SPDY. This offers an easy way for users to support both at the same time while not care to
much about the low-level details.| Modifier and Type | Class and Description |
|---|---|
static class |
SpdyOrHttpChooser.SelectedProtocol |
ChannelHandler.Sharable| Modifier | Constructor and Description |
|---|---|
protected |
SpdyOrHttpChooser(int maxSpdyContentLength,
int maxHttpContentLength) |
protected SpdyOrHttpChooser(int maxSpdyContentLength,
int maxHttpContentLength)
protected abstract SpdyOrHttpChooser.SelectedProtocol getProtocol(SSLEngine engine)
SpdyOrHttpChooser.SelectedProtocol for the SSLEngine. If its not known yet implementations
MUST return SpdyOrHttpChooser.SelectedProtocol.None.public void handleUpstream(ChannelHandlerContext ctx, ChannelEvent e) throws Exception
ChannelUpstreamHandlerhandleUpstream in interface ChannelUpstreamHandlerctx - the context object for this handlere - the upstream event to process or interceptExceptionprotected void addSpdyHandlers(ChannelHandlerContext ctx, SpdyVersion version)
ChannelHandler's that are needed for SPDY with the given version.protected void addHttpHandlers(ChannelHandlerContext ctx)
ChannelHandler's that are needed for HTTP.protected abstract ChannelUpstreamHandler createHttpRequestHandlerForHttp()
ChannelUpstreamHandler that is responsible for handling the HttpRequest's
when the SpdyOrHttpChooser.SelectedProtocol was SpdyOrHttpChooser.SelectedProtocol.HttpVersion1_0 or
SpdyOrHttpChooser.SelectedProtocol.HttpVersion1_1protected ChannelUpstreamHandler createHttpRequestHandlerForSpdy()
ChannelUpstreamHandler that is responsible for handling the HttpRequest's
when the SpdyOrHttpChooser.SelectedProtocol was SpdyOrHttpChooser.SelectedProtocol.SpdyVersion3_1.
By default this method will just delecate to createHttpRequestHandlerForHttp(), but
sub-classes may override this to change the behaviour.Copyright © 2008-2016 The Netty Project. All Rights Reserved.