Top Description Fields Constructors Methods
reactor.netty.tcp

pack-priv final Class TcpClientBootstrap

extends Bootstrap
Class Inheritance
Annotations
@Deprecated
Imports
io.netty.bootstrap.Bootstrap, io.netty.channel.Channel, .ChannelFuture, .ChannelHandler, .ChannelOption, .EventLoopGroup, io.netty.resolver.AddressResolverGroup, io.netty.util.AttributeKey, io.netty.util.internal.SocketUtils, reactor.netty.NettyPipeline, java.net.InetAddress, .InetSocketAddress, .SocketAddress, java.util.function.Function

Deprecated

Use TcpClient methods for configurations. This class will be removed in version 1.1.0.

This class provides a migration for the TcpClient#bootstrap(Function) in 0.9.x.
Author
Violeta Georgieva

Field Summary

Modifier and TypeField and Description
pack-priv TcpClient

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public <T> Bootstrap
attr(AttributeKey<T> key, T value)

Overrides io.netty.bootstrap.AbstractBootstrap.attr.

Allow to specify an initial attribute of the newly created Channel.
public ChannelFuture
bind()

Overrides io.netty.bootstrap.AbstractBootstrap.bind.

Create a new Channel and bind it.
public ChannelFuture
bind(InetAddress inetHost, int inetPort)

Overrides io.netty.bootstrap.AbstractBootstrap.bind.

Create a new Channel and bind it.
public ChannelFuture
bind(int inetPort)

Overrides io.netty.bootstrap.AbstractBootstrap.bind.

Create a new Channel and bind it.
public ChannelFuture
bind(SocketAddress localAddress)

Overrides io.netty.bootstrap.AbstractBootstrap.bind.

Create a new Channel and bind it.
public ChannelFuture
bind(String inetHost, int inetPort)

Overrides io.netty.bootstrap.AbstractBootstrap.bind.

Create a new Channel and bind it.
public Bootstrap
channel(Class<? extends Channel> channelClass)

Overrides io.netty.bootstrap.AbstractBootstrap.channel.

The Class which is used to create Channel instances from.
public Bootstrap
channelFactory(ChannelFactory<? extends Channel> channelFactory)

Overrides io.netty.bootstrap.AbstractBootstrap.channelFactory.

Deprecated as a consequence of ChannelFactory being deprecated.
public Bootstrap
channelFactory(ChannelFactory<? extends Channel> channelFactory)

Overrides io.netty.bootstrap.AbstractBootstrap.channelFactory.

Deprecated as a consequence of ChannelFactory being deprecated.
io.netty.channel.ChannelFactory which is used to create Channel instances from when calling bind().
public Bootstrap
clone()

Overrides io.netty.bootstrap.Bootstrap.clone.

Returns a deep clone of this bootstrap which has the identical configuration.
public Bootstrap
clone(EventLoopGroup group)

Overrides io.netty.bootstrap.Bootstrap.clone.

Returns a deep clone of this bootstrap which has the identical configuration except that it uses the given EventLoopGroup.
public ChannelFuture
connect()

Overrides io.netty.bootstrap.Bootstrap.connect.

Connect a Channel to the remote peer.
public ChannelFuture
connect(InetAddress inetHost, int inetPort)

Overrides io.netty.bootstrap.Bootstrap.connect.

Connect a Channel to the remote peer.
public ChannelFuture
connect(SocketAddress remoteAddress)

Overrides io.netty.bootstrap.Bootstrap.connect.

Connect a Channel to the remote peer.
public ChannelFuture
connect(SocketAddress remoteAddress, SocketAddress localAddress)

Overrides io.netty.bootstrap.Bootstrap.connect.

Connect a Channel to the remote peer.
public ChannelFuture
connect(String inetHost, int inetPort)

Overrides io.netty.bootstrap.Bootstrap.connect.

Connect a Channel to the remote peer.
public boolean
equals(Object
the reference object with which to compare.
obj
)

Overrides java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.
protected void
finalize()

Overrides java.lang.Object.finalize.

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
public Bootstrap
group(EventLoopGroup group)

Overrides io.netty.bootstrap.AbstractBootstrap.group.

The EventLoopGroup which is used to handle all the events for the to-be-created Channel
public Bootstrap
handler(ChannelHandler handler)

Overrides io.netty.bootstrap.AbstractBootstrap.handler.

the ChannelHandler to use for serving the requests.
public int
hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value for the object.
public Bootstrap
public Bootstrap
public Bootstrap
localAddress(SocketAddress localAddress)

Overrides io.netty.bootstrap.AbstractBootstrap.localAddress.

The SocketAddress which is used to bind the local "end" to.
public Bootstrap
public <T> Bootstrap
option(ChannelOption<T> option, T value)

Overrides io.netty.bootstrap.AbstractBootstrap.option.

Allow to specify a ChannelOption which is used for the Channel instances once they got created.
public ChannelFuture
register()

Overrides io.netty.bootstrap.AbstractBootstrap.register.

Create a new Channel and register it with an EventLoop.
public Bootstrap
public Bootstrap
remoteAddress(SocketAddress remoteAddress)

Overrides io.netty.bootstrap.Bootstrap.remoteAddress.

The SocketAddress to connect to once the connect() method is called.
public Bootstrap
public Bootstrap
resolver(AddressResolverGroup<?>
the NameResolver for this Bootstrap; may be null, in which case a default resolver will be used
resolver
)

Overrides io.netty.bootstrap.Bootstrap.resolver.

Sets the NameResolver which will resolve the address of the unresolved named address.
public String
toString()

Overrides io.netty.bootstrap.AbstractBootstrap.toString.

Returns a string representation of the object.
public Bootstrap
validate()

Overrides io.netty.bootstrap.Bootstrap.validate.

Validate all the parameters.
Inherited from io.netty.bootstrap.Bootstrap:
configdisableResolver

Field Detail

tcpClientback to summary
pack-priv TcpClient tcpClient

Constructor Detail

TcpClientBootstrapback to summary
pack-priv TcpClientBootstrap(TcpClient tcpClient)

Method Detail

attrback to summary
public <T> Bootstrap attr(AttributeKey<T> key, T value)

Overrides io.netty.bootstrap.AbstractBootstrap.attr.

Doc from io.netty.bootstrap.AbstractBootstrap.attr.

Allow to specify an initial attribute of the newly created Channel. If the value is null, the attribute of the specified key is removed.

Annotations
@Override
bindback to summary
public ChannelFuture bind()

Overrides io.netty.bootstrap.AbstractBootstrap.bind.

Doc from io.netty.bootstrap.AbstractBootstrap.bind.

Create a new Channel and bind it.

Annotations
@Override
bindback to summary
public ChannelFuture bind(InetAddress inetHost, int inetPort)

Overrides io.netty.bootstrap.AbstractBootstrap.bind.

Doc from io.netty.bootstrap.AbstractBootstrap.bind.

Create a new Channel and bind it.

Annotations
@Override
bindback to summary
public ChannelFuture bind(int inetPort)

Overrides io.netty.bootstrap.AbstractBootstrap.bind.

Doc from io.netty.bootstrap.AbstractBootstrap.bind.

Create a new Channel and bind it.

Annotations
@Override
bindback to summary
public ChannelFuture bind(SocketAddress localAddress)

Overrides io.netty.bootstrap.AbstractBootstrap.bind.

Doc from io.netty.bootstrap.AbstractBootstrap.bind.

Create a new Channel and bind it.

Annotations
@Override
bindback to summary
public ChannelFuture bind(String inetHost, int inetPort)

Overrides io.netty.bootstrap.AbstractBootstrap.bind.

Doc from io.netty.bootstrap.AbstractBootstrap.bind.

Create a new Channel and bind it.

Annotations
@Override
channelback to summary
public Bootstrap channel(Class<? extends Channel> channelClass)

Overrides io.netty.bootstrap.AbstractBootstrap.channel.

Doc from io.netty.bootstrap.AbstractBootstrap.channel.

The Class which is used to create Channel instances from. You either use this or channelFactory(io.netty.channel.ChannelFactory) if your Channel implementation has no no-args constructor.

Annotations
@Override
channelFactoryback to summary
public Bootstrap channelFactory(ChannelFactory<? extends Channel> channelFactory)

Overrides io.netty.bootstrap.AbstractBootstrap.channelFactory.

Deprecated

as a consequence of ChannelFactory being deprecated. See corresponding docs for further information.

Annotations
@Override
@SuppressWarnings:deprecation
channelFactoryback to summary
public Bootstrap channelFactory(ChannelFactory<? extends Channel> channelFactory)

Overrides io.netty.bootstrap.AbstractBootstrap.channelFactory.

Doc from io.netty.bootstrap.AbstractBootstrap.channelFactory.

Deprecated

as a consequence of ChannelFactory being deprecated. See corresponding docs for further information.

io.netty.channel.ChannelFactory which is used to create Channel instances from when calling bind(). This method is usually only used if channel(Class) is not working for you because of some more complex needs. If your Channel implementation has a no-args constructor, its highly recommend to just use channel(Class) to simplify your code.

Annotations
@Override
cloneback to summary
public Bootstrap clone()

Overrides io.netty.bootstrap.Bootstrap.clone.

Doc from io.netty.bootstrap.AbstractBootstrap.clone.

Returns a deep clone of this bootstrap which has the identical configuration. This method is useful when making multiple Channels with similar settings. Please note that this method does not clone the EventLoopGroup deeply but shallowly, making the group a shared resource.

Returns:Bootstrap

Doc from java.lang.Object.clone.

a clone of this instance.

Annotations
@Override
cloneback to summary
public Bootstrap clone(EventLoopGroup group)

Overrides io.netty.bootstrap.Bootstrap.clone.

Doc from io.netty.bootstrap.Bootstrap.clone.

Returns a deep clone of this bootstrap which has the identical configuration except that it uses the given EventLoopGroup. This method is useful when making multiple Channels with similar settings.

Annotations
@Override
connectback to summary
public ChannelFuture connect()

Overrides io.netty.bootstrap.Bootstrap.connect.

Doc from io.netty.bootstrap.Bootstrap.connect.

Connect a Channel to the remote peer.

Annotations
@Override
connectback to summary
public ChannelFuture connect(InetAddress inetHost, int inetPort)

Overrides io.netty.bootstrap.Bootstrap.connect.

Doc from io.netty.bootstrap.Bootstrap.connect.

Connect a Channel to the remote peer.

Annotations
@Override
connectback to summary
public ChannelFuture connect(SocketAddress remoteAddress)

Overrides io.netty.bootstrap.Bootstrap.connect.

Doc from io.netty.bootstrap.Bootstrap.connect.

Connect a Channel to the remote peer.

Annotations
@Override
connectback to summary
public ChannelFuture connect(SocketAddress remoteAddress, SocketAddress localAddress)

Overrides io.netty.bootstrap.Bootstrap.connect.

Doc from io.netty.bootstrap.Bootstrap.connect.

Connect a Channel to the remote peer.

Annotations
@Override
connectback to summary
public ChannelFuture connect(String inetHost, int inetPort)

Overrides io.netty.bootstrap.Bootstrap.connect.

Doc from io.netty.bootstrap.Bootstrap.connect.

Connect a Channel to the remote peer.

Annotations
@Override
equalsback to summary
public boolean equals(Object obj)

Overrides java.lang.Object.equals.

Doc from java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

The equals method implements an equivalence relation on non-null object references:

  • It is reflexive: for any non-null reference value x, x.equals(x) should return true.
  • It is symmetric: for any non-null reference values x and y, x.equals(y) should return true if and only if y.equals(x) returns true.
  • It is transitive: for any non-null reference values x, y, and z, if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.
  • It is consistent: for any non-null reference values x and y, multiple invocations of x.equals(y) consistently return true or consistently return false, provided no information used in equals comparisons on the objects is modified.
  • For any non-null reference value x, x.equals(null) should return false.

An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.

Parameters
obj:Object

the reference object with which to compare.

Returns:boolean

true if this object is the same as the obj argument; false otherwise.

Annotations
@Override
finalizeback to summary
protected void finalize()

Overrides java.lang.Object.finalize.

Doc from java.lang.Object.finalize.

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object. A subclass overrides the finalize method to dispose of system resources or to perform other cleanup.

When running in a Java virtual machine in which finalization has been disabled or removed, the garbage collector will never call finalize(). In a Java virtual machine in which finalization is enabled, the garbage collector might call finalize only after an indefinite delay.

The general contract of finalize is that it is invoked if and when the Java virtual machine has determined that there is no longer any means by which this object can be accessed by any thread that has not yet died, except as a result of an action taken by the finalization of some other object or class which is ready to be finalized. The finalize method may take any action, including making this object available again to other threads; the usual purpose of finalize, however, is to perform cleanup actions before the object is irrevocably discarded. For example, the finalize method for an object that represents an input/output connection might perform explicit I/O transactions to break the connection before the object is permanently discarded.

The finalize method of class Object performs no special action; it simply returns normally. Subclasses of Object may override this definition.

The Java programming language does not guarantee which thread will invoke the finalize method for any given object. It is guaranteed, however, that the thread that invokes finalize will not be holding any user-visible synchronization locks when finalize is invoked. If an uncaught exception is thrown by the finalize method, the exception is ignored and finalization of that object terminates.

After the finalize method has been invoked for an object, no further action is taken until the Java virtual machine has again determined that there is no longer any means by which this object can be accessed by any thread that has not yet died, including possible actions by other objects or classes which are ready to be finalized, at which point the object may be discarded.

The finalize method is never invoked more than once by a Java virtual machine for any given object.

Any exception thrown by the finalize method causes the finalization of this object to be halted, but is otherwise ignored.

Annotations
@Override
groupback to summary
public Bootstrap group(EventLoopGroup group)

Overrides io.netty.bootstrap.AbstractBootstrap.group.

Doc from io.netty.bootstrap.AbstractBootstrap.group.

The EventLoopGroup which is used to handle all the events for the to-be-created Channel

Annotations
@Override
handlerback to summary
public Bootstrap handler(ChannelHandler handler)

Overrides io.netty.bootstrap.AbstractBootstrap.handler.

Doc from io.netty.bootstrap.AbstractBootstrap.handler.

the ChannelHandler to use for serving the requests.

Annotations
@Override
hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Doc from java.lang.Object.hashCode.

Returns a hash code value for the object. This method is supported for the benefit of hash tables such as those provided by java.util.HashMap.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the equals method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.
Returns:int

a hash code value for this object.

Annotations
@Override
localAddressback to summary
public Bootstrap localAddress(InetAddress inetHost, int inetPort)

Overrides io.netty.bootstrap.AbstractBootstrap.localAddress.

Annotations
@Override
localAddressback to summary
public Bootstrap localAddress(int inetPort)

Overrides io.netty.bootstrap.AbstractBootstrap.localAddress.

Annotations
@Override
localAddressback to summary
public Bootstrap localAddress(SocketAddress localAddress)

Overrides io.netty.bootstrap.AbstractBootstrap.localAddress.

Doc from io.netty.bootstrap.AbstractBootstrap.localAddress.

The SocketAddress which is used to bind the local "end" to.

Annotations
@Override
localAddressback to summary
public Bootstrap localAddress(String inetHost, int inetPort)

Overrides io.netty.bootstrap.AbstractBootstrap.localAddress.

Annotations
@Override
optionback to summary
public <T> Bootstrap option(ChannelOption<T> option, T value)

Overrides io.netty.bootstrap.AbstractBootstrap.option.

Doc from io.netty.bootstrap.AbstractBootstrap.option.

Allow to specify a ChannelOption which is used for the Channel instances once they got created. Use a value of null to remove a previous set ChannelOption.

Annotations
@Override
registerback to summary
public ChannelFuture register()

Overrides io.netty.bootstrap.AbstractBootstrap.register.

Doc from io.netty.bootstrap.AbstractBootstrap.register.

Create a new Channel and register it with an EventLoop.

Annotations
@Override
remoteAddressback to summary
public Bootstrap remoteAddress(InetAddress inetHost, int inetPort)

Overrides io.netty.bootstrap.Bootstrap.remoteAddress.

Annotations
@Override
remoteAddressback to summary
public Bootstrap remoteAddress(SocketAddress remoteAddress)

Overrides io.netty.bootstrap.Bootstrap.remoteAddress.

Doc from io.netty.bootstrap.Bootstrap.remoteAddress.

The SocketAddress to connect to once the connect() method is called.

Annotations
@Override
remoteAddressback to summary
public Bootstrap remoteAddress(String inetHost, int inetPort)

Overrides io.netty.bootstrap.Bootstrap.remoteAddress.

Annotations
@Override
resolverback to summary
public Bootstrap resolver(AddressResolverGroup<?> resolver)

Overrides io.netty.bootstrap.Bootstrap.resolver.

Doc from io.netty.bootstrap.Bootstrap.resolver.

Sets the NameResolver which will resolve the address of the unresolved named address.

Parameters
resolver:AddressResolverGroup<?>

the NameResolver for this Bootstrap; may be null, in which case a default resolver will be used

Annotations
@Override
toStringback to summary
public String toString()

Overrides io.netty.bootstrap.AbstractBootstrap.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

Annotations
@Override
validateback to summary
public Bootstrap validate()

Overrides io.netty.bootstrap.Bootstrap.validate.

Doc from io.netty.bootstrap.AbstractBootstrap.validate.

Validate all the parameters. Sub-classes may override this, but should call the super method in that case.

Annotations
@Override