Sensorberg Smart Spaces SDK for Android / com.sensorberg.smartworkspace.sdk / CancellationSignal

CancellationSignal

class CancellationSignal

Cancellation object for the UnitController.open method. Calling cancel on this object will attempt to cancel the open operation. If the cancellation was successful the Response.Status will be Response.Status.FAIL and Response.exception will be the exception object passed to the cancel method.

Constructors

<init>

CancellationSignal()

Cancellation object for the UnitController.open method. Calling cancel on this object will attempt to cancel the open operation. If the cancellation was successful the Response.Status will be Response.Status.FAIL and Response.exception will be the exception object passed to the cancel method.

Functions

cancel

fun cancel(exception: Exception = CanceledException()): Unit

Attempts to cancel the open operation this object was passed to. This method has a default CanceledException parameter. Custom Exception classes can be used to signal the reason for canceling the operation.