@ChannelHandler.Sharable
public class ConnectionEventHandler
extends io.netty.channel.ChannelDuplexHandler
| Modifier and Type | Class and Description |
|---|---|
class |
ConnectionEventHandler.ConnectionEventExecutor
Dispatch connection event.
|
| Constructor and Description |
|---|
ConnectionEventHandler() |
ConnectionEventHandler(Configuration configuration) |
| Modifier and Type | Method and Description |
|---|---|
void |
channelActive(io.netty.channel.ChannelHandlerContext ctx) |
void |
channelInactive(io.netty.channel.ChannelHandlerContext ctx) |
void |
channelRegistered(io.netty.channel.ChannelHandlerContext ctx) |
void |
channelUnregistered(io.netty.channel.ChannelHandlerContext ctx) |
void |
close(io.netty.channel.ChannelHandlerContext ctx,
io.netty.channel.ChannelPromise promise) |
void |
connect(io.netty.channel.ChannelHandlerContext ctx,
SocketAddress remoteAddress,
SocketAddress localAddress,
io.netty.channel.ChannelPromise promise) |
void |
disconnect(io.netty.channel.ChannelHandlerContext ctx,
io.netty.channel.ChannelPromise promise) |
void |
exceptionCaught(io.netty.channel.ChannelHandlerContext ctx,
Throwable cause) |
ConnectionEventListener |
getConnectionEventListener() |
ConnectionManager |
getConnectionManager() |
void |
setConnectionEventListener(ConnectionEventListener listener) |
void |
setConnectionManager(ConnectionManager connectionManager) |
void |
setReconnectManager(ReconnectManager reconnectManager)
Deprecated.
|
void |
setReconnector(Reconnector reconnector) |
void |
userEventTriggered(io.netty.channel.ChannelHandlerContext ctx,
Object event) |
bind, deregister, flush, read, writechannelRead, channelReadComplete, channelWritabilityChangedensureNotSharable, handlerAdded, handlerRemoved, isSharablepublic ConnectionEventHandler()
public ConnectionEventHandler(Configuration configuration)
public void connect(io.netty.channel.ChannelHandlerContext ctx,
SocketAddress remoteAddress,
SocketAddress localAddress,
io.netty.channel.ChannelPromise promise)
throws Exception
connect in interface io.netty.channel.ChannelOutboundHandlerconnect in class io.netty.channel.ChannelDuplexHandlerExceptionChannelDuplexHandler.connect(io.netty.channel.ChannelHandlerContext, java.net.SocketAddress, java.net.SocketAddress, io.netty.channel.ChannelPromise)public void disconnect(io.netty.channel.ChannelHandlerContext ctx,
io.netty.channel.ChannelPromise promise)
throws Exception
disconnect in interface io.netty.channel.ChannelOutboundHandlerdisconnect in class io.netty.channel.ChannelDuplexHandlerExceptionChannelDuplexHandler.disconnect(io.netty.channel.ChannelHandlerContext, io.netty.channel.ChannelPromise)public void close(io.netty.channel.ChannelHandlerContext ctx,
io.netty.channel.ChannelPromise promise)
throws Exception
close in interface io.netty.channel.ChannelOutboundHandlerclose in class io.netty.channel.ChannelDuplexHandlerExceptionChannelDuplexHandler.close(io.netty.channel.ChannelHandlerContext, io.netty.channel.ChannelPromise)public void channelRegistered(io.netty.channel.ChannelHandlerContext ctx)
throws Exception
channelRegistered in interface io.netty.channel.ChannelInboundHandlerchannelRegistered in class io.netty.channel.ChannelInboundHandlerAdapterExceptionChannelInboundHandlerAdapter.channelRegistered(io.netty.channel.ChannelHandlerContext)public void channelUnregistered(io.netty.channel.ChannelHandlerContext ctx)
throws Exception
channelUnregistered in interface io.netty.channel.ChannelInboundHandlerchannelUnregistered in class io.netty.channel.ChannelInboundHandlerAdapterExceptionpublic void channelActive(io.netty.channel.ChannelHandlerContext ctx)
throws Exception
channelActive in interface io.netty.channel.ChannelInboundHandlerchannelActive in class io.netty.channel.ChannelInboundHandlerAdapterExceptionpublic void channelInactive(io.netty.channel.ChannelHandlerContext ctx)
throws Exception
channelInactive in interface io.netty.channel.ChannelInboundHandlerchannelInactive in class io.netty.channel.ChannelInboundHandlerAdapterExceptionpublic void userEventTriggered(io.netty.channel.ChannelHandlerContext ctx,
Object event)
throws Exception
userEventTriggered in interface io.netty.channel.ChannelInboundHandleruserEventTriggered in class io.netty.channel.ChannelInboundHandlerAdapterExceptionpublic void exceptionCaught(io.netty.channel.ChannelHandlerContext ctx,
Throwable cause)
throws Exception
exceptionCaught in interface io.netty.channel.ChannelHandlerexceptionCaught in interface io.netty.channel.ChannelInboundHandlerexceptionCaught in class io.netty.channel.ChannelInboundHandlerAdapterExceptionpublic ConnectionEventListener getConnectionEventListener()
public void setConnectionEventListener(ConnectionEventListener listener)
public ConnectionManager getConnectionManager()
public void setConnectionManager(ConnectionManager connectionManager)
@Deprecated public void setReconnectManager(ReconnectManager reconnectManager)
setReconnector(Reconnector) insteadreconnectManager - value to be assigned to property reconnectManagerpublic void setReconnector(Reconnector reconnector)
Copyright © 2024. All rights reserved.