Added in API level 28

SecurityParameterIndex

class SecurityParameterIndex : AutoCloseable
kotlin.Any
   ↳ android.net.IpSecManager.SecurityParameterIndex

This class represents a reserved SPI.

Objects of this type are used to track reserved security parameter indices. They can be obtained by calling android.net.IpSecManager#allocateSecurityParameterIndex and must be released by calling close() when they are no longer needed.

Summary

Public methods
Unit

Release an SPI that was previously reserved.

Int

Get the underlying SPI held by this object.

String

Protected methods
Unit

Check that the SPI was closed properly.

Public methods

close

Added in API level 28
fun close(): Unit

Release an SPI that was previously reserved.

Release an SPI for use by other users in the system. If a SecurityParameterIndex is applied to an IpSecTransform, it will become unusable for future transforms but should still be closed to ensure system resources are released.

Exceptions
java.lang.Exception if this resource cannot be closed

getSpi

Added in API level 28
fun getSpi(): Int

Get the underlying SPI held by this object.

toString

Added in API level 28
fun toString(): String
Return
String a string representation of the object.

Protected methods

finalize

Added in API level 28
protected fun finalize(): Unit

Check that the SPI was closed properly.

Exceptions
java.lang.Throwable the Exception raised by this method