- java.lang.Object
-
- io.netty5.handler.address.ResolveAddressHandler
-
- All Implemented Interfaces:
ChannelHandler
public class ResolveAddressHandler extends Object implements ChannelHandler
ChannelHandlerwhich will resolve theSocketAddressthat is passed toconnect(ChannelHandlerContext, SocketAddress, SocketAddress)if it is not already resolved and theAddressResolversupports the type ofSocketAddress.
-
-
Constructor Summary
Constructors Constructor Description ResolveAddressHandler(AddressResolverGroup<? extends SocketAddress> resolverGroup)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Future<Void>connect(ChannelHandlerContext ctx, SocketAddress remoteAddress, SocketAddress localAddress)Called once a connect operation is made.booleanisSharable()Returnstrueif this handler is sharable and thus can be added to more than oneChannelPipeline.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.netty5.channel.ChannelHandler
bind, channelActive, channelExceptionCaught, channelInactive, channelInboundEvent, channelRead, channelReadComplete, channelRegistered, channelShutdown, channelUnregistered, channelWritabilityChanged, close, deregister, disconnect, flush, handlerAdded, handlerRemoved, pendingOutboundBytes, read, register, sendOutboundEvent, shutdown, write
-
-
-
-
Constructor Detail
-
ResolveAddressHandler
public ResolveAddressHandler(AddressResolverGroup<? extends SocketAddress> resolverGroup)
-
-
Method Detail
-
isSharable
public boolean isSharable()
Description copied from interface:ChannelHandlerReturnstrueif this handler is sharable and thus can be added to more than oneChannelPipeline. By default, this method returnsfalse. If this method returnsfalse, you have to create a new handler instance every time you add it to a pipeline because it has unshared state such as member variables.- Specified by:
isSharablein interfaceChannelHandler
-
connect
public Future<Void> connect(ChannelHandlerContext ctx, SocketAddress remoteAddress, SocketAddress localAddress)
Description copied from interface:ChannelHandlerCalled once a connect operation is made.- Specified by:
connectin interfaceChannelHandler- Parameters:
ctx- theChannelHandlerContextfor which the connect operation is maderemoteAddress- theSocketAddressto which it should connectlocalAddress- theSocketAddresswhich is used as source on connect- Returns:
- the
Futurewhich will be notified once the operation completes.
-
-