IpSecTransform
class IpSecTransform : AutoCloseable
kotlin.Any | |
↳ | android.net.IpSecTransform |
This class represents a transform, which roughly corresponds to an IPsec Security Association.
Transforms are created using IpSecTransform.Builder
. Each IpSecTransform
object encapsulates the properties and state of an IPsec security association. That includes, but is not limited to, algorithm choice, key material, and allocated system resources.
Summary
Nested classes | |
---|---|
This class is used to build |
Public methods | |
---|---|
Unit |
close() Deactivate this |
Boolean |
Standard equals. |
Unit |
requestIpSecTransformState(executor: Executor, callback: OutcomeReceiver<IpSecTransformState!, RuntimeException!>) Retrieve the current state of this IpSecTransform. |
String |
toString() |
Protected methods | |
---|---|
Unit |
finalize() Check that the transform was closed properly. |
Public methods
close
fun close(): Unit
Deactivate this IpSecTransform
and free allocated resources.
Deactivating a transform while it is still applied to a socket will result in errors on that socket. Make sure to remove transforms by calling android.net.IpSecManager#removeTransportModeTransforms. Note, removing an IpSecTransform
from a socket will not deactivate it (because one transform may be applied to multiple sockets).
It is safe to call this method on a transform that has already been deactivated.
Exceptions | |
---|---|
java.lang.Exception |
if this resource cannot be closed |
equals
fun equals(other: Any?): Boolean
Standard equals.
Parameters | |
---|---|
obj |
the reference object with which to compare. |
other |
Any?: This value may be null . |
Return | |
---|---|
Boolean |
true if this object is the same as the obj argument; false otherwise. |
requestIpSecTransformState
fun requestIpSecTransformState(
executor: Executor,
callback: OutcomeReceiver<IpSecTransformState!, RuntimeException!>
): Unit
Retrieve the current state of this IpSecTransform.
Parameters | |
---|---|
executor |
Executor: The Executor on which to call the supplied callback. Callback and listener events are dispatched through this Executor , providing an easy way to control which thread is used. To dispatch events through the main thread of your application, you can use Context.getMainExecutor() . Otherwise, provide an Executor that dispatches to an appropriate thread. This value cannot be null . |
callback |
OutcomeReceiver<IpSecTransformState!, RuntimeException!>: Callback that's called after the transform state is ready or when an error occurs. This value cannot be null . |
See Also
toString
fun toString(): String
Return | |
---|---|
String |
a string representation of the object. |
Protected methods
finalize
protected fun finalize(): Unit
Check that the transform was closed properly.
Exceptions | |
---|---|
java.lang.Throwable |
the Exception raised by this method |