public abstract class VertxHttpHandler<C extends ConnectionBase> extends VertxHandler<C>
Modifier and Type | Field and Description |
---|---|
protected Map<io.netty.channel.Channel,C> |
connectionMap |
Modifier | Constructor and Description |
---|---|
protected |
VertxHttpHandler(Map<io.netty.channel.Channel,C> connectionMap) |
Modifier and Type | Method and Description |
---|---|
protected void |
channelRead(C connection,
ContextImpl context,
io.netty.channel.ChannelHandlerContext chctx,
Object msg) |
protected abstract void |
doMessageReceived(C connection,
io.netty.channel.ChannelHandlerContext ctx,
Object msg) |
protected C |
getConnection(io.netty.channel.Channel channel) |
protected C |
removeConnection(io.netty.channel.Channel channel) |
protected Object |
safeObject(Object msg,
io.netty.buffer.ByteBufAllocator allocator) |
void |
write(io.netty.channel.ChannelHandlerContext ctx,
Object msg,
io.netty.channel.ChannelPromise promise) |
channelInactive, channelRead, channelReadComplete, channelWritabilityChanged, exceptionCaught, getContext, safeBuffer, userEventTriggered
bind, close, connect, deregister, disconnect, flush, read
channelActive, channelRegistered, channelUnregistered
handlerAdded, handlerRemoved, isSharable
protected Map<io.netty.channel.Channel,C extends ConnectionBase> connectionMap
protected C getConnection(io.netty.channel.Channel channel)
getConnection
in class VertxHandler<C extends ConnectionBase>
protected C removeConnection(io.netty.channel.Channel channel)
removeConnection
in class VertxHandler<C extends ConnectionBase>
protected void channelRead(C connection, ContextImpl context, io.netty.channel.ChannelHandlerContext chctx, Object msg) throws Exception
channelRead
in class VertxHandler<C extends ConnectionBase>
Exception
protected Object safeObject(Object msg, io.netty.buffer.ByteBufAllocator allocator) throws Exception
safeObject
in class VertxHandler<C extends ConnectionBase>
Exception
public void write(io.netty.channel.ChannelHandlerContext ctx, Object msg, io.netty.channel.ChannelPromise promise) throws Exception
write
in interface io.netty.channel.ChannelOutboundHandler
write
in class io.netty.channel.ChannelDuplexHandler
Exception
Copyright © 2015. All Rights Reserved.