Class DomainSocket
java.lang.Object
java.net.Socket
org.springframework.boot.buildpack.platform.socket.DomainSocket
- All Implemented Interfaces:
Closeable
,AutoCloseable
A
Socket
implementation for Linux of BSD domain sockets.- Since:
- 2.3.0
- Author:
- Phillip Webb
-
Field Summary
Modifier and TypeFieldDescriptionprotected static final byte
protected static final int
protected static final int
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
protected abstract void
void
connect
(SocketAddress endpoint) void
connect
(SocketAddress endpoint, int timeout) static DomainSocket
Return a newDomainSocket
for the given path.boolean
isBound()
boolean
void
void
void
write
(ByteBuffer buffer) Methods inherited from class java.net.Socket
bind, getChannel, getKeepAlive, getLocalPort, getOOBInline, getOption, getPort, getReceiveBufferSize, getReuseAddress, getSendBufferSize, getSoLinger, getSoTimeout, getTcpNoDelay, getTrafficClass, isClosed, isInputShutdown, isOutputShutdown, sendUrgentData, setKeepAlive, setOOBInline, setOption, setPerformancePreferences, setReceiveBufferSize, setReuseAddress, setSendBufferSize, setSocketImplFactory, setSoLinger, setSoTimeout, setTcpNoDelay, setTrafficClass, supportedOptions, toString
-
Field Details
-
PF_LOCAL
protected static final int PF_LOCAL- See Also:
-
AF_LOCAL
protected static final byte AF_LOCAL- See Also:
-
SOCK_STREAM
protected static final int SOCK_STREAM- See Also:
-
-
Method Details
-
write
- Throws:
IOException
-
getInputStream
- Overrides:
getInputStream
in classSocket
-
getOutputStream
- Overrides:
getOutputStream
in classSocket
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classSocket
- Throws:
IOException
-
connect
-
get
Return a newDomainSocket
for the given path.- Parameters:
path
- the path to the domain socket- Returns:
- a
DomainSocket
instance - Throws:
IOException
- if the socket cannot be opened
-
connect
- Overrides:
connect
in classSocket
- Throws:
IOException
-
connect
- Overrides:
connect
in classSocket
- Throws:
IOException
-
isConnected
public boolean isConnected()- Overrides:
isConnected
in classSocket
-
isBound
public boolean isBound() -
shutdownInput
- Overrides:
shutdownInput
in classSocket
- Throws:
IOException
-
shutdownOutput
- Overrides:
shutdownOutput
in classSocket
- Throws:
IOException
-
getInetAddress
- Overrides:
getInetAddress
in classSocket
-
getLocalAddress
- Overrides:
getLocalAddress
in classSocket
-
getLocalSocketAddress
- Overrides:
getLocalSocketAddress
in classSocket
-
getRemoteSocketAddress
- Overrides:
getRemoteSocketAddress
in classSocket
-