Package org.mozilla.jss.ssl.javax
Class JSSSocket
- java.lang.Object
-
- java.net.Socket
-
- javax.net.ssl.SSLSocket
-
- org.mozilla.jss.ssl.javax.JSSSocket
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable
public class JSSSocket extends javax.net.ssl.SSLSocketSSL-enabled socket following the javax.net.ssl.SSLSocket interface. Most users will want to use the JSSSocketFactory provided by the Java Provider interface instead of using this class directly. This SSLSocket implementation is a wrapped implementation. In particular, we need to consume an existing Socket (via the consumeSocket(...) call) which we actually send data over. When called from a socket factory, this additional socket will be automatically created for the caller. This is necessary because SSLSocketFactory includes a mode which wraps an existing socket. All JSSSocket instances have a underlying SocketChannel, of type JSSSocketChannel. Notably lacking is a javax.net.ssl.SSLSocketChannel type, so JSSSocketChannel includes no additional SSL-specific options. However, the core of the SSLEngine wrapping logic exists there. In order to interoperate with JSSEngine, many of the adjacent methods have been included in this class as well. This socket can either be a client or a server, depending on how it was created. For more information, see the javax.net.ssl.SSLSocket documentation. To construct a (useful) new instance, the following calls must be made: - new JSSSocket(); - consumeSocket(inst); - initSSLEngine(...); - setKeyManagers(...); - setTrustManagers(...); Optionally, setSSLContext(...) could be called to provide the SSLContext from which the SSLEngine should be constructed. This should be called prior to initSSLEngine(...) being called.
-
-
Constructor Summary
Constructors Constructor Description JSSSocket()Start building a new JSSSocket.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddHandshakeCompletedListener(javax.net.ssl.HandshakeCompletedListener callback)Add a callback to fire on handshake completion.voidbind(java.net.SocketAddress bindpoint)voidclose()voidconnect(java.net.SocketAddress endpoint)voidconnect(java.net.SocketAddress endpoint, int timeout)voidconsumeSocket(java.net.Socket parent)Consume a parent socket, utilizing it for all read/write operations.booleangetAutoClose()Get the autoClose status of this socket, that is, whether or not its parent socket will be automatically closed.JSSSocketChannelgetChannel()Get the underlying SocketChannel for this Socket.java.lang.String[]getEnabledCipherSuites()Get the set of enabled cipher suites for this SSLSocket.java.lang.String[]getEnabledProtocols()Get the set of enabled protocol versions for this SSLSocket.booleangetEnableSessionCreation()Get whether or not this SSLSocket enables creation of new sessions.JSSEnginegetEngine()Get the underlying JSSEngine instance.javax.net.ssl.SSLSessiongetHandshakeSession()Get the initial session constructed during handshaking.java.net.InetAddressgetInetAddress()java.io.InputStreamgetInputStream()Get a copy of an input stream for this Socket.protected JSSSocketChannelgetInternalChannel()Helper to always return the channel for this socket, initializing it if it isn't yet created.booleangetKeepAlive()java.net.InetAddressgetLocalAddress()intgetLocalPort()java.net.SocketAddressgetLocalSocketAddress()booleangetNeedClientAuth()Get whether or not this SSLSocket needs client authentication.booleangetOOBInline()<T> TgetOption(java.net.SocketOption<T> name)java.io.OutputStreamgetOutputStream()Get a copy of an output stream for this Socket.intgetPort()intgetReceiveBufferSize()java.net.SocketAddressgetRemoteSocketAddress()booleangetReuseAddress()intgetSendBufferSize()javax.net.ssl.SSLSessiongetSession()Get the established session for this SSLSocket.intgetSoLinger()intgetSoTimeout()protected javax.net.ssl.SSLContextgetSSLContext()Get the SSLContext if one exists or create a new instance.JSSParametersgetSSLParameters()Get the configuration of this SSLSocket as a JSSParameters object.java.lang.String[]getSupportedCipherSuites()Get the set of supported cipher suites for this SSLSocket.java.lang.String[]getSupportedProtocols()Get the set of supported protocol versions for this SSLSocket.booleangetTcpNoDelay()intgetTrafficClass()booleangetUseClientMode()Get whether or not this SSLSocket is handshaking as a client.booleangetWantClientAuth()Get whether or not this SSLSocket wants client authentication.voidinitEngine()Explicitly initialize the SSLEngine with no session resumption information.voidinitEngine(java.lang.String host, int port)Explicitly initialize the SSLEngine with information for session resumption, including peer's hostname and port.booleanisBound()booleanisClosed()booleanisConnected()booleanisInputShutdown()booleanisOutputShutdown()protected voidnotifyHandshakeCompletedListeners()Internal helper to fire callbacks on handshake completion.voidremoveHandshakeCompletedListener(javax.net.ssl.HandshakeCompletedListener callback)Remove a callback from firing on handshake completion.voidsendUrgentData(int data)voidsetAutoClose(boolean on)Set the autoClose status of this socket, that is, whether or not its parent socket will be automatically closed.voidsetCertFromAlias(java.lang.String alias)Set the certificate this SSLSocket will utilize from an alias in the NSS DB.voidsetConsumedData(java.io.InputStream consumed)Helper to inform this socket of data already consumed from the wrapped socket.voidsetEnabledCipherSuites(java.lang.String[] suites)Set the list of enabled cipher suites for this SSLSocket.voidsetEnabledProtocols(java.lang.String[] protocols)Set the list of enabled protocol versions for this SSLSocket.voidsetEnableSessionCreation(boolean enabled)Set whether or not this SSLSocket enables creation of new sessions.voidsetHostname(java.lang.String name)Set the hostname this client socket is connecting to, for HTTPS TLS certificate validation purposes.voidsetKeepAlive(boolean on)voidsetKeyManager(javax.net.ssl.X509KeyManager km)Set the KeyManager this SSLSocket will utilize to select a key.voidsetKeyManagers(javax.net.ssl.X509KeyManager[] xkms)Set the key managers this SSLSocket will utilize to select a key.voidsetKeyMaterials(PK11Cert our_cert, PK11PrivKey our_key)Set the certificate this SSLSocket will utilize from a certificate and its matching private key.voidsetNeedClientAuth(boolean need)Set whether or not this SSLSocket needs client authentication.voidsetOOBInline(boolean on)<T> java.net.SocketsetOption(java.net.SocketOption<T> name, T value)voidsetPerformancePreferences(int connectionTime, int latency, int bandwidth)voidsetReceiveBufferSize(int size)voidsetReuseAddress(boolean on)voidsetSendBufferSize(int size)voidsetSoLinger(boolean on, int linger)voidsetSoTimeout(int timeout)voidsetSSLContext(javax.net.ssl.SSLContext ctx)Explicitly set the SSLContext utilized by this JSSSocket instance.voidsetSSLParameters(javax.net.ssl.SSLParameters params)Set the configuration of this SSLSocket from the given SSLParameters instance.voidsetTcpNoDelay(boolean on)voidsetTrafficClass(int tc)voidsetTrustManager(JSSTrustManager tm)Set the trust manager this SSLSocket will utilize to validate a peer's certificate.voidsetTrustManagers(javax.net.ssl.X509TrustManager[] xtms)Set the trust managers this SSLSocket will utilize to validate a peer's certificate.voidsetUseClientMode(boolean client)Set whether or not this SSLSocket is handshaking as a client.voidsetWantClientAuth(boolean want)Set whether or not this SSLSocket wants client authentication.voidshutdownInput()voidshutdownOutput()voidstartHandshake()Begin a handshake, blocking to completion; this will begin a new handshake when one has already been issued.java.util.Set<java.net.SocketOption<?>>supportedOptions()java.lang.StringtoString()
-
-
-
Method Detail
-
consumeSocket
public void consumeSocket(java.net.Socket parent) throws java.io.IOExceptionConsume a parent socket, utilizing it for all read/write operations. This JSSSocket instance will inherit all information about the connection from this underlying socket. When utilized in a JSSSocket, callers should refrain from interacting with the underlying socket directly until the TLS connection is closed. Otherwise, messages may get dropped.- Throws:
java.io.IOException
-
getSSLContext
protected javax.net.ssl.SSLContext getSSLContext() throws java.io.IOExceptionGet the SSLContext if one exists or create a new instance. This is used by initSSLEngine(..) to create the underlying SSLEngine.- Throws:
java.io.IOException
-
setSSLContext
public void setSSLContext(javax.net.ssl.SSLContext ctx) throws java.io.IOExceptionExplicitly set the SSLContext utilized by this JSSSocket instance. This enables JSSServerSocket to copy its SSLContext over to the accepted JSSSocket.- Throws:
java.io.IOException
-
initEngine
public void initEngine() throws java.io.IOExceptionExplicitly initialize the SSLEngine with no session resumption information.- Throws:
java.io.IOException
-
initEngine
public void initEngine(java.lang.String host, int port) throws java.io.IOExceptionExplicitly initialize the SSLEngine with information for session resumption, including peer's hostname and port.- Throws:
java.io.IOException
-
getEngine
public JSSEngine getEngine()
Get the underlying JSSEngine instance. Note that, just like accessing the underlying Socket instance while the JSSSocket instance is still open is dangerous, performing other TLS operations directly via JSSEngine is also dangerous. This is mostly exposed to enable advanced configuration of the JSSEngine that isn't otherwise allowed by JSSSocket, and to facilitate the accept() method on JSSServerSocket.
-
getChannel
public JSSSocketChannel getChannel()
Get the underlying SocketChannel for this Socket.- Overrides:
getChannelin classjava.net.Socket- See Also:
Socket.getChannel()
-
getInternalChannel
protected JSSSocketChannel getInternalChannel()
Helper to always return the channel for this socket, initializing it if it isn't yet created.
-
getInputStream
public java.io.InputStream getInputStream() throws java.io.IOExceptionGet a copy of an input stream for this Socket.- Overrides:
getInputStreamin classjava.net.Socket- Throws:
java.io.IOException- See Also:
Socket.getInputStream()
-
getOutputStream
public java.io.OutputStream getOutputStream() throws java.io.IOExceptionGet a copy of an output stream for this Socket.- Overrides:
getOutputStreamin classjava.net.Socket- Throws:
java.io.IOException- See Also:
Socket.getOutputStream()
-
setConsumedData
public void setConsumedData(java.io.InputStream consumed)
Helper to inform this socket of data already consumed from the wrapped socket. This is provided to facilitate a SSLSocketFactory call which allows construction of SSLSocket instances from a non-SSL ServerSocket, allowing the application to check SNI information directly.
-
getAutoClose
public boolean getAutoClose()
Get the autoClose status of this socket, that is, whether or not its parent socket will be automatically closed.
-
setAutoClose
public void setAutoClose(boolean on)
Set the autoClose status of this socket, that is, whether or not its parent socket will be automatically closed.
-
setHostname
public void setHostname(java.lang.String name)
Set the hostname this client socket is connecting to, for HTTPS TLS certificate validation purposes.- See Also:
JSSEngine.setHostname(String)
-
setCertFromAlias
public void setCertFromAlias(java.lang.String alias) throws java.lang.IllegalArgumentExceptionSet the certificate this SSLSocket will utilize from an alias in the NSS DB.- Throws:
java.lang.IllegalArgumentException- See Also:
JSSEngine.setCertFromAlias(String)
-
setKeyMaterials
public void setKeyMaterials(PK11Cert our_cert, PK11PrivKey our_key) throws java.lang.IllegalArgumentException
Set the certificate this SSLSocket will utilize from a certificate and its matching private key.- Throws:
java.lang.IllegalArgumentException- See Also:
JSSEngine.setKeyMaterials(PK11Cert, PK11PrivKey)
-
setKeyManager
public void setKeyManager(javax.net.ssl.X509KeyManager km)
Set the KeyManager this SSLSocket will utilize to select a key.- See Also:
JSSEngine.setKeyManager(X509KeyManager)
-
setKeyManagers
public void setKeyManagers(javax.net.ssl.X509KeyManager[] xkms)
Set the key managers this SSLSocket will utilize to select a key.
-
setTrustManager
public void setTrustManager(JSSTrustManager tm)
Set the trust manager this SSLSocket will utilize to validate a peer's certificate.
-
setTrustManagers
public void setTrustManagers(javax.net.ssl.X509TrustManager[] xtms)
Set the trust managers this SSLSocket will utilize to validate a peer's certificate.
-
startHandshake
public void startHandshake() throws java.io.IOExceptionBegin a handshake, blocking to completion; this will begin a new handshake when one has already been issued.- Specified by:
startHandshakein classjavax.net.ssl.SSLSocket- Throws:
java.io.IOException- See Also:
SSLEngine.beginHandshake(),SSLSocket.startHandshake()
-
addHandshakeCompletedListener
public void addHandshakeCompletedListener(javax.net.ssl.HandshakeCompletedListener callback) throws java.lang.IllegalArgumentExceptionAdd a callback to fire on handshake completion.- Specified by:
addHandshakeCompletedListenerin classjavax.net.ssl.SSLSocket- Throws:
java.lang.IllegalArgumentException- See Also:
SSLSocket.addHandshakeCompletedListener(HandshakeCompletedListener)
-
notifyHandshakeCompletedListeners
protected void notifyHandshakeCompletedListeners()
Internal helper to fire callbacks on handshake completion.
-
removeHandshakeCompletedListener
public void removeHandshakeCompletedListener(javax.net.ssl.HandshakeCompletedListener callback) throws java.lang.IllegalArgumentExceptionRemove a callback from firing on handshake completion.- Specified by:
removeHandshakeCompletedListenerin classjavax.net.ssl.SSLSocket- Throws:
java.lang.IllegalArgumentException- See Also:
SSLSocket.removeHandshakeCompletedListener(HandshakeCompletedListener)
-
getEnabledCipherSuites
public java.lang.String[] getEnabledCipherSuites()
Get the set of enabled cipher suites for this SSLSocket.- Specified by:
getEnabledCipherSuitesin classjavax.net.ssl.SSLSocket- See Also:
JSSEngine.getEnabledCipherSuites(),SSLSocket.getEnabledCipherSuites()
-
getSupportedCipherSuites
public java.lang.String[] getSupportedCipherSuites()
Get the set of supported cipher suites for this SSLSocket.- Specified by:
getSupportedCipherSuitesin classjavax.net.ssl.SSLSocket- See Also:
JSSEngine.getSupportedCipherSuites(),SSLSocket.getSupportedCipherSuites()
-
setEnabledCipherSuites
public void setEnabledCipherSuites(java.lang.String[] suites)
Set the list of enabled cipher suites for this SSLSocket.- Specified by:
setEnabledCipherSuitesin classjavax.net.ssl.SSLSocket- See Also:
JSSEngine.setEnabledCipherSuites(String[]),SSLSocket.setEnabledCipherSuites(String[])
-
getEnabledProtocols
public java.lang.String[] getEnabledProtocols()
Get the set of enabled protocol versions for this SSLSocket.- Specified by:
getEnabledProtocolsin classjavax.net.ssl.SSLSocket- See Also:
JSSEngine.getEnabledProtocols(),SSLSocket.getEnabledProtocols()
-
getSupportedProtocols
public java.lang.String[] getSupportedProtocols()
Get the set of supported protocol versions for this SSLSocket.- Specified by:
getSupportedProtocolsin classjavax.net.ssl.SSLSocket- See Also:
JSSEngine.getSupportedProtocols(),SSLSocket.getSupportedProtocols()
-
setEnabledProtocols
public void setEnabledProtocols(java.lang.String[] protocols)
Set the list of enabled protocol versions for this SSLSocket.- Specified by:
setEnabledProtocolsin classjavax.net.ssl.SSLSocket- See Also:
JSSEngine.setEnabledProtocols(String[]),SSLSocket.setEnabledProtocols(String[])
-
getEnableSessionCreation
public boolean getEnableSessionCreation()
Get whether or not this SSLSocket enables creation of new sessions.- Specified by:
getEnableSessionCreationin classjavax.net.ssl.SSLSocket- See Also:
JSSEngine.getEnableSessionCreation(),SSLSocket.getEnableSessionCreation()
-
setEnableSessionCreation
public void setEnableSessionCreation(boolean enabled)
Set whether or not this SSLSocket enables creation of new sessions.- Specified by:
setEnableSessionCreationin classjavax.net.ssl.SSLSocket- See Also:
JSSEngine.setEnableSessionCreation(boolean),SSLSocket.setEnableSessionCreation(boolean)
-
getHandshakeSession
public javax.net.ssl.SSLSession getHandshakeSession()
Get the initial session constructed during handshaking.- Overrides:
getHandshakeSessionin classjavax.net.ssl.SSLSocket- See Also:
SSLEngine.getHandshakeSession(),SSLSocket.getHandshakeSession()
-
getSession
public javax.net.ssl.SSLSession getSession()
Get the established session for this SSLSocket.- Specified by:
getSessionin classjavax.net.ssl.SSLSocket- See Also:
JSSEngine.getSession(),SSLSocket.getSession()
-
getUseClientMode
public boolean getUseClientMode()
Get whether or not this SSLSocket is handshaking as a client.- Specified by:
getUseClientModein classjavax.net.ssl.SSLSocket- See Also:
JSSEngine.getUseClientMode(),SSLSocket.getUseClientMode()
-
setUseClientMode
public void setUseClientMode(boolean client)
Set whether or not this SSLSocket is handshaking as a client.- Specified by:
setUseClientModein classjavax.net.ssl.SSLSocket- See Also:
JSSEngine.setUseClientMode(boolean),SSLSocket.setUseClientMode(boolean)
-
getWantClientAuth
public boolean getWantClientAuth()
Get whether or not this SSLSocket wants client authentication.- Specified by:
getWantClientAuthin classjavax.net.ssl.SSLSocket- See Also:
JSSEngine.getWantClientAuth(),SSLSocket.getWantClientAuth()
-
setWantClientAuth
public void setWantClientAuth(boolean want)
Set whether or not this SSLSocket wants client authentication.- Specified by:
setWantClientAuthin classjavax.net.ssl.SSLSocket- See Also:
JSSEngine.setWantClientAuth(boolean),SSLSocket.setWantClientAuth(boolean)
-
getNeedClientAuth
public boolean getNeedClientAuth()
Get whether or not this SSLSocket needs client authentication.- Specified by:
getNeedClientAuthin classjavax.net.ssl.SSLSocket- See Also:
JSSEngine.getNeedClientAuth(),SSLSocket.getNeedClientAuth()
-
setNeedClientAuth
public void setNeedClientAuth(boolean need)
Set whether or not this SSLSocket needs client authentication.- Specified by:
setNeedClientAuthin classjavax.net.ssl.SSLSocket- See Also:
JSSEngine.setNeedClientAuth(boolean),SSLSocket.setNeedClientAuth(boolean)
-
getSSLParameters
public JSSParameters getSSLParameters()
Get the configuration of this SSLSocket as a JSSParameters object.- Overrides:
getSSLParametersin classjavax.net.ssl.SSLSocket- See Also:
JSSEngine.getSSLParameters(),SSLSocket.getSSLParameters()
-
setSSLParameters
public void setSSLParameters(javax.net.ssl.SSLParameters params)
Set the configuration of this SSLSocket from the given SSLParameters instance.- Overrides:
setSSLParametersin classjavax.net.ssl.SSLSocket- See Also:
JSSEngine.setSSLParameters(SSLParameters),SSLSocket.setSSLParameters(SSLParameters)
-
connect
public void connect(java.net.SocketAddress endpoint) throws java.io.IOException- Overrides:
connectin classjava.net.Socket- Throws:
java.io.IOException
-
connect
public void connect(java.net.SocketAddress endpoint, int timeout) throws java.io.IOException- Overrides:
connectin classjava.net.Socket- Throws:
java.io.IOException
-
bind
public void bind(java.net.SocketAddress bindpoint) throws java.io.IOException- Overrides:
bindin classjava.net.Socket- Throws:
java.io.IOException
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Overrides:
closein classjava.net.Socket- Throws:
java.io.IOException
-
shutdownInput
public void shutdownInput() throws java.io.IOException- Overrides:
shutdownInputin classjava.net.Socket- Throws:
java.io.IOException
-
shutdownOutput
public void shutdownOutput() throws java.io.IOException- Overrides:
shutdownOutputin classjava.net.Socket- Throws:
java.io.IOException
-
getInetAddress
public java.net.InetAddress getInetAddress()
- Overrides:
getInetAddressin classjava.net.Socket
-
getLocalAddress
public java.net.InetAddress getLocalAddress()
- Overrides:
getLocalAddressin classjava.net.Socket
-
getPort
public int getPort()
- Overrides:
getPortin classjava.net.Socket
-
getLocalPort
public int getLocalPort()
- Overrides:
getLocalPortin classjava.net.Socket
-
getLocalSocketAddress
public java.net.SocketAddress getLocalSocketAddress()
- Overrides:
getLocalSocketAddressin classjava.net.Socket
-
getRemoteSocketAddress
public java.net.SocketAddress getRemoteSocketAddress()
- Overrides:
getRemoteSocketAddressin classjava.net.Socket
-
getTcpNoDelay
public boolean getTcpNoDelay() throws java.net.SocketException- Overrides:
getTcpNoDelayin classjava.net.Socket- Throws:
java.net.SocketException
-
setTcpNoDelay
public void setTcpNoDelay(boolean on) throws java.net.SocketException- Overrides:
setTcpNoDelayin classjava.net.Socket- Throws:
java.net.SocketException
-
getSoLinger
public int getSoLinger() throws java.net.SocketException- Overrides:
getSoLingerin classjava.net.Socket- Throws:
java.net.SocketException
-
setSoLinger
public void setSoLinger(boolean on, int linger) throws java.net.SocketException- Overrides:
setSoLingerin classjava.net.Socket- Throws:
java.net.SocketException
-
getSoTimeout
public int getSoTimeout() throws java.net.SocketException- Overrides:
getSoTimeoutin classjava.net.Socket- Throws:
java.net.SocketException
-
setSoTimeout
public void setSoTimeout(int timeout) throws java.net.SocketException- Overrides:
setSoTimeoutin classjava.net.Socket- Throws:
java.net.SocketException
-
getOOBInline
public boolean getOOBInline() throws java.net.SocketException- Overrides:
getOOBInlinein classjava.net.Socket- Throws:
java.net.SocketException
-
setOOBInline
public void setOOBInline(boolean on) throws java.net.SocketException- Overrides:
setOOBInlinein classjava.net.Socket- Throws:
java.net.SocketException
-
sendUrgentData
public void sendUrgentData(int data) throws java.io.IOException- Overrides:
sendUrgentDatain classjava.net.Socket- Throws:
java.io.IOException
-
getSendBufferSize
public int getSendBufferSize() throws java.net.SocketException- Overrides:
getSendBufferSizein classjava.net.Socket- Throws:
java.net.SocketException
-
setSendBufferSize
public void setSendBufferSize(int size) throws java.net.SocketException- Overrides:
setSendBufferSizein classjava.net.Socket- Throws:
java.net.SocketException
-
getReceiveBufferSize
public int getReceiveBufferSize() throws java.net.SocketException- Overrides:
getReceiveBufferSizein classjava.net.Socket- Throws:
java.net.SocketException
-
setReceiveBufferSize
public void setReceiveBufferSize(int size) throws java.net.SocketException- Overrides:
setReceiveBufferSizein classjava.net.Socket- Throws:
java.net.SocketException
-
getKeepAlive
public boolean getKeepAlive() throws java.net.SocketException- Overrides:
getKeepAlivein classjava.net.Socket- Throws:
java.net.SocketException
-
setKeepAlive
public void setKeepAlive(boolean on) throws java.net.SocketException- Overrides:
setKeepAlivein classjava.net.Socket- Throws:
java.net.SocketException
-
getTrafficClass
public int getTrafficClass() throws java.net.SocketException- Overrides:
getTrafficClassin classjava.net.Socket- Throws:
java.net.SocketException
-
setTrafficClass
public void setTrafficClass(int tc) throws java.net.SocketException- Overrides:
setTrafficClassin classjava.net.Socket- Throws:
java.net.SocketException
-
getReuseAddress
public boolean getReuseAddress() throws java.net.SocketException- Overrides:
getReuseAddressin classjava.net.Socket- Throws:
java.net.SocketException
-
setReuseAddress
public void setReuseAddress(boolean on) throws java.net.SocketException- Overrides:
setReuseAddressin classjava.net.Socket- Throws:
java.net.SocketException
-
isConnected
public boolean isConnected()
- Overrides:
isConnectedin classjava.net.Socket
-
isBound
public boolean isBound()
- Overrides:
isBoundin classjava.net.Socket
-
isClosed
public boolean isClosed()
- Overrides:
isClosedin classjava.net.Socket
-
isInputShutdown
public boolean isInputShutdown()
- Overrides:
isInputShutdownin classjava.net.Socket
-
isOutputShutdown
public boolean isOutputShutdown()
- Overrides:
isOutputShutdownin classjava.net.Socket
-
setPerformancePreferences
public void setPerformancePreferences(int connectionTime, int latency, int bandwidth)- Overrides:
setPerformancePreferencesin classjava.net.Socket
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.net.Socket
-
setOption
public <T> java.net.Socket setOption(java.net.SocketOption<T> name, T value) throws java.io.IOException- Overrides:
setOptionin classjava.net.Socket- Throws:
java.io.IOException
-
getOption
public <T> T getOption(java.net.SocketOption<T> name) throws java.io.IOException- Overrides:
getOptionin classjava.net.Socket- Throws:
java.io.IOException
-
supportedOptions
public java.util.Set<java.net.SocketOption<?>> supportedOptions()
- Overrides:
supportedOptionsin classjava.net.Socket
-
-