Class UnixDomainSocket
java.lang.Object
java.net.Socket
org.springframework.boot.buildpack.platform.socket.UnixDomainSocket
- All Implemented Interfaces:
Closeable
,AutoCloseable
A
Socket
implementation for Unix domain sockets.- Since:
- 3.4.0
- Author:
- Scott Frederick
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
void
connect
(SocketAddress endpoint) void
connect
(SocketAddress endpoint, int timeout) static Socket
Create a newSocket
for the given path.boolean
isBound()
boolean
void
void
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
-
Method Details
-
get
Create a newSocket
for the given path.- Parameters:
path
- the path to the domain socket- Returns:
- a
Socket
instance - Throws:
IOException
- if the socket cannot be opened
-
getInputStream
- Overrides:
getInputStream
in classSocket
- Throws:
IOException
-
getOutputStream
- Overrides:
getOutputStream
in classSocket
- Throws:
IOException
-
getLocalSocketAddress
-
getRemoteSocketAddress
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classSocket
- Throws:
IOException
-
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
-