Freigeben über


IkeSession Constructor

Definition

Constructs a new IKE session.

[Android.Runtime.Register(".ctor", "(Landroid/content/Context;Landroid/net/ipsec/ike/IkeSessionParams;Landroid/net/ipsec/ike/ChildSessionParams;Ljava/util/concurrent/Executor;Landroid/net/ipsec/ike/IkeSessionCallback;Landroid/net/ipsec/ike/ChildSessionCallback;)V", "", ApiSince=31)]
public IkeSession (Android.Content.Context context, Android.Net.IpSec.Ike.IkeSessionParams ikeSessionParams, Android.Net.IpSec.Ike.ChildSessionParams firstChildSessionParams, Java.Util.Concurrent.IExecutor userCbExecutor, Android.Net.IpSec.Ike.IIkeSessionCallback ikeSessionCallback, Android.Net.IpSec.Ike.IChildSessionCallback firstChildSessionCallback);
[<Android.Runtime.Register(".ctor", "(Landroid/content/Context;Landroid/net/ipsec/ike/IkeSessionParams;Landroid/net/ipsec/ike/ChildSessionParams;Ljava/util/concurrent/Executor;Landroid/net/ipsec/ike/IkeSessionCallback;Landroid/net/ipsec/ike/ChildSessionCallback;)V", "", ApiSince=31)>]
new Android.Net.IpSec.Ike.IkeSession : Android.Content.Context * Android.Net.IpSec.Ike.IkeSessionParams * Android.Net.IpSec.Ike.ChildSessionParams * Java.Util.Concurrent.IExecutor * Android.Net.IpSec.Ike.IIkeSessionCallback * Android.Net.IpSec.Ike.IChildSessionCallback -> Android.Net.IpSec.Ike.IkeSession

Parameters

context
Context

a valid Context instance.

ikeSessionParams
IkeSessionParams

the IkeSessionParams that contains a set of valid IkeSession configurations.

firstChildSessionParams
ChildSessionParams

the ChildSessionParams that contains a set of valid configurations for the first Child Session.

userCbExecutor
IExecutor

the Executor upon which all callbacks will be posted. For security and consistency, the callbacks posted to this executor MUST be executed serially and in the order they were posted, as guaranteed by executors such as java.util.concurrent.Executors#newSingleThreadExecutor()

ikeSessionCallback
IIkeSessionCallback

the IkeSessionCallback interface to notify callers of state changes within the IkeSession.

firstChildSessionCallback
IChildSessionCallback

the ChildSessionCallback interface to notify callers of state changes within the first Child Session.

Attributes

Remarks

Constructs a new IKE session.

This method will immediately return an instance of IkeSession and asynchronously initiate the setup procedure of IkeSession as well as its first Child Session. Callers will be notified of these two setup results via the callback arguments.

FEATURE_IPSEC_TUNNELS is required for setting up a tunnel mode Child SA.

Java documentation for android.net.ipsec.ike.IkeSession.IkeSession(android.content.Context, android.net.ipsec.ike.IkeSessionParams, android.net.ipsec.ike.ChildSessionParams, java.util.concurrent.Executor, android.net.ipsec.ike.IkeSessionCallback, android.net.ipsec.ike.ChildSessionCallback).

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.

Applies to