public final class SSLNullSession extends Object implements SSLSession, Cloneable
| Constructor and Description |
|---|
SSLNullSession() |
| Modifier and Type | Method and Description |
|---|---|
int |
getApplicationBufferSize()
Returns the maximum size that an application buffer can be for this
session.
|
String |
getCipherSuite()
Returns the name of the cipher suite used in this session.
|
long |
getCreationTime()
Returns the time this session was created, in milliseconds since midnight
January 1st 1970 UTC.
|
byte[] |
getId()
Returns this sessions identifier.
|
long |
getLastAccessedTime()
Returns the time this session was last accessed, in milliseconds since
midnight January 1st 1970 UTC.
|
Certificate[] |
getLocalCertificates()
Returns the list of certificates that were used to identify the local
side to the peer during the handshake.
|
Principal |
getLocalPrincipal()
Returns the principal used to identify the local side to the peer during
the handshake.
|
static SSLSession |
getNullSession() |
int |
getPacketBufferSize()
Returns the maximum size that a network buffer can be for this session.
|
X509Certificate[] |
getPeerCertificateChain()
Returns the list of certificates the peer used to identify itself during
the handshake.
|
Certificate[] |
getPeerCertificates()
Returns the list of certificates the peer used to identify itself during
the handshake.
|
String |
getPeerHost()
Returns the host name of the peer of this session.
|
int |
getPeerPort()
Returns the port number of the peer of this session.
|
Principal |
getPeerPrincipal()
Returns the principal identifying the peer during the handshake.
|
String |
getProtocol()
Returns the protocol name that is used for all connections in this
session.
|
SSLSessionContext |
getSessionContext()
Returns the context of this session, or null if no context is available.
|
Object |
getValue(String name)
Returns the object bound to the specified name in this session's
application layer data.
|
String[] |
getValueNames()
Returns the list of the object names bound to this session's application
layer data..
|
void |
invalidate()
Invalidates this session.
|
boolean |
isValid()
Returns whether this session is valid.
|
void |
putValue(String name,
Object value)
Binds the specified object under the specified name in this session's
application layer data.
|
void |
removeValue(String name)
Removes the binding for the specified name in this session's application
layer data.
|
public static SSLSession getNullSession()
public int getApplicationBufferSize()
SSLSessiongetApplicationBufferSize in interface SSLSessionpublic String getCipherSuite()
SSLSessiongetCipherSuite in interface SSLSessionpublic long getCreationTime()
SSLSessiongetCreationTime in interface SSLSessionpublic byte[] getId()
SSLSessiongetId in interface SSLSessionpublic long getLastAccessedTime()
SSLSessiongetLastAccessedTime in interface SSLSessionpublic Certificate[] getLocalCertificates()
SSLSessiongetLocalCertificates in interface SSLSessionpublic Principal getLocalPrincipal()
SSLSessiongetLocalPrincipal in interface SSLSessionpublic int getPacketBufferSize()
SSLSessiongetPacketBufferSize in interface SSLSessionpublic X509Certificate[] getPeerCertificateChain() throws SSLPeerUnverifiedException
SSLSession
Note: this method exists for compatility reasons, use
SSLSession.getPeerCertificates() instead.
getPeerCertificateChain in interface SSLSessionSSLPeerUnverifiedException - if the identity of the peer is not verified.public Certificate[] getPeerCertificates() throws SSLPeerUnverifiedException
SSLSessiongetPeerCertificates in interface SSLSessionSSLPeerUnverifiedException - if the identity of the peer is not verified.public String getPeerHost()
SSLSessiongetPeerHost in interface SSLSessionnull if no
host name is available.public int getPeerPort()
SSLSessiongetPeerPort in interface SSLSession-1 is no port number is
available.public Principal getPeerPrincipal() throws SSLPeerUnverifiedException
SSLSessiongetPeerPrincipal in interface SSLSessionSSLPeerUnverifiedException - if the identity of the peer has not been verified.public String getProtocol()
SSLSessiongetProtocol in interface SSLSessionpublic SSLSessionContext getSessionContext()
SSLSessiongetSessionContext in interface SSLSessionpublic Object getValue(String name)
SSLSessiongetValue in interface SSLSessionname - the name of the bound value.null if the
specified name does not exist or is not accessible in the current
access control context.public String[] getValueNames()
SSLSessionDepending on the current access control context, the list of object names may be different.
getValueNames in interface SSLSessionpublic void invalidate()
SSLSessionNo new connections can be created, but any existing connection remains valid until it is closed.
invalidate in interface SSLSessionpublic boolean isValid()
SSLSessionisValid in interface SSLSessiontrue if this session is valid, otherwise false.public void putValue(String name, Object value)
SSLSession
For bindings (new or existing) implementing the
SSLSessionBindingListener interface the object will be notified.
putValue in interface SSLSessionname - the name to bind the object to.value - the object to bind.public void removeValue(String name)
SSLSessionSSLSessionBindingListener interface the object will be notified.removeValue in interface SSLSessionname - the binding to remove.