Package reactor.netty.transport
Class TransportConnector
java.lang.Object
reactor.netty.transport.TransportConnector
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.- Since:
- 1.0.0
- Author:
- Stephane Maldini, Violeta Georgieva
-
Method Summary
Modifier and TypeMethodDescriptionbind
(TransportConfig config, ChannelInitializer<Channel> channelInitializer, SocketAddress bindAddress, boolean isDomainSocket) Binds aChannel
.connect
(TransportConfig config, SocketAddress remoteAddress, AddressResolverGroup<?> resolverGroup, ChannelInitializer<Channel> channelInitializer) Connect aChannel
to the remote peer.connect
(TransportConfig config, SocketAddress remoteAddress, AddressResolverGroup<?> resolverGroup, ChannelInitializer<Channel> channelInitializer, EventLoop eventLoop) Connect aChannel
to the remote peer.connect
(TransportConfig config, SocketAddress remoteAddress, AddressResolverGroup<?> resolverGroup, ChannelInitializer<Channel> channelInitializer, EventLoop eventLoop, ContextView contextView) Connect aChannel
to the remote peer.connect
(TransportConfig config, SocketAddress remoteAddress, AddressResolverGroup<?> resolverGroup, ChannelInitializer<Channel> channelInitializer, ContextView contextView) Connect aChannel
to the remote peer.
-
Method Details
-
bind
public static Mono<Channel> bind(TransportConfig config, ChannelInitializer<Channel> channelInitializer, SocketAddress bindAddress, boolean isDomainSocket) Binds aChannel
.- Parameters:
config
- the transport configurationchannelInitializer
- theChannelInitializer
that will be used for initializing the channel pipelinebindAddress
- the local addressisDomainSocket
- true ifDomainSocketChannel
orServerDomainSocketChannel
is needed, false otherwise- Returns:
- a
Mono
ofChannel
-
connect
public static Mono<Channel> connect(TransportConfig config, SocketAddress remoteAddress, AddressResolverGroup<?> resolverGroup, ChannelInitializer<Channel> channelInitializer) Connect aChannel
to the remote peer.- Parameters:
config
- the transport configurationremoteAddress
- theSocketAddress
to connect toresolverGroup
- the resolver which will resolve the address of the unresolved named addresschannelInitializer
- theChannelInitializer
that will be used for initializing the channel pipeline- Returns:
- a
Mono
ofChannel
-
connect
public static Mono<Channel> connect(TransportConfig config, SocketAddress remoteAddress, AddressResolverGroup<?> resolverGroup, ChannelInitializer<Channel> channelInitializer, ContextView contextView) Connect aChannel
to the remote peer.- Parameters:
config
- the transport configurationremoteAddress
- theSocketAddress
to connect toresolverGroup
- the resolver which will resolve the address of the unresolved named addresschannelInitializer
- theChannelInitializer
that will be used for initializing the channel pipelinecontextView
- the currentContextView
- Returns:
- a
Mono
ofChannel
- Since:
- 1.0.26
-
connect
public static Mono<Channel> connect(TransportConfig config, SocketAddress remoteAddress, AddressResolverGroup<?> resolverGroup, ChannelInitializer<Channel> channelInitializer, EventLoop eventLoop) Connect aChannel
to the remote peer.- Parameters:
config
- the transport configurationremoteAddress
- theSocketAddress
to connect toresolverGroup
- the resolver which will resolve the address of the unresolved named addresschannelInitializer
- theChannelInitializer
that will be used for initializing the channel pipelineeventLoop
- theEventLoop
to use for handling the channel.- Returns:
- a
Mono
ofChannel
-
connect
public static Mono<Channel> connect(TransportConfig config, SocketAddress remoteAddress, AddressResolverGroup<?> resolverGroup, ChannelInitializer<Channel> channelInitializer, EventLoop eventLoop, ContextView contextView) Connect aChannel
to the remote peer.- Parameters:
config
- the transport configurationremoteAddress
- theSocketAddress
to connect toresolverGroup
- the resolver which will resolve the address of the unresolved named addresschannelInitializer
- theChannelInitializer
that will be used for initializing the channel pipelineeventLoop
- theEventLoop
to use for handling the channel.contextView
- the currentContextView
- Returns:
- a
Mono
ofChannel
- Since:
- 1.0.26
-