Package arez.spy
Interface ObserverInfo
- All Superinterfaces:
ElementInfo
A representation of a observer instance exposed to spy framework.
-
Method Summary
Modifier and TypeMethodDescriptionConvert the Observer to a ComputableValue.Return the component for the specified Observer.Return the list of dependencies of the Observer.Return the priority of the Observer.boolean
isActive()
Return true if the Observer is active.boolean
Return true if the Observer is a ComputableValue.boolean
Return true if the Observer will use a read-only transaction.boolean
Return true if the Observer is currently running.boolean
Return true if the Observer is scheduled to run.Methods inherited from interface arez.spy.ElementInfo
getName, isDisposed
-
Method Details
-
isActive
boolean isActive()Return true if the Observer is active. A normal observer is considered active if it is not disposed. An observer whereisComputableValue()
returns true if the observer is not disposed and either theComputableValue
is being observed or has been configured as akeepAlive
ComputableValue
.- Returns:
- true if the Observer is active.
-
isRunning
boolean isRunning()Return true if the Observer is currently running.- Returns:
- true if the Observer is currently running.
-
isScheduled
boolean isScheduled()Return true if the Observer is scheduled to run.- Returns:
- true if the Observer is scheduled to run.
-
isComputableValue
boolean isComputableValue()Return true if the Observer is a ComputableValue.- Returns:
- true if the Observer is a ComputableValue.
-
isReadOnly
boolean isReadOnly()Return true if the Observer will use a read-only transaction.- Returns:
- true if the Observer will use a read-only transaction.
-
getPriority
Return the priority of the Observer.- Returns:
- the priority of the Observer.
-
asComputableValue
Convert the Observer to a ComputableValue. This method should only be called ifisComputableValue()
returns true.- Returns:
- the ComputableValue instance.
-
getDependencies
Return the list of dependencies of the Observer. The list is an immutable copy of the dependencies of theObserver
. If theObserver
is currently running (i.e.isRunning()
returns true) then the dependencies are provisional and may be added to as transaction completes.- Returns:
- the list of dependencies for the Observer.
-
getComponent
Return the component for the specified Observer. This method should not be invoked ifArez.areNativeComponentsEnabled()
returns false.- Returns:
- the component that contains Observer if any.
-