Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Nested Classes](https://developer.android.com/reference/android/net/ipsec/ike/IkeSessionConfiguration#nestedclasses) \| [Constants](https://developer.android.com/reference/android/net/ipsec/ike/IkeSessionConfiguration#constants) \| [Methods](https://developer.android.com/reference/android/net/ipsec/ike/IkeSessionConfiguration#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/net/ipsec/ike/IkeSessionConfiguration#inhmethods)

# IkeSessionConfiguration

*** ** * ** ***

` public final class IkeSessionConfiguration `   
` extends https://developer.android.com/reference/java/lang/Object ` ` `

|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.net.ipsec.ike.IkeSessionConfiguration |

<br />

*** ** * ** ***

IkeSessionConfiguration represents the negotiated configuration for a `https://developer.android.com/reference/android/net/ipsec/ike/IkeSession`.

Configurations include remote application version and enabled IKE extensions.

## Summary

| ### Nested classes ||
|---|---|
| ` class` | `https://developer.android.com/reference/android/net/ipsec/ike/IkeSessionConfiguration.Builder` This class can be used to incrementally construct a `https://developer.android.com/reference/android/net/ipsec/ike/IkeSessionConfiguration`. |

| ### Constants ||
|---|---|
| `int` | `https://developer.android.com/reference/android/net/ipsec/ike/IkeSessionConfiguration#EXTENSION_TYPE_FRAGMENTATION` IKE Message Fragmentation |
| `int` | `https://developer.android.com/reference/android/net/ipsec/ike/IkeSessionConfiguration#EXTENSION_TYPE_MOBIKE` IKEv2 Mobility and Multihoming Protocol |

| ### Public methods ||
|---|---|
| ` https://developer.android.com/reference/android/net/eap/EapInfo` | ` https://developer.android.com/reference/android/net/ipsec/ike/IkeSessionConfiguration#getEapInfo()() ` Retrieves the EAP information. |
| ` https://developer.android.com/reference/android/net/ipsec/ike/IkeSessionConnectionInfo` | ` https://developer.android.com/reference/android/net/ipsec/ike/IkeSessionConfiguration#getIkeSessionConnectionInfo()() ` Returns the connection information. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/net/ipsec/ike/IkeSessionConfiguration#getRemoteApplicationVersion()() ` Gets remote (server) version information. |
| ` https://developer.android.com/reference/java/util/List<byte[]>` | ` https://developer.android.com/reference/android/net/ipsec/ike/IkeSessionConfiguration#getRemoteVendorIds()() ` Returns remote vendor IDs received during IKE Session setup. |
| ` boolean` | ` https://developer.android.com/reference/android/net/ipsec/ike/IkeSessionConfiguration#isIkeExtensionEnabled(int)(int extensionType) ` Checks if an IKE extension is enabled. |

### Inherited methods

From class ` https://developer.android.com/reference/java/lang/Object ` ` https://developer.android.com/reference/java/lang/Object` ` https://developer.android.com/reference/java/lang/Object#clone()() `

Creates and returns a copy of this object.
` boolean` ` https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj) `

Indicates whether some other object is "equal to" this one.
` void` ` https://developer.android.com/reference/java/lang/Object#finalize()() `

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
` final https://developer.android.com/reference/java/lang/Class<?>` ` https://developer.android.com/reference/java/lang/Object#getClass()() `

Returns the runtime class of this `Object`.
` int` ` https://developer.android.com/reference/java/lang/Object#hashCode()() `

Returns a hash code value for the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#notify()() `

Wakes up a single thread that is waiting on this object's monitor.
` final void` ` https://developer.android.com/reference/java/lang/Object#notifyAll()() `

Wakes up all threads that are waiting on this object's monitor.
` https://developer.android.com/reference/java/lang/String` ` https://developer.android.com/reference/java/lang/Object#toString()() `

Returns a string representation of the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait()() `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*.

## Constants

### EXTENSION_TYPE_FRAGMENTATION

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int EXTENSION_TYPE_FRAGMENTATION
```

IKE Message Fragmentation

<br />

Constant Value: 1 (0x00000001)

### EXTENSION_TYPE_MOBIKE

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int EXTENSION_TYPE_MOBIKE
```

IKEv2 Mobility and Multihoming Protocol

<br />

Constant Value: 2 (0x00000002)

## Public methods

### getEapInfo

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public EapInfo getEapInfo ()
```

Retrieves the EAP information.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/net/eap/EapInfo` | the EAP information provided by the server during EAP authentication (e.g. next re-authentication ID), or null if the server did not provide any information that will be useful after the authentication. <br /> |

### getIkeSessionConnectionInfo

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public IkeSessionConnectionInfo getIkeSessionConnectionInfo ()
```

Returns the connection information.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/net/ipsec/ike/IkeSessionConnectionInfo` | the IKE Session connection information. This value cannot be `null`. <br /> |

### getRemoteApplicationVersion

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public String getRemoteApplicationVersion ()
```

Gets remote (server) version information.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | application version of the remote server, or an empty string if the remote server did not provide the application version. This value cannot be `null`. <br /> |

### getRemoteVendorIds

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public List<byte[]> getRemoteVendorIds ()
```

Returns remote vendor IDs received during IKE Session setup.

According to the IKEv2 specification (RFC 7296), a vendor ID may indicate the sender is capable of accepting certain extensions to the protocol, or it may simply identify the implementation as an aid in debugging.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/util/List<byte[]>` | the vendor IDs of the remote server, or an empty list if no vendor ID is received during IKE Session setup. This value cannot be `null`. <br /> |

### isIkeExtensionEnabled

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isIkeExtensionEnabled (int extensionType)
```

Checks if an IKE extension is enabled.

An IKE extension is enabled when both sides can support it. This negotiation always happens in IKE initial exchanges (IKE INIT and IKE AUTH).

<br />

| Parameters ||
|---|---|
| `extensionType` | `int`: the extension type. Value is one of the following: - `https://developer.android.com/reference/android/net/ipsec/ike/IkeSessionConfiguration#EXTENSION_TYPE_FRAGMENTATION` - `https://developer.android.com/reference/android/net/ipsec/ike/IkeSessionConfiguration#EXTENSION_TYPE_MOBIKE` |

| Returns ||
|---|---|
| `boolean` | `true` if this extension is enabled. <br /> |