IkeSessionConfiguration.Builder


public static final class IkeSessionConfiguration.Builder
extends Object

java.lang.Object
   ↳ android.net.ipsec.ike.IkeSessionConfiguration.Builder


This class can be used to incrementally construct a IkeSessionConfiguration.

Except for testing, IKE library users normally do not instantiate IkeSessionConfiguration themselves but instead get a reference via IkeSessionCallback

Summary

Public constructors

Builder(IkeSessionConnectionInfo ikeConnInfo)

Constructs a Builder.

Public methods

IkeSessionConfiguration.Builder addIkeExtension(int extensionType)

Marks an IKE extension as enabled for the IkeSessionConfiguration being built.

IkeSessionConfiguration.Builder addRemoteVendorId(byte[] remoteVendorId)

Adds a remote vendor ID for the IkeSessionConfiguration being built.

IkeSessionConfiguration build()

Constructs an IkeSessionConfiguration instance.

IkeSessionConfiguration.Builder clearIkeExtensions()

Clear all enabled IKE extensions from the IkeSessionConfiguration being built.

IkeSessionConfiguration.Builder clearRemoteApplicationVersion()

Clears the remote application version from the IkeSessionConfiguration being built.

IkeSessionConfiguration.Builder clearRemoteVendorIds()

Clears all remote vendor IDs from the IkeSessionConfiguration being built.

IkeSessionConfiguration.Builder setEapInfo(EapInfo eapInfo)

Sets EapInfo for the IkeSessionConfiguration being built.

IkeSessionConfiguration.Builder setRemoteApplicationVersion(String remoteApplicationVersion)

Sets the remote application version for the IkeSessionConfiguration being built.

Inherited methods

Public constructors

Builder

Added in API level 31
public Builder (IkeSessionConnectionInfo ikeConnInfo)

Constructs a Builder.

Parameters
ikeConnInfo IkeSessionConnectionInfo: the connection information This value cannot be null.

Public methods

addIkeExtension

Added in API level 31
public IkeSessionConfiguration.Builder addIkeExtension (int extensionType)

Marks an IKE extension as enabled for the IkeSessionConfiguration being built.

Parameters
extensionType int: the enabled extension Value is IkeSessionConfiguration.EXTENSION_TYPE_FRAGMENTATION, or IkeSessionConfiguration.EXTENSION_TYPE_MOBIKE

Returns
IkeSessionConfiguration.Builder Builder this, to facilitate chaining This value cannot be null.

addRemoteVendorId

Added in API level 31
public IkeSessionConfiguration.Builder addRemoteVendorId (byte[] remoteVendorId)

Adds a remote vendor ID for the IkeSessionConfiguration being built.

Parameters
remoteVendorId byte: a remote vendor ID This value cannot be null.

Returns
IkeSessionConfiguration.Builder Builder this, to facilitate chaining This value cannot be null.

build

Added in API level 31
public IkeSessionConfiguration build ()

Constructs an IkeSessionConfiguration instance.

Returns
IkeSessionConfiguration This value cannot be null.

clearIkeExtensions

Added in API level 31
public IkeSessionConfiguration.Builder clearIkeExtensions ()

Clear all enabled IKE extensions from the IkeSessionConfiguration being built.

Returns
IkeSessionConfiguration.Builder Builder this, to facilitate chaining This value cannot be null.

clearRemoteApplicationVersion

Added in API level 31
public IkeSessionConfiguration.Builder clearRemoteApplicationVersion ()

Clears the remote application version from the IkeSessionConfiguration being built.

Returns
IkeSessionConfiguration.Builder Builder this, to facilitate chaining This value cannot be null.

clearRemoteVendorIds

Added in API level 31
public IkeSessionConfiguration.Builder clearRemoteVendorIds ()

Clears all remote vendor IDs from the IkeSessionConfiguration being built.

Returns
IkeSessionConfiguration.Builder Builder this, to facilitate chaining This value cannot be null.

setEapInfo

Added in API level 33
public IkeSessionConfiguration.Builder setEapInfo (EapInfo eapInfo)

Sets EapInfo for the IkeSessionConfiguration being built.

Parameters
eapInfo EapInfo: This value may be null.

Returns
IkeSessionConfiguration.Builder Builder this, to facilitate chaining This value cannot be null.

setRemoteApplicationVersion

Added in API level 31
public IkeSessionConfiguration.Builder setRemoteApplicationVersion (String remoteApplicationVersion)

Sets the remote application version for the IkeSessionConfiguration being built.

Parameters
remoteApplicationVersion String: the remote application version. Defaults to an empty string. This value cannot be null.

Returns
IkeSessionConfiguration.Builder Builder this, to facilitate chaining This value cannot be null.