public abstract class DomainSocket
extends java.net.Socket
Socket implementation for Linux of BSD domain sockets.| Modifier and Type | Field and Description |
|---|---|
protected static byte |
AF_LOCAL |
protected static int |
PF_LOCAL |
protected static int |
SOCK_STREAM |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
connect(java.net.SocketAddress endpoint) |
void |
connect(java.net.SocketAddress endpoint,
int timeout) |
protected abstract void |
connect(java.lang.String path,
int handle) |
static DomainSocket |
get(java.lang.String path)
Return a new
DomainSocket for the given path. |
java.net.InetAddress |
getInetAddress() |
java.io.InputStream |
getInputStream() |
java.net.InetAddress |
getLocalAddress() |
java.net.SocketAddress |
getLocalSocketAddress() |
java.io.OutputStream |
getOutputStream() |
java.net.SocketAddress |
getRemoteSocketAddress() |
boolean |
isBound() |
boolean |
isConnected() |
void |
shutdownInput() |
void |
shutdownOutput() |
void |
write(java.nio.ByteBuffer buffer) |
bind, getChannel, getKeepAlive, getLocalPort, getOOBInline, getPort, getReceiveBufferSize, getReuseAddress, getSendBufferSize, getSoLinger, getSoTimeout, getTcpNoDelay, getTrafficClass, isClosed, isInputShutdown, isOutputShutdown, sendUrgentData, setKeepAlive, setOOBInline, setPerformancePreferences, setReceiveBufferSize, setReuseAddress, setSendBufferSize, setSocketImplFactory, setSoLinger, setSoTimeout, setTcpNoDelay, setTrafficClass, toStringprotected static final int PF_LOCAL
protected static final byte AF_LOCAL
protected static final int SOCK_STREAM
public void write(java.nio.ByteBuffer buffer)
throws java.io.IOException
java.io.IOExceptionpublic java.io.InputStream getInputStream()
getInputStream in class java.net.Socketpublic java.io.OutputStream getOutputStream()
getOutputStream in class java.net.Socketpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.net.Socketjava.io.IOExceptionprotected abstract void connect(java.lang.String path,
int handle)
public static DomainSocket get(java.lang.String path) throws java.io.IOException
DomainSocket for the given path.path - the path to the domain socketDomainSocket instancejava.io.IOException - if the socket cannot be openedpublic void connect(java.net.SocketAddress endpoint)
throws java.io.IOException
connect in class java.net.Socketjava.io.IOExceptionpublic void connect(java.net.SocketAddress endpoint,
int timeout)
throws java.io.IOException
connect in class java.net.Socketjava.io.IOExceptionpublic boolean isConnected()
isConnected in class java.net.Socketpublic boolean isBound()
isBound in class java.net.Socketpublic void shutdownInput()
throws java.io.IOException
shutdownInput in class java.net.Socketjava.io.IOExceptionpublic void shutdownOutput()
throws java.io.IOException
shutdownOutput in class java.net.Socketjava.io.IOExceptionpublic java.net.InetAddress getInetAddress()
getInetAddress in class java.net.Socketpublic java.net.InetAddress getLocalAddress()
getLocalAddress in class java.net.Socketpublic java.net.SocketAddress getLocalSocketAddress()
getLocalSocketAddress in class java.net.Socketpublic java.net.SocketAddress getRemoteSocketAddress()
getRemoteSocketAddress in class java.net.Socket