語言

IkeSession 建構函式

定義

建立新的 IKE 會議。

[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

參數

context
Context

一個有效的 Context 例子。

ikeSessionParams
IkeSessionParams

其中 IkeSessionParams 包含一組有效的 IkeSession 配置。

firstChildSessionParams
ChildSessionParams

the ChildSessionParams that 包含了第一個子會話的有效配置集合。

userCbExecutor
IExecutor

Executor所有回訪都會在那裡發布。 為了安全與一致性,發送給該執行者的回調必須依照發布順序序列執行,並由執行者如 java.util.concurrent.Executors#newSingleThreadExecutor()

ikeSessionCallback
IIkeSessionCallback

該介面用於IkeSessionCallback通知呼叫者狀態變更。IkeSession

firstChildSessionCallback
IChildSessionCallback

介面用 ChildSessionCallback 來通知呼叫者在第一個子會話中狀態變更。

屬性

備註

建立新的 IKE 會議。

此方法會立即回傳 的 IkeSession 實例,並非同步啟動設定 IkeSession 程序及其第一個子會話。 呼叫者將透過回調參數收到這兩個設定結果的通知。

FEATURE_IPSEC_TUNNELS 是建立 Tunnel 模式 Child SA 所必需的。

Java 文件 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)。

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於