Top Description Fields Constructors Methods
io.netty5.handler.address

public Class ResolveAddressHandler

extends Object
implements ChannelHandler
Class Inheritance
All Implemented Interfaces
io.netty5.channel.ChannelHandler
Imports
io.netty5.channel.ChannelHandler, .ChannelHandlerContext, io.netty5.resolver.AddressResolver, .AddressResolverGroup, io.netty5.util.concurrent.Future, .FutureListener, .Promise, java.net.SocketAddress, java.util.Objects

ChannelHandler which will resolve the SocketAddress that is passed to connect(ChannelHandlerContext, SocketAddress, SocketAddress) if it is not already resolved and the AddressResolver supports the type of SocketAddress.

Field Summary

Modifier and TypeField and Description
private final AddressResolverGroup<? extends SocketAddress>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Future<Void>
connect(final ChannelHandlerContext
the ChannelHandlerContext for which the connect operation is made
ctx
,
SocketAddress
the SocketAddress to which it should connect
remoteAddress
,
final SocketAddress
the SocketAddress which is used as source on connect
localAddress
)

Overrides default io.netty5.channel.ChannelHandler.connect.

Called once a connect operation is made.
public boolean
isSharable()

Overrides default io.netty5.channel.ChannelHandler.isSharable.

Returns true if this handler is sharable and thus can be added to more than one ChannelPipeline.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

resolverGroupback to summary
private final AddressResolverGroup<? extends SocketAddress> resolverGroup

Constructor Detail

ResolveAddressHandlerback to summary
public ResolveAddressHandler(AddressResolverGroup<? extends SocketAddress> resolverGroup)

Method Detail

connectback to summary
public Future<Void> connect(final ChannelHandlerContext ctx, SocketAddress remoteAddress, final SocketAddress localAddress)

Overrides default io.netty5.channel.ChannelHandler.connect.

Doc from io.netty5.channel.ChannelHandler.connect.

Called once a connect operation is made.

Parameters
ctx:ChannelHandlerContext

the ChannelHandlerContext for which the connect operation is made

remoteAddress:SocketAddress

the SocketAddress to which it should connect

localAddress:SocketAddress

the SocketAddress which is used as source on connect

Returns:Future<Void>

the Future which will be notified once the operation completes.

Annotations
@Override
isSharableback to summary
public boolean isSharable()

Overrides default io.netty5.channel.ChannelHandler.isSharable.

Doc from io.netty5.channel.ChannelHandler.isSharable.

Returns true if this handler is sharable and thus can be added to more than one ChannelPipeline. By default, this method returns false. If this method returns false, 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.

Annotations
@Override