Package io.netty.handler.address
Class ResolveAddressHandler
- java.lang.Object
-
- io.netty.channel.ChannelHandlerAdapter
-
- io.netty.channel.ChannelOutboundHandlerAdapter
-
- io.netty.handler.address.ResolveAddressHandler
-
- All Implemented Interfaces:
ChannelHandler
,ChannelOutboundHandler
@Sharable public class ResolveAddressHandler extends ChannelOutboundHandlerAdapter
ChannelOutboundHandlerAdapter
which will resolve theSocketAddress
that is passed toconnect(ChannelHandlerContext, SocketAddress, SocketAddress, ChannelPromise)
if it is not already resolved and theAddressResolver
supports the type ofSocketAddress
.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler
ChannelHandler.Sharable
-
-
Constructor Summary
Constructors Constructor Description ResolveAddressHandler(AddressResolverGroup<? extends java.net.SocketAddress> resolverGroup)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
connect(ChannelHandlerContext ctx, java.net.SocketAddress remoteAddress, java.net.SocketAddress localAddress, ChannelPromise promise)
CallsChannelOutboundInvoker.connect(SocketAddress, SocketAddress, ChannelPromise)
to forward to the nextChannelOutboundHandler
in theChannelPipeline
.-
Methods inherited from class io.netty.channel.ChannelOutboundHandlerAdapter
bind, close, deregister, disconnect, flush, read, write
-
Methods inherited from class io.netty.channel.ChannelHandlerAdapter
ensureNotSharable, exceptionCaught, handlerAdded, handlerRemoved, isSharable
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.netty.channel.ChannelHandler
exceptionCaught, handlerAdded, handlerRemoved
-
-
-
-
Constructor Detail
-
ResolveAddressHandler
public ResolveAddressHandler(AddressResolverGroup<? extends java.net.SocketAddress> resolverGroup)
-
-
Method Detail
-
connect
public void connect(ChannelHandlerContext ctx, java.net.SocketAddress remoteAddress, java.net.SocketAddress localAddress, ChannelPromise promise)
Description copied from class:ChannelOutboundHandlerAdapter
CallsChannelOutboundInvoker.connect(SocketAddress, SocketAddress, ChannelPromise)
to forward to the nextChannelOutboundHandler
in theChannelPipeline
. Sub-classes may override this method to change behavior.- Specified by:
connect
in interfaceChannelOutboundHandler
- Overrides:
connect
in classChannelOutboundHandlerAdapter
- Parameters:
ctx
- theChannelHandlerContext
for which the connect operation is maderemoteAddress
- theSocketAddress
to which it should connectlocalAddress
- theSocketAddress
which is used as source on connectpromise
- theChannelPromise
to notify once the operation completes
-
-