java.lang.Object | |
↳ | javax.net.ssl.SSLContext |
The public API for secure socket protocol implementations. It acts as factory
for SSLSocketFactory
's and SSLEngine
s.
Protected Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Creates a new
SSLContext . |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Creates an
SSLEngine instance from this context with the
specified hostname and port. | |||||||||||
Creates an
SSLEngine instance from this context. | |||||||||||
Returns the SSL session context that encapsulates the set of SSL sessions
that can be used for handshake of client-side SSL sockets.
| |||||||||||
Creates a new
SSLContext instance for the specified protocol from
the specified provider. | |||||||||||
Creates a new
SSLContext instance for the specified protocol from
the specified provider. | |||||||||||
Creates a new
SSLContext instance for the specified protocol. | |||||||||||
Returns the name of the secure socket protocol of this instance.
| |||||||||||
Returns the provider of this
SSLContext instance. | |||||||||||
Returns the SSL session context that encapsulates the set of SSL sessions
that can be used for handshake of server-side SSL sockets.
| |||||||||||
Returns a server socket factory for this instance.
| |||||||||||
Returns a socket factory for this instance.
| |||||||||||
Initializes this
SSLContext instance. |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class java.lang.Object
|
Creates a new SSLContext
.
contextSpi | the implementation delegate. |
---|---|
provider | the provider. |
protocol | the protocol name. |
Creates an SSLEngine
instance from this context with the
specified hostname and port.
peerHost | the name of the host |
---|---|
peerPort | the port |
SSLEngine
instance from this context.UnsupportedOperationException | if the provider does not support the operation. |
---|
Creates an SSLEngine
instance from this context.
SSLEngine
instance from this context.UnsupportedOperationException | if the provider does not support the operation. |
---|
Returns the SSL session context that encapsulates the set of SSL sessions that can be used for handshake of client-side SSL sockets.
null
if the underlying provider does not provide an implementation of
the SSLSessionContext
interface.
Creates a new SSLContext
instance for the specified protocol from
the specified provider.
protocol | the requested protocol to create a context for. |
---|---|
provider | the name of the provider that provides the requested protocol. |
SSLContext
for the requested protocol.NoSuchAlgorithmException | if the specified provider cannot provider the requested protocol. |
---|---|
NoSuchProviderException | if the specified provider does not exits. |
NullPointerException | if protocol is null (instead of
NoSuchAlgorithmException as in 1.4 release)
|
Creates a new SSLContext
instance for the specified protocol from
the specified provider.
protocol | the requested protocol to create a context for |
---|---|
provider | the provider that provides the requested protocol. |
SSLContext
for the requested protocol.NoSuchAlgorithmException | if the specified provider cannot provide the requested protocol. |
---|---|
NullPointerException | if protocol is null (instead of
NoSuchAlgorithmException as in 1.4 release)
|
Creates a new SSLContext
instance for the specified protocol.
protocol | the requested protocol to create a context for. |
---|
SSLContext
instance.NoSuchAlgorithmException | if no installed provider can provide the requested protocol |
---|---|
NullPointerException | if protocol is null (instead of
NoSuchAlgorithmException as in 1.4 release)
|
Returns the name of the secure socket protocol of this instance.
Returns the provider of this SSLContext
instance.
SSLContext
instance.
Returns the SSL session context that encapsulates the set of SSL sessions that can be used for handshake of server-side SSL sockets.
null
if the underlying provider does not provide an implementation of
the SSLSessionContext
interface.
Returns a server socket factory for this instance.
Returns a socket factory for this instance.
Initializes this SSLContext
instance. All of the arguments are
optional, and the security providers will be searched for the required
implementations of the needed algorithms.
km | the key sources or null . |
---|---|
tm | the trust decision sources or null . |
sr | the randomness source or null. |
KeyManagementException | if initializing this instance fails. |
---|