Added in API level 31

Builder

class Builder
kotlin.Any
   ↳ 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

Constructs a Builder.

Public methods
IkeSessionConfiguration.Builder
addIkeExtension(extensionType: Int)

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

IkeSessionConfiguration.Builder
addRemoteVendorId(remoteVendorId: ByteArray)

Adds a remote vendor ID for the IkeSessionConfiguration being built.

IkeSessionConfiguration

Constructs an IkeSessionConfiguration instance.

IkeSessionConfiguration.Builder

Clear all enabled IKE extensions from the IkeSessionConfiguration being built.

IkeSessionConfiguration.Builder

Clears the remote application version from the IkeSessionConfiguration being built.

IkeSessionConfiguration.Builder

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(remoteApplicationVersion: String)

Sets the remote application version for the IkeSessionConfiguration being built.

Public constructors

Builder

Added in API level 31
Builder(ikeConnInfo: IkeSessionConnectionInfo)

Constructs a Builder.

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

Public methods

addIkeExtension

Added in API level 31
fun addIkeExtension(extensionType: Int): IkeSessionConfiguration.Builder

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

Parameters
extensionType Int: the enabled extension Value is android.net.ipsec.ike.IkeSessionConfiguration#EXTENSION_TYPE_FRAGMENTATION, or android.net.ipsec.ike.IkeSessionConfiguration#EXTENSION_TYPE_MOBIKE
Return
IkeSessionConfiguration.Builder Builder this, to facilitate chaining This value cannot be null.

addRemoteVendorId

Added in API level 31
fun addRemoteVendorId(remoteVendorId: ByteArray): IkeSessionConfiguration.Builder

Adds a remote vendor ID for the IkeSessionConfiguration being built.

Parameters
remoteVendorId ByteArray: a remote vendor ID This value cannot be null.
Return
IkeSessionConfiguration.Builder Builder this, to facilitate chaining This value cannot be null.

build

Added in API level 31
fun build(): IkeSessionConfiguration

Constructs an IkeSessionConfiguration instance.

Return
IkeSessionConfiguration This value cannot be null.

clearIkeExtensions

Added in API level 31
fun clearIkeExtensions(): IkeSessionConfiguration.Builder

Clear all enabled IKE extensions from the IkeSessionConfiguration being built.

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

clearRemoteApplicationVersion

Added in API level 31
fun clearRemoteApplicationVersion(): IkeSessionConfiguration.Builder

Clears the remote application version from the IkeSessionConfiguration being built.

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

clearRemoteVendorIds

Added in API level 31
fun clearRemoteVendorIds(): IkeSessionConfiguration.Builder

Clears all remote vendor IDs from the IkeSessionConfiguration being built.

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

setEapInfo

Added in API level 33
fun setEapInfo(eapInfo: EapInfo?): IkeSessionConfiguration.Builder

Sets EapInfo for the IkeSessionConfiguration being built.

Parameters
eapInfo EapInfo?: This value may be null.
Return
IkeSessionConfiguration.Builder Builder this, to facilitate chaining This value cannot be null.

setRemoteApplicationVersion

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

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.
Return
IkeSessionConfiguration.Builder Builder this, to facilitate chaining This value cannot be null.