Interface Client
- All Superinterfaces:
- AutoCloseable
- All Known Implementing Classes:
- ClientInstance
- 
Method SummaryModifier and TypeMethodDescriptionvoidclose()Closes all currently openConnectioninstances created by this client.Closes all currently openConnectioninstances created by this client.Connect to the specified host, using the default port, without credentials and with all connection options set to their defaults.Connect to the specified host and port, without credentials and with all connection options set to their defaults.connect(String host, int port, ConnectionOptions options) Connect to the specified host and port, with given connection options.connect(String host, ConnectionOptions options) Connect to the specified host, using the default port, without credentials and with all connection options set to their defaults.static Clientcreate()static Clientcreate(ClientOptions options) Create a newClientinstance using provided configuration options.
- 
Method Details- 
create- Returns:
- a new Clientinstance configured with defaults.
 
- 
createCreate a newClientinstance using provided configuration options.- Parameters:
- options- The configuration options to use when creating the client.
- Returns:
- a new Clientinstance configured using the provided options.
 
- 
containerIdString containerId()- Returns:
- the container id assigned to this Clientinstance.
 
- 
closevoid close()Closes all currently openConnectioninstances created by this client.This method blocks and waits for each connection to close in turn using the configured close timeout of the ConnectionOptionsthat the connection was created with.- Specified by:
- closein interface- AutoCloseable
 
- 
closeAsyncCloses all currently openConnectioninstances created by this client.This method does not block and wait for each connection to be closed in turn, instead it returns a future which will be completed once the close of all connections has been completed. - Returns:
- a Futurethat will be completed when all open connections have closed.
 
- 
connectConnect to the specified host and port, without credentials and with all connection options set to their defaults.The connection returned may still fail afterwards as the majority of connection setup is done asynchronously so the application should be prepared for errors to arise of the connection methods if the open future is not waited on. - Parameters:
- host- the host to connect to
- port- the port to connect to
- Returns:
- connection, establishment not yet completed
- Throws:
- ClientException- if the- Clientis closed or an error occurs during connect.
 
- 
connectConnect to the specified host and port, with given connection options.The connection returned may still fail afterwards as the majority of connection setup is done asynchronously so the application should be prepared for errors to arise of the connection methods if the open future is not waited on. - Parameters:
- host- the host to connect to
- port- the port to connect to
- options- options to use when creating the connection.
- Returns:
- connection, establishment not yet completed
- Throws:
- ClientException- if the- Clientis closed or an error occurs during connect.
 
- 
connectConnect to the specified host, using the default port, without credentials and with all connection options set to their defaults.The connection returned may still fail afterwards as the majority of connection setup is done asynchronously so the application should be prepared for errors to arise of the connection methods if the open future is not waited on. - Parameters:
- host- the host to connect to
- Returns:
- connection, establishment not yet completed
- Throws:
- ClientException- if the- Clientis closed or an error occurs during connect.
 
- 
connectConnect to the specified host, using the default port, without credentials and with all connection options set to their defaults.The connection returned may still fail afterwards as the majority of connection setup is done asynchronously so the application should be prepared for errors to arise of the connection methods if the open future is not waited on. - Parameters:
- host- the host to connect to
- options- options to use when creating the connection.
- Returns:
- connection, establishment not yet completed
- Throws:
- ClientException- if the- Clientis closed or an error occurs during connect.
 
 
-