Package arez.spy

Interface ObserverInfo

All Superinterfaces:
ElementInfo

public interface ObserverInfo extends ElementInfo
A representation of a observer instance exposed to spy framework.
  • 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 where isComputableValue() returns true if the observer is not disposed and either the ComputableValue is being observed or has been configured as a keepAlive 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

      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

      @Nonnull Priority 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 if isComputableValue() 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 the Observer. If the Observer 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 if Arez.areNativeComponentsEnabled() returns false.
      Returns:
      the component that contains Observer if any.