public final class TransportConnector
extends java.lang.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 reactor.core.publisher.Mono<io.netty.channel.Channel> |
bind(TransportConfig config,
io.netty.channel.ChannelInitializer<io.netty.channel.Channel> channelInitializer,
java.net.SocketAddress bindAddress,
boolean isDomainSocket)
Binds a
Channel. |
static reactor.core.publisher.Mono<io.netty.channel.Channel> |
connect(TransportConfig config,
java.net.SocketAddress remoteAddress,
io.netty.resolver.AddressResolverGroup<?> resolverGroup,
io.netty.channel.ChannelInitializer<io.netty.channel.Channel> channelInitializer)
Connect a
Channel to the remote peer. |
public static reactor.core.publisher.Mono<io.netty.channel.Channel> bind(TransportConfig config, io.netty.channel.ChannelInitializer<io.netty.channel.Channel> channelInitializer, java.net.SocketAddress bindAddress, boolean isDomainSocket)
Channel.config - the transport configurationchannelInitializer - the ChannelInitializer that will be used for initializing the channel pipelinebindAddress - the local addressMono of Channelpublic static reactor.core.publisher.Mono<io.netty.channel.Channel> connect(TransportConfig config, java.net.SocketAddress remoteAddress, io.netty.resolver.AddressResolverGroup<?> resolverGroup, io.netty.channel.ChannelInitializer<io.netty.channel.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