javax.net.ssl
Class SSLParameters
- java.lang.Object
javax.net.ssl.SSLParameters
- public class SSLParameters
- extends Object
SSLParameters can be created via the constructors in this class.
Objects can also be obtained using the getSSLParameters()
methods in
SSLSocket
and
SSLEngine
or the
getDefaultSSLParameters()
and
getSupportedSSLParameters()
methods in SSLContext
.
SSLParameters can be applied to a connection via the methods
SSLSocket.setSSLParameters()
and
SSLEngine.getSSLParameters()
.
Since:
1.6
See Also:
Constructor Summary
Constructor and Description |
---|
SSLParameters()
Constructs SSLParameters.
|
SSLParameters(String[] cipherSuites)
Constructs SSLParameters from the specified array of ciphersuites.
|
SSLParameters(String[] cipherSuites,String[] protocols)
Constructs SSLParameters from the specified array of ciphersuites
and protocols.
|
Method Summary
Modifier and Type | Method and Description |
---|---|
|
getCipherSuites()
Returns a copy of the array of ciphersuites or null if none
have been set.
|
|
getNeedClientAuth()
Returns whether client authentication should be required.
|
|
getProtocols()
Returns a copy of the array of protocols or null if none
have been set.
|
|
getWantClientAuth()
Returns whether client authentication should be requested.
|
|
setCipherSuites(String[] cipherSuites)
Sets the array of ciphersuites.
|
|
setNeedClientAuth(boolean needClientAuth)
Sets whether client authentication should be required.
|
|
setProtocols(String[] protocols)
Sets the array of protocols.
|
|
setWantClientAuth(boolean wantClientAuth)
Sets whether client authentication should be requested.
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail
SSLParameters
- public SSLParameters()
SSLParameters
- public SSLParameters(String[] cipherSuites)
Constructs SSLParameters from the specified array of ciphersuites.
Calling this constructor is equivalent to calling the no-args
constructor followed by
setCipherSuites(cipherSuites);
.
Parameters:
cipherSuites
- the array of ciphersuites (or null) SSLParameters
Constructs SSLParameters from the specified array of ciphersuites
and protocols.
Calling this constructor is equivalent to calling the no-args
constructor followed by
setCipherSuites(cipherSuites); setProtocols(protocols);
.
Parameters:
cipherSuites
- the array of ciphersuites (or null) protocols
- the array of protocols (or null) Method Detail
getCipherSuites
- public String[] getCipherSuites( )
Returns a copy of the array of ciphersuites or null if none
have been set.
Returns:
a copy of the array of ciphersuites or null if none
have been set.
setCipherSuites
- public void setCipherSuites(String[] cipherSuites)
Sets the array of ciphersuites.
Parameters:
cipherSuites
- the array of ciphersuites (or null) getProtocols
- public String[] getProtocols()
Returns a copy of the array of protocols or null if none
have been set.
Returns:
a copy of the array of protocols or null if none
have been set.
setProtocols
- public void setProtocols(String[] protocols)
Sets the array of protocols.
Parameters:
protocols
- the array of protocols (or null) getWantClientAuth
- public boolean getWantClientAuth( )
Returns whether client authentication should be requested.
Returns:
whether client authentication should be requested.
setWantClientAuth
- public void setWantClientAuth(boolean wantClientAuth)
Sets whether client authentication should be requested. Calling
this method clears the
needClientAuth
flag.
Parameters:
wantClientAuth
- whether client authentication should be requested getNeedClientAuth
- public boolean getNeedClientAuth( )
Returns whether client authentication should be required.
Returns:
whether client authentication should be required.
setNeedClientAuth
- public void setNeedClientAuth(boolean needClientAuth)
Sets whether client authentication should be required. Calling
this method clears the
wantClientAuth
flag.
Parameters:
needClientAuth
- whether client authentication should be required
The cipherSuites and protocols values are set to
null
, wantClientAuth and needClientAuth are set tofalse
.