public final class TransportConnector extends Object
TransportConnector
is a helper class that creates, initializes and registers the channel.
It performs the actual connect operation to the remote peer or binds the channel.Modifier and Type | Method and Description |
---|---|
static Mono<Channel> |
bind(TransportConfig config,
ChannelInitializer<Channel> channelInitializer,
SocketAddress bindAddress,
boolean isDomainSocket)
Binds a
Channel . |
static Mono<Channel> |
connect(TransportConfig config,
SocketAddress remoteAddress,
AddressResolverGroup<?> resolverGroup,
ChannelInitializer<Channel> channelInitializer)
Connect a
Channel to the remote peer. |
public static Mono<Channel> bind(TransportConfig config, ChannelInitializer<Channel> channelInitializer, SocketAddress bindAddress, boolean isDomainSocket)
Channel
.config
- the transport configurationchannelInitializer
- the ChannelInitializer
that will be used for initializing the channel pipelinebindAddress
- the local addressMono
of Channel
public static Mono<Channel> connect(TransportConfig config, SocketAddress remoteAddress, AddressResolverGroup<?> resolverGroup, ChannelInitializer<Channel> channelInitializer)
Channel
to the remote peer.config
- the transport configurationremoteAddress
- the SocketAddress
to connect toresolverGroup
- the resolver which will resolve the address of the unresolved named addresschannelInitializer
- the ChannelInitializer
that will be used for initializing the channel pipelineMono
of Channel