public final class SSLServerSocketImpl
extends javax.net.ssl.SSLServerSocket
Also, the constructors take an explicit authentication context parameter, giving flexibility with respect to how the server socket authenticates itself. That policy flexibility is not exposed through the standard SSLServerSocketFactory API.
System security defaults prevent server sockets from accepting connections if they the authentication context has not been given a certificate chain and its matching private key. If the clients of your application support "anonymous" cipher suites, you may be able to configure a server socket to accept those suites.
SSLSocketImpl
,
SSLServerSocketFactoryImpl
Modifier and Type | Method and Description |
---|---|
java.net.Socket |
accept()
Accept a new SSL connection.
|
java.lang.String[] |
getEnabledCipherSuites()
Returns the list of cipher suites which are currently enabled
for use by newly accepted connections.
|
java.lang.String[] |
getEnabledProtocols() |
boolean |
getEnableSessionCreation()
Returns true if new connections may cause creation of new SSL
sessions.
|
boolean |
getNeedClientAuth() |
javax.net.ssl.SSLParameters |
getSSLParameters()
Returns the SSLParameters in effect for newly accepted connections.
|
java.lang.String[] |
getSupportedCipherSuites()
Returns the names of the cipher suites which could be enabled for use
on an SSL connection.
|
java.lang.String[] |
getSupportedProtocols() |
boolean |
getUseClientMode() |
boolean |
getWantClientAuth() |
void |
setEnabledCipherSuites(java.lang.String[] suites)
Controls which particular SSL cipher suites are enabled for use
by accepted connections.
|
void |
setEnabledProtocols(java.lang.String[] protocols)
Controls which protocols are enabled for use.
|
void |
setEnableSessionCreation(boolean flag)
Controls whether new connections may cause creation of new SSL
sessions.
|
void |
setNeedClientAuth(boolean flag)
Controls whether the connections which are accepted must include
client authentication.
|
void |
setSSLParameters(javax.net.ssl.SSLParameters params)
Applies SSLParameters to newly accepted connections.
|
void |
setUseClientMode(boolean flag)
Makes the returned sockets act in SSL "client" mode, not the usual
server mode.
|
void |
setWantClientAuth(boolean flag)
Controls whether the connections which are accepted should request
client authentication.
|
java.lang.String |
toString()
Provides a brief description of this SSL socket.
|
bind, bind, close, getChannel, getInetAddress, getLocalPort, getLocalSocketAddress, getReceiveBufferSize, getReuseAddress, getSoTimeout, isBound, isClosed, setPerformancePreferences, setReceiveBufferSize, setReuseAddress, setSocketFactory, setSoTimeout
public java.lang.String[] getSupportedCipherSuites()
getSupportedCipherSuites
in class javax.net.ssl.SSLServerSocket
public java.lang.String[] getEnabledCipherSuites()
getEnabledCipherSuites
in class javax.net.ssl.SSLServerSocket
public void setEnabledCipherSuites(java.lang.String[] suites)
setEnabledCipherSuites
in class javax.net.ssl.SSLServerSocket
suites
- Names of all the cipher suites to enable; null
means to accept system defaults.public java.lang.String[] getSupportedProtocols()
getSupportedProtocols
in class javax.net.ssl.SSLServerSocket
public void setEnabledProtocols(java.lang.String[] protocols)
setEnabledProtocols
in class javax.net.ssl.SSLServerSocket
protocols
- protocols to enable.java.lang.IllegalArgumentException
- when one of the protocols
named by the parameter is not supported.public java.lang.String[] getEnabledProtocols()
getEnabledProtocols
in class javax.net.ssl.SSLServerSocket
public void setNeedClientAuth(boolean flag)
setNeedClientAuth
in class javax.net.ssl.SSLServerSocket
public boolean getNeedClientAuth()
getNeedClientAuth
in class javax.net.ssl.SSLServerSocket
public void setWantClientAuth(boolean flag)
setWantClientAuth
in class javax.net.ssl.SSLServerSocket
public boolean getWantClientAuth()
getWantClientAuth
in class javax.net.ssl.SSLServerSocket
public void setUseClientMode(boolean flag)
setUseClientMode
in class javax.net.ssl.SSLServerSocket
public boolean getUseClientMode()
getUseClientMode
in class javax.net.ssl.SSLServerSocket
public void setEnableSessionCreation(boolean flag)
setEnableSessionCreation
in class javax.net.ssl.SSLServerSocket
public boolean getEnableSessionCreation()
getEnableSessionCreation
in class javax.net.ssl.SSLServerSocket
public javax.net.ssl.SSLParameters getSSLParameters()
getSSLParameters
in class javax.net.ssl.SSLServerSocket
public void setSSLParameters(javax.net.ssl.SSLParameters params)
setSSLParameters
in class javax.net.ssl.SSLServerSocket
public java.net.Socket accept() throws java.io.IOException
accept
in class java.net.ServerSocket
java.io.IOException
public java.lang.String toString()
toString
in class java.net.ServerSocket