FileDocCategorySizeDatePackage
SSLSession.javaAPI DocAndroid 1.5 API8228Wed May 06 22:41:06 BST 2009javax.net.ssl

SSLSession

public interface SSLSession
The interface representing an SSL session.
since
Android 1.0

Fields Summary
Constructors Summary
Methods Summary
public intgetApplicationBufferSize()
Returns the maximum size that an application buffer can be for this session.

return
the maximum application buffer size.
since
Android 1.0

public java.lang.StringgetCipherSuite()
Returns the name of the cipher suite used in this session.

return
the name of the cipher suite used in this session.
since
Android 1.0

public longgetCreationTime()
Returns the time this session was created, in milliseconds since midnight January 1st 1970 UTC.

return
the time the session was created.
since
Android 1.0

public byte[]getId()
Returns this sessions identifier.

return
this sessions identifier.
since
Android 1.0

public longgetLastAccessedTime()
Returns the time this session was last accessed, in milliseconds since midnight January 1st 1970 UTC.

return
the time this session was last accessed.
since
Android 1.0

public java.security.cert.Certificate[]getLocalCertificates()
Returns the list of certificates that were used to identify the local side to the peer during the handshake.

return
the list of certificates, ordered from local certificate to CA's certificates.
since
Android 1.0

public java.security.PrincipalgetLocalPrincipal()
Returns the principal used to identify the local side to the peer during the handshake.

return
the principal used to identify the local side.
since
Android 1.0

public intgetPacketBufferSize()
Returns the maximum size that a network buffer can be for this session.

return
the maximum network buffer size.
since
Android 1.0

public javax.security.cert.X509Certificate[]getPeerCertificateChain()
Returns the list of certificates the peer used to identify itself during the handshake.

Note: this method exists for compatility reasons, use {@link #getPeerCertificates()} instead.

return
the list of certificates, ordered from the identity certificate to the CA's certificates
throws
SSLPeerUnverifiedException if the identity of the peer is not verified.
since
Android 1.0

public java.security.cert.Certificate[]getPeerCertificates()
Returns the list of certificates the peer used to identify itself during the handshake.

return
the list of certificates, ordered from the identity certificate to the CA's certificates.
throws
SSLPeerUnverifiedException if the identity of the peer is not verified.
since
Android 1.0

public java.lang.StringgetPeerHost()
Returns the host name of the peer of this session. The host name is not authenticated.

return
the host name of the peer of this session, or {@code null} if no host name is available.
since
Android 1.0

public intgetPeerPort()
Returns the port number of the peer of this session. The port number is not authenticated.

return
the port number of the peer, of {@code -1} is no port number is available.
since
Android 1.0

public java.security.PrincipalgetPeerPrincipal()
Returns the principal identifying the peer during the handshake.

return
the principal identifying the peer.
throws
SSLPeerUnverifiedException if the identity of the peer has not been verified.
since
Android 1.0

public java.lang.StringgetProtocol()
Returns the protocol name that is used for all connections in this session.

return
the protocol name that is used for all connections in this session.
since
Android 1.0

public javax.net.ssl.SSLSessionContextgetSessionContext()
Returns the context of this session. If a context is available and a security manager is installed, the {@code SSLPermission("getSSLSessionContext"} is checked with the security manager.

return
the context of this session or {@code null} if no context is available.
since
Android 1.0

public java.lang.ObjectgetValue(java.lang.String name)
Returns the object bound to the specified name in this session's application layer data.

param
name the name of the bound value.
return
the value bound to the specified name, or {@code null} if the specified name does not exist or is not accessible in the current access control context.
throws
IllegalArgumentException if {@code name} is {@code null}.
since
Android 1.0

public java.lang.String[]getValueNames()
Returns the list of the object names bound to this session's application layer data..

Depending on the current access control context, the list of object names may be different.

return
the list of the object names bound to this session's application layer data.
since
Android 1.0

public voidinvalidate()
Invalidates this session.

No new connections can be created, but any existing connection remains valid until it is closed.

since
Android 1.0

public booleanisValid()
Returns whether this session is valid.

return
{@code true} if this session is valid, otherwise {@code false}.
since
Android 1.0

public voidputValue(java.lang.String name, java.lang.Object value)
Binds the specified object under the specified name in this session's application layer data.

For bindings (new or existing) implementing the {@code SSLSessionBindingListener} interface the object will be notified.

param
name the name to bind the object to.
param
value the object to bind.
throws
IllegalArgumentException if either {@code name} or {@code value} is {@code null}.
since
Android 1.0

public voidremoveValue(java.lang.String name)
Removes the binding for the specified name in this session's application layer data. If the existing binding implements the {@code SSLSessionBindingListener} interface the object will be notified.

param
name the binding to remove.
throws
IllegalArgumentException if {@code name} is {@code null}.
since
Android 1.0