IkeSessionCallback
interface IkeSessionCallback
android.net.ipsec.ike.IkeSessionCallback |
Callback interface for receiving state changes of an IkeSession
.
IkeSessionCallback
MUST be unique to each IkeSession
. It is registered when callers are requesting a new IkeSession
. It is automatically unregistered when an IkeSession
is closed.
Summary
Public methods | |
---|---|
abstract Unit |
onClosed() Called when the |
open Unit |
onClosedWithException(exception: IkeException) Called if |
open Unit |
onError(exception: IkeException) Called if a recoverable error is encountered in an established |
abstract Unit |
onOpened(sessionConfiguration: IkeSessionConfiguration) Called when the |
Public methods
onClosed
abstract fun onClosed(): Unit
Called when the IkeSession
is closed.
When the closure is caused by a local, fatal error, onClosedWithException(android.net.ipsec.ike.exceptions.IkeException)
will be fired instead of this method.
onClosedWithException
open fun onClosedWithException(exception: IkeException): Unit
Called if IkeSession
setup failed or IkeSession
is closed because of a fatal error.
Parameters | |
---|---|
exception |
IkeException: the detailed error information. This value cannot be null . |
onError
open fun onError(exception: IkeException): Unit
Called if a recoverable error is encountered in an established IkeSession
.
This method may be triggered by protocol errors such as an INVALID_IKE_SPI, or by non-protocol errors such as the underlying android.net.Network
dying.
Parameters | |
---|---|
exception |
IkeException: the detailed error information. This value cannot be null . |
onOpened
abstract fun onOpened(sessionConfiguration: IkeSessionConfiguration): Unit
Called when the IkeSession
setup succeeds.
This method does not indicate the first Child Session has been setup. Caller MUST refer to the corresponding ChildSessionCallback
for the Child Session setup result.
Parameters | |
---|---|
sessionConfiguration |
IkeSessionConfiguration: the configuration information of IkeSession negotiated during IKE setup. This value cannot be null . |