ISSLSession Interface

Definition

In SSL, sessions are used to describe an ongoing relationship between two entities.

[Android.Runtime.Register("javax/net/ssl/SSLSession", "", "Javax.Net.Ssl.ISSLSessionInvoker")]
public interface ISSLSession : Android.Runtime.IJavaObject, IDisposable, Java.Interop.IJavaPeerable
[<Android.Runtime.Register("javax/net/ssl/SSLSession", "", "Javax.Net.Ssl.ISSLSessionInvoker")>]
type ISSLSession = interface
    interface IJavaObject
    interface IDisposable
    interface IJavaPeerable
Derived
Attributes
Implements

Remarks

In SSL, sessions are used to describe an ongoing relationship between two entities. Each SSL connection involves one session at a time, but that session may be used on many connections between those entities, simultaneously or sequentially. The session used on a connection may also be replaced by a different session. Sessions are created, or rejoined, as part of the SSL handshaking protocol. Sessions may be invalidated due to policies affecting security or resource usage, or by an application explicitly calling invalidate. Session management policies are typically used to tune performance.

In addition to the standard session attributes, SSL sessions expose these read-only attributes: <UL>

<LI> <em>Peer Identity.</em> Sessions are between a particular client and a particular server. The identity of the peer may have been established as part of session setup. Peers are generally identified by X.509 certificate chains.

<LI> <em>Cipher Suite Name.</em> Cipher suites describe the kind of cryptographic protection that's used by connections in a particular session.

<LI> <em>Peer Host.</em> All connections in a session are between the same two hosts. The address of the host on the other side of the connection is available.

</UL>

Sessions may be explicitly invalidated. Invalidation may also be done implicitly, when faced with certain kinds of errors.

Added in 1.4.

Java documentation for javax.net.ssl.SSLSession.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Properties

ApplicationBufferSize

Returns the maximum size that an application buffer can be for this session.

CipherSuite

Returns the name of the cipher suite used in this session.

CreationTime

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

Handle

Gets the JNI value of the underlying Android object.

(Inherited from IJavaObject)
IsValid

Returns whether this session is valid.

JniIdentityHashCode

Returns the value of java.lang.System.identityHashCode() for the wrapped instance.

(Inherited from IJavaPeerable)
JniManagedPeerState

State of the managed peer.

(Inherited from IJavaPeerable)
JniPeerMembers

Member access and invocation support.

(Inherited from IJavaPeerable)
LastAccessedTime

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

LocalPrincipal

Returns the principal used to identify the local side to the peer during the handshake.

PacketBufferSize

Returns the maximum size that a network buffer can be for this session.

PeerHost

Returns the host name of the peer of this session.

PeerPort

Returns the port number of the peer of this session.

PeerPrincipal

Returns the principal identifying the peer during the handshake.

PeerReference

Returns a JniObjectReference of the wrapped Java object instance.

(Inherited from IJavaPeerable)
Protocol

Returns the protocol name that is used for all connections in this session.

SessionContext

Returns the context of this session, or null if no context is available.

Methods

Disposed()

Called when the instance has been disposed.

(Inherited from IJavaPeerable)
DisposeUnlessReferenced()

If there are no outstanding references to this instance, then calls Dispose(); otherwise, does nothing.

(Inherited from IJavaPeerable)
Finalized()

Called when the instance has been finalized.

(Inherited from IJavaPeerable)
GetId()

Returns the identifier assigned to this Session.

GetLocalCertificates()

Returns the certificate(s) that were sent to the peer during handshaking.

GetPeerCertificateChain()

Returns the identity of the peer which was identified as part of defining the session.

GetPeerCertificates()

Returns the identity of the peer which was established as part of defining the session.

GetValue(String)

Returns the object bound to the given name in the session's application layer data.

GetValueNames()

Returns an array of the names of all the application layer data objects bound into the Session.

Invalidate()

Invalidates the session.

PutValue(String, Object)

Binds the specified value object into the session's application layer data with the given name.

RemoveValue(String)

Removes the object bound to the given name in the session's application layer data.

SetJniIdentityHashCode(Int32)

Set the value returned by JniIdentityHashCode.

(Inherited from IJavaPeerable)
SetJniManagedPeerState(JniManagedPeerStates) (Inherited from IJavaPeerable)
SetPeerReference(JniObjectReference)

Set the value returned by PeerReference.

(Inherited from IJavaPeerable)
UnregisterFromRuntime()

Unregister this instance so that the runtime will not return it from future Java.Interop.JniRuntime+JniValueManager.PeekValue invocations.

(Inherited from IJavaPeerable)

Extension Methods

JavaCast<TResult>(IJavaObject)

Performs an Android runtime-checked type conversion.

JavaCast<TResult>(IJavaObject)
GetJniTypeName(IJavaPeerable)

Applies to