public static interface ConnectionSocket.AsyncFactory extends ConnectionSocket.Factory
| Modifier and Type | Method and Description |
|---|---|
default @NotNull ConnectionSocket |
newSocket(@NotNull java.lang.String hostname,
int port,
@Nullable javax.net.ssl.SSLContext sslContext,
@Nullable java.lang.Long timeoutMs)
Creates a new connection socket into the server.
|
@NotNull java.util.concurrent.CompletableFuture<ConnectionSocket> |
newSocketAsync(@NotNull java.lang.String hostname,
int port,
@Nullable javax.net.ssl.SSLContext sslContext,
@Nullable java.lang.Long timeoutMs)
Creates a new connection socket asynchronously into the server.
|
@NotNull default @NotNull ConnectionSocket newSocket(@NotNull @NotNull java.lang.String hostname, int port, @Nullable @Nullable javax.net.ssl.SSLContext sslContext, @Nullable @Nullable java.lang.Long timeoutMs)
newSocket in interface ConnectionSocket.Factoryhostname - the hostnameport - the postsslContext - an SSLContext, if anytimeoutMs - a timeout, in milliseconds, if anyConnectionSocket.@NotNull @NotNull java.util.concurrent.CompletableFuture<ConnectionSocket> newSocketAsync(@NotNull @NotNull java.lang.String hostname, int port, @Nullable @Nullable javax.net.ssl.SSLContext sslContext, @Nullable @Nullable java.lang.Long timeoutMs)
hostname - the hostnameport - the postsslContext - an SSLContext, if anytimeoutMs - a timeout, in milliseconds, if anyCompletableFuture which will complete with a new ConnectionSocket.