public abstract class AbstractHttpConnectionBridge<C>
extends io.netty.channel.ChannelDuplexHandler
| Modifier and Type | Class and Description |
|---|---|
protected class |
AbstractHttpConnectionBridge.ConnectionInputSubscriber |
protected static class |
AbstractHttpConnectionBridge.State
All state for this handler.
|
| Modifier and Type | Field and Description |
|---|---|
static io.netty.util.AttributeKey<java.lang.Boolean> |
CONNECTION_UPGRADED |
protected AbstractHttpConnectionBridge.ConnectionInputSubscriber |
connectionInputSubscriber |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractHttpConnectionBridge() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
beforeOutboundHeaderWrite(io.netty.handler.codec.http.HttpMessage httpMsg,
io.netty.channel.ChannelPromise promise,
long startTimeNanos) |
protected long |
getHeaderWriteStartTimeNanos() |
protected abstract boolean |
isInboundHeader(java.lang.Object nextItem) |
protected abstract boolean |
isOutboundHeader(java.lang.Object nextItem) |
protected AbstractHttpConnectionBridge.ConnectionInputSubscriber |
newConnectionInputSubscriber(io.reactivex.netty.channel.ConnectionInputSubscriberEvent<?,?> orig,
io.netty.channel.Channel channel) |
protected abstract java.lang.Object |
newHttpObject(java.lang.Object nextItem,
io.netty.channel.Channel channel) |
protected void |
onChannelClose(AbstractHttpConnectionBridge.ConnectionInputSubscriber connectionInputSubscriber) |
protected void |
onClosedBeforeReceiveComplete(io.netty.channel.Channel channel) |
protected abstract void |
onContentReceiveComplete(long receiveStartTimeNanos) |
protected abstract void |
onContentReceived() |
protected void |
onNewContentSubscriber(AbstractHttpConnectionBridge.ConnectionInputSubscriber inputSubscriber,
rx.Subscriber<? super C> newSub) |
protected abstract void |
onOutboundLastContentWrite(io.netty.handler.codec.http.LastHttpContent msg,
io.netty.channel.ChannelPromise promise,
long headerWriteStartTimeNanos) |
protected void |
resetSubscriptionState(AbstractHttpConnectionBridge.ConnectionInputSubscriber connectionInputSubscriber) |
void |
userEventTriggered(io.netty.channel.ChannelHandlerContext ctx,
java.lang.Object evt) |
void |
write(io.netty.channel.ChannelHandlerContext ctx,
java.lang.Object msg,
io.netty.channel.ChannelPromise promise) |
bind, close, connect, deregister, disconnect, flush, readchannelActive, channelInactive, channelRead, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaughthandlerAdded, handlerRemoved, isSharablepublic static final io.netty.util.AttributeKey<java.lang.Boolean> CONNECTION_UPGRADED
protected AbstractHttpConnectionBridge.ConnectionInputSubscriber connectionInputSubscriber
public void write(io.netty.channel.ChannelHandlerContext ctx,
java.lang.Object msg,
io.netty.channel.ChannelPromise promise)
throws java.lang.Exception
write in interface io.netty.channel.ChannelOutboundHandlerwrite in class io.netty.channel.ChannelDuplexHandlerjava.lang.Exceptionprotected abstract void beforeOutboundHeaderWrite(io.netty.handler.codec.http.HttpMessage httpMsg,
io.netty.channel.ChannelPromise promise,
long startTimeNanos)
protected abstract void onOutboundLastContentWrite(io.netty.handler.codec.http.LastHttpContent msg,
io.netty.channel.ChannelPromise promise,
long headerWriteStartTimeNanos)
public void userEventTriggered(io.netty.channel.ChannelHandlerContext ctx,
java.lang.Object evt)
throws java.lang.Exception
userEventTriggered in interface io.netty.channel.ChannelInboundHandleruserEventTriggered in class io.netty.channel.ChannelInboundHandlerAdapterjava.lang.Exceptionprotected AbstractHttpConnectionBridge.ConnectionInputSubscriber newConnectionInputSubscriber(io.reactivex.netty.channel.ConnectionInputSubscriberEvent<?,?> orig, io.netty.channel.Channel channel)
protected final void onChannelClose(AbstractHttpConnectionBridge.ConnectionInputSubscriber connectionInputSubscriber)
protected void onClosedBeforeReceiveComplete(io.netty.channel.Channel channel)
protected void resetSubscriptionState(AbstractHttpConnectionBridge.ConnectionInputSubscriber connectionInputSubscriber)
protected abstract boolean isInboundHeader(java.lang.Object nextItem)
protected abstract boolean isOutboundHeader(java.lang.Object nextItem)
protected abstract java.lang.Object newHttpObject(java.lang.Object nextItem,
io.netty.channel.Channel channel)
protected abstract void onContentReceived()
protected abstract void onContentReceiveComplete(long receiveStartTimeNanos)
protected void onNewContentSubscriber(AbstractHttpConnectionBridge.ConnectionInputSubscriber inputSubscriber, rx.Subscriber<? super C> newSub)
protected long getHeaderWriteStartTimeNanos()