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 aChannelto the remote peer.connect(TransportConfig config, SocketAddress remoteAddress, AddressResolverGroup<?> resolverGroup, ChannelInitializer<Channel> channelInitializer, EventLoop eventLoop) Connect aChannelto the remote peer.connect(TransportConfig config, SocketAddress remoteAddress, AddressResolverGroup<?> resolverGroup, ChannelInitializer<Channel> channelInitializer, EventLoop eventLoop, ContextView contextView) Connect aChannelto the remote peer.connect(TransportConfig config, SocketAddress remoteAddress, AddressResolverGroup<?> resolverGroup, ChannelInitializer<Channel> channelInitializer, ContextView contextView) Connect aChannelto 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- theChannelInitializerthat will be used for initializing the channel pipelinebindAddress- the local addressisDomainSocket- true ifDomainSocketChannelorServerDomainSocketChannelis needed, false otherwise- Returns:
- a
MonoofChannel
-
connect
public static Mono<Channel> connect(TransportConfig config, SocketAddress remoteAddress, AddressResolverGroup<?> resolverGroup, ChannelInitializer<Channel> channelInitializer) Connect aChannelto the remote peer.- Parameters:
config- the transport configurationremoteAddress- theSocketAddressto connect toresolverGroup- the resolver which will resolve the address of the unresolved named addresschannelInitializer- theChannelInitializerthat will be used for initializing the channel pipeline- Returns:
- a
MonoofChannel
-
connect
public static Mono<Channel> connect(TransportConfig config, SocketAddress remoteAddress, AddressResolverGroup<?> resolverGroup, ChannelInitializer<Channel> channelInitializer, ContextView contextView) Connect aChannelto the remote peer.- Parameters:
config- the transport configurationremoteAddress- theSocketAddressto connect toresolverGroup- the resolver which will resolve the address of the unresolved named addresschannelInitializer- theChannelInitializerthat will be used for initializing the channel pipelinecontextView- the currentContextView- Returns:
- a
MonoofChannel - Since:
- 1.0.26
-
connect
public static Mono<Channel> connect(TransportConfig config, SocketAddress remoteAddress, AddressResolverGroup<?> resolverGroup, ChannelInitializer<Channel> channelInitializer, EventLoop eventLoop) Connect aChannelto the remote peer.- Parameters:
config- the transport configurationremoteAddress- theSocketAddressto connect toresolverGroup- the resolver which will resolve the address of the unresolved named addresschannelInitializer- theChannelInitializerthat will be used for initializing the channel pipelineeventLoop- theEventLoopto use for handling the channel.- Returns:
- a
MonoofChannel
-
connect
public static Mono<Channel> connect(TransportConfig config, SocketAddress remoteAddress, AddressResolverGroup<?> resolverGroup, ChannelInitializer<Channel> channelInitializer, EventLoop eventLoop, ContextView contextView) Connect aChannelto the remote peer.- Parameters:
config- the transport configurationremoteAddress- theSocketAddressto connect toresolverGroup- the resolver which will resolve the address of the unresolved named addresschannelInitializer- theChannelInitializerthat will be used for initializing the channel pipelineeventLoop- theEventLoopto use for handling the channel.contextView- the currentContextView- Returns:
- a
MonoofChannel - Since:
- 1.0.26
-