@Contract(threading=STATELESS) @Internal public final class UnixDomainSocketFactory extends Object
This implementation supports both the JDK16+ standard library implementation (JEP 380) and the JUnixSocket library. It will automatically detect which implementation is available and use it; if both are available, the standard library implementation is preferred.
| Constructor and Description |
|---|
UnixDomainSocketFactory() |
| Modifier and Type | Method and Description |
|---|---|
Socket |
connectSocket(Socket socket,
Path socketPath,
TimeValue connectTimeout) |
Socket |
createSocket() |
SocketAddress |
createSocketAddress(Path socketPath) |
static UnixDomainSocketFactory |
getSocketFactory()
Gets the singleton instance of
UnixDomainSocketFactory. |
static boolean |
isAvailable()
Checks if Unix Domain Socket support is available.
|
public static boolean isAvailable()
public static UnixDomainSocketFactory getSocketFactory()
UnixDomainSocketFactory.public SocketAddress createSocketAddress(Path socketPath)
public Socket createSocket() throws IOException
IOExceptionpublic Socket connectSocket(Socket socket, Path socketPath, TimeValue connectTimeout) throws IOException
IOExceptionCopyright © 1999–2021 The Apache Software Foundation. All rights reserved.