IpSecTransform


public final class IpSecTransform
extends Object implements AutoCloseable

java.lang.Object
   ↳ 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

class IpSecTransform.Builder

This class is used to build IpSecTransform objects. 

Public methods

void close()

Deactivate this IpSecTransform and free allocated resources.

boolean equals(Object other)

Standard equals.

void requestIpSecTransformState(Executor executor, OutcomeReceiver<IpSecTransformStateRuntimeException> callback)

Retrieve the current state of this IpSecTransform.

String toString()

Returns a string representation of the object.

Protected methods

void finalize()

Check that the transform was closed properly.

Inherited methods

Object clone()

Creates and returns a copy of this object.

boolean equals(Object obj)

Indicates whether some other object is "equal to" this one.

void finalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

final Class<?> getClass()

Returns the runtime class of this Object.

int hashCode()

Returns a hash code value for the object.

final void notify()

Wakes up a single thread that is waiting on this object's monitor.

final void notifyAll()

Wakes up all threads that are waiting on this object's monitor.

String toString()

Returns a string representation of the object.

final void wait(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 wait(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 wait()

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

abstract void close()

Closes this resource, relinquishing any underlying resources.

Public methods

close

Added in API level 28
public void close ()

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 IpSecManager.removeTransportModeTransforms(FileDescriptor). 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.

equals

Added in API level 28
public boolean equals (Object other)

Standard equals.

Parameters
other Object: This value may be null.

Returns
boolean true if this object is the same as the obj argument; false otherwise.

requestIpSecTransformState

Added in API level 35
public void requestIpSecTransformState (Executor executor, 
                OutcomeReceiver<IpSecTransformStateRuntimeException> callback)

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: Callback that's called after the transform state is ready or when an error occurs. This value cannot be null.

toString

Added in API level 28
public String toString ()

Returns a string representation of the object.

Returns
String a string representation of the object.

Protected methods

finalize

Added in API level 28
protected void finalize ()

Check that the transform was closed properly.

Throws
Throwable