qisdk / com.aldebaran.qi.sdk.services / Requirement

Requirement

abstract class Requirement<T : Any!>

A requirement creates and holds a Future, which represents the value once satisfied.

If a requirement is already satisfied (i.e. a future not finished with an error is present), #satisfy() returns the existing future. Otherwise, it creates a new one. An existing future can be invalidated (#invalidate(), so that a future call to #satisfy() will create a new one.

Types

AvailableListener

Listener on value availability.

interface AvailableListener

Constructors

<init>

A requirement creates and holds a Future, which represents the value once satisfied.

Requirement()

Functions

addAvailableListener

open fun addAvailableListener(availableListener: AvailableListener!): Unit

create

abstract fun create(): Future<T>!

invalidate

open fun invalidate(): Unit

isAvailable

open fun isAvailable(): Boolean

isStillValid

open fun isStillValid(result: T): Boolean

removeAvailableListener

open fun removeAvailableListener(availableListener: AvailableListener!): Unit

satisfy

fun satisfy(): Future<T>!

Inheritors

ServiceRequirement

open class ServiceRequirement<T : Any!> : Requirement<T>

SessionRequirement

open class SessionRequirement : Requirement<Session!>