Class Bootstrap
- All Implemented Interfaces:
Cloneable
A
Bootstrap that makes it easy to bootstrap a Channel to use
for clients.
The AbstractBootstrap.bind() methods are useful in combination with connectionless transports such as datagram (UDP).
For regular TCP connections, please use the provided connect() methods.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()Returns a deep clone of this bootstrap which has the identical configuration.clone(EventLoopGroup group) Returns a deep clone of this bootstrap which has the identical configuration except that it uses the givenEventLoopGroup.final BootstrapConfigconfig()Returns theAbstractBootstrapConfigobject that can be used to obtain the current config of the bootstrap.connect()Connect aChannelto the remote peer.Connect aChannelto the remote peer.connect(InetAddress inetHost, int inetPort) Connect aChannelto the remote peer.connect(SocketAddress remoteAddress) Connect aChannelto the remote peer.connect(SocketAddress remoteAddress, SocketAddress localAddress) Connect aChannelto the remote peer.Disables address name resolution.remoteAddress(String inetHost, int inetPort) remoteAddress(InetAddress inetHost, int inetPort) remoteAddress(SocketAddress remoteAddress) TheSocketAddressto connect to once theconnect()method is called.resolver(AddressResolverGroup<?> resolver) Sets theNameResolverwhich will resolve the address of the unresolved named address.validate()Validate all the parameters.Methods inherited from class AbstractBootstrap
attr, bind, bind, bind, bind, bind, channel, channelFactory, channelFactory, extensionsClassLoader, group, group, handler, localAddress, localAddress, localAddress, localAddress, option, register, toString
-
Constructor Details
-
Bootstrap
public Bootstrap()
-
-
Method Details
-
resolver
Sets theNameResolverwhich will resolve the address of the unresolved named address.- Parameters:
resolver- theNameResolverfor thisBootstrap; may benull, in which case a default resolver will be used- See Also:
-
disableResolver
Disables address name resolution. Name resolution may be re-enabled withresolver(AddressResolverGroup) -
remoteAddress
TheSocketAddressto connect to once theconnect()method is called. -
remoteAddress
-
remoteAddress
- See Also:
-
connect
Connect aChannelto the remote peer. -
connect
Connect aChannelto the remote peer. -
connect
Connect aChannelto the remote peer. -
connect
Connect aChannelto the remote peer. -
connect
Connect aChannelto the remote peer. -
validate
Description copied from class:AbstractBootstrapValidate all the parameters. Sub-classes may override this, but should call the super method in that case.- Overrides:
validatein classAbstractBootstrap<Bootstrap, Channel>
-
clone
Description copied from class:AbstractBootstrapReturns a deep clone of this bootstrap which has the identical configuration. This method is useful when making multipleChannels with similar settings. Please note that this method does not clone theEventLoopGroupdeeply but shallowly, making the group a shared resource.- Specified by:
clonein classAbstractBootstrap<Bootstrap, Channel>
-
clone
Returns a deep clone of this bootstrap which has the identical configuration except that it uses the givenEventLoopGroup. This method is useful when making multipleChannels with similar settings. -
config
Description copied from class:AbstractBootstrapReturns theAbstractBootstrapConfigobject that can be used to obtain the current config of the bootstrap.- Specified by:
configin classAbstractBootstrap<Bootstrap, Channel>
-