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 TypeMethodDescriptionvoidclose()voidconnect(SocketAddress endpoint) voidconnect(SocketAddress endpoint, int timeout) static SocketCreate a newSocketfor the given path.booleanisBound()booleanvoidvoidMethods 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 newSocketfor the given path.- Parameters:
path- the path to the domain socket- Returns:
- a
Socketinstance - Throws:
IOException- if the socket cannot be opened
-
getInputStream
- Overrides:
getInputStreamin classSocket- Throws:
IOException
-
getOutputStream
- Overrides:
getOutputStreamin classSocket- Throws:
IOException
-
getLocalSocketAddress
-
getRemoteSocketAddress
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classSocket- Throws:
IOException
-
connect
- Overrides:
connectin classSocket- Throws:
IOException
-
connect
- Overrides:
connectin classSocket- Throws:
IOException
-
isConnected
public boolean isConnected()- Overrides:
isConnectedin classSocket
-
isBound
public boolean isBound() -
shutdownInput
- Overrides:
shutdownInputin classSocket- Throws:
IOException
-
shutdownOutput
- Overrides:
shutdownOutputin classSocket- Throws:
IOException
-
getInetAddress
- Overrides:
getInetAddressin classSocket
-
getLocalAddress
- Overrides:
getLocalAddressin classSocket
-