public class DefaultConnectionFactory extends java.lang.Object implements ConnectionSocket.AsyncFactory, ResponsePump.Factory
ConnectionSocket.Factory and ResponsePump.Factory for any default connections.| Modifier and Type | Field and Description |
|---|---|
static DefaultConnectionFactory |
INSTANCE |
| Modifier and Type | Method and Description |
|---|---|
@NotNull ResponsePump |
newPump(@NotNull ConnectionSocket socket,
boolean daemonThreads)
Creates a new response pump using the provided connection socket.
|
@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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitnewSocketnewPumppublic static final DefaultConnectionFactory INSTANCE
@NotNull public @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)
ConnectionSocket.AsyncFactorynewSocketAsync in interface ConnectionSocket.AsyncFactoryhostname - the hostnameport - the postsslContext - an SSLContext, if anytimeoutMs - a timeout, in milliseconds, if anyCompletableFuture which will complete with a new ConnectionSocket.@NotNull public @NotNull ResponsePump newPump(@NotNull @NotNull ConnectionSocket socket, boolean daemonThreads)
ResponsePump.FactorynewPump in interface ResponsePump.Factorysocket - the ConnectionSocket to pump response pumps fromdaemonThreads - suggestion for using daemon threads and not blocking the process to exit.ResponsePump.