public interface ConnectionProvider<C>
| Modifier and Type | Method and Description |
|---|---|
void |
close(C conn)
Close a connection.
|
void |
connect(ConnectionListener<C> listener,
ContextInternal context,
Handler<AsyncResult<ConnectResult<C>>> resultHandler)
Connect to the server.
|
void |
init(C conn)
Initialize the connection.
|
default boolean |
isValid(C conn)
Check the connection validity
|
void connect(ConnectionListener<C> listener, ContextInternal context, Handler<AsyncResult<ConnectResult<C>>> resultHandler)
listener - the listenercontext - the context to use for the connectionresultHandler - the handler notified with the connection success or failurevoid init(C conn)
conn - the connectiondefault boolean isValid(C conn)
conn - the connectiontrue when connection is still validvoid close(C conn)
conn - the connectionCopyright © 2021. All rights reserved.