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 | close()Release an SPI that was previously reserved. | 
| Int | getSpi()Get the underlying SPI held by this object. | 
| String | toString() | 
| Protected methods | |
|---|---|
| Unit | finalize()Check that the SPI was closed properly. | 
Public methods
close
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 | 
toString
fun toString(): String
| Return | |
|---|---|
| String | a string representation of the object. | 
Protected methods
finalize
protected fun finalize(): Unit
Check that the SPI was closed properly.
| Exceptions | |
|---|---|
| java.lang.Throwable | the Exceptionraised by this method | 
