public class ServerListener extends CrtResource
CrtResource.ResourceInstance| Constructor and Description |
|---|
ServerListener(String hostName,
short port,
SocketOptions socketOptions,
ServerTlsContext tlsContext,
ServerBootstrap serverBootstrap,
ServerListenerHandler handler)
Instantiates a server listener.
|
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
canReleaseReferencesImmediately()
Override that determines whether a resource releases its dependencies at the same time the native handle is released or if it waits.
|
CompletableFuture<Void> |
getShutdownCompleteFuture() |
protected void |
releaseNativeHandle()
Required override method that must begin the release process of the acquired native handle
|
acquireNativeHandle, addRef, addReferenceTo, close, collectNativeResource, collectNativeResources, decRef, getNativeHandle, getResourceLogDescription, isNull, logNativeResources, releaseReferences, removeReferenceTo, setDescription, swapReferenceTo, waitForNoResourcespublic ServerListener(String hostName, short port, SocketOptions socketOptions, ServerTlsContext tlsContext, ServerBootstrap serverBootstrap, ServerListenerHandler handler)
hostName - name of the host to listen on. Can be a dns name, ip address, or unix
domain socket (or named pipe on windows) name.port - port to listen on. Ignored for local domain sockets.socketOptions - socket options to apply to the listening socket.tlsContext - optional tls context to apply to the connection if you want to use TLS.serverBootstrap - bootstrap object for handling connections.handler - functor interface for handling incoming connections and connection closures.protected void releaseNativeHandle()
CrtResourcereleaseNativeHandle in class CrtResourceprotected boolean canReleaseReferencesImmediately()
CrtResourcecanReleaseReferencesImmediately in class CrtResourcepublic CompletableFuture<Void> getShutdownCompleteFuture()
Copyright © 2021. All rights reserved.