public final class VertxHandler<C extends ConnectionBase>
extends io.netty.channel.ChannelDuplexHandler
| Modifier and Type | Method and Description |
|---|---|
VertxHandler<C> |
addHandler(Handler<C> handler)
Set an handler to be called when the connection is set on this handler.
|
void |
channelInactive(io.netty.channel.ChannelHandlerContext chctx) |
void |
channelRead(io.netty.channel.ChannelHandlerContext chctx,
Object msg) |
void |
channelReadComplete(io.netty.channel.ChannelHandlerContext ctx) |
void |
channelWritabilityChanged(io.netty.channel.ChannelHandlerContext ctx) |
static <C extends ConnectionBase> |
create(C connection) |
static <C extends ConnectionBase> |
create(ContextInternal context,
Function<io.netty.channel.ChannelHandlerContext,C> connectionFactory) |
void |
exceptionCaught(io.netty.channel.ChannelHandlerContext chctx,
Throwable t) |
C |
getConnection() |
void |
handlerAdded(io.netty.channel.ChannelHandlerContext ctx) |
VertxHandler<C> |
removeHandler(Handler<C> handler)
Set an handler to be called when the connection is unset from this handler.
|
static io.netty.buffer.ByteBuf |
safeBuffer(io.netty.buffer.ByteBuf buf,
io.netty.buffer.ByteBufAllocator allocator) |
static io.netty.buffer.ByteBuf |
safeBuffer(io.netty.buffer.ByteBufHolder holder,
io.netty.buffer.ByteBufAllocator allocator) |
void |
userEventTriggered(io.netty.channel.ChannelHandlerContext ctx,
Object evt) |
bind, close, connect, deregister, disconnect, flush, read, writechannelActive, channelRegistered, channelUnregisteredensureNotSharable, handlerRemoved, isSharablepublic static io.netty.buffer.ByteBuf safeBuffer(io.netty.buffer.ByteBufHolder holder,
io.netty.buffer.ByteBufAllocator allocator)
public static io.netty.buffer.ByteBuf safeBuffer(io.netty.buffer.ByteBuf buf,
io.netty.buffer.ByteBufAllocator allocator)
public static <C extends ConnectionBase> VertxHandler<C> create(C connection)
public static <C extends ConnectionBase> VertxHandler<C> create(ContextInternal context, Function<io.netty.channel.ChannelHandlerContext,C> connectionFactory)
public void handlerAdded(io.netty.channel.ChannelHandlerContext ctx)
throws Exception
handlerAdded in interface io.netty.channel.ChannelHandlerhandlerAdded in class io.netty.channel.ChannelHandlerAdapterExceptionpublic VertxHandler<C> addHandler(Handler<C> handler)
handler - the handler to be notifiedpublic VertxHandler<C> removeHandler(Handler<C> handler)
handler - the handler to be notifiedpublic C getConnection()
public void channelWritabilityChanged(io.netty.channel.ChannelHandlerContext ctx)
throws Exception
channelWritabilityChanged in interface io.netty.channel.ChannelInboundHandlerchannelWritabilityChanged in class io.netty.channel.ChannelInboundHandlerAdapterExceptionpublic void exceptionCaught(io.netty.channel.ChannelHandlerContext chctx,
Throwable t)
throws Exception
exceptionCaught in interface io.netty.channel.ChannelHandlerexceptionCaught in interface io.netty.channel.ChannelInboundHandlerexceptionCaught in class io.netty.channel.ChannelInboundHandlerAdapterExceptionpublic void channelInactive(io.netty.channel.ChannelHandlerContext chctx)
throws Exception
channelInactive in interface io.netty.channel.ChannelInboundHandlerchannelInactive in class io.netty.channel.ChannelInboundHandlerAdapterExceptionpublic void channelReadComplete(io.netty.channel.ChannelHandlerContext ctx)
throws Exception
channelReadComplete in interface io.netty.channel.ChannelInboundHandlerchannelReadComplete in class io.netty.channel.ChannelInboundHandlerAdapterExceptionpublic void channelRead(io.netty.channel.ChannelHandlerContext chctx,
Object msg)
throws Exception
channelRead in interface io.netty.channel.ChannelInboundHandlerchannelRead in class io.netty.channel.ChannelInboundHandlerAdapterExceptionpublic void userEventTriggered(io.netty.channel.ChannelHandlerContext ctx,
Object evt)
throws Exception
userEventTriggered in interface io.netty.channel.ChannelInboundHandleruserEventTriggered in class io.netty.channel.ChannelInboundHandlerAdapterExceptionCopyright © 2020. All rights reserved.