Interface OpObserver<V>

All Known Subinterfaces:
ImageOpObserver
All Known Implementing Classes:
Repainter

public interface OpObserver<V>
An OpObserver is notified when its Op completes..

Objects implementing OpObserver are intended to be passed as an argument to {@link Op.get(Key,OpObserver)} or {@link Op.getFuture(Key,OpObserver)} which which call back to #imageOpChange on completion.

Since:
3.1.0
Author:
Joel Uckelman
  • Method Details

    • succeeded

      void succeeded​(Op<V> op, V val)
      Callback which is run when the observed Op completes successfully.
      Parameters:
      op - the successfully completed Op
      val - the value of the Op
    • cancelled

      void cancelled​(Op<V> op, CancellationException e)
      Callback which is run when the observed Op is cancelled.
      Parameters:
      op - the cancelled Op
      e - the CancellationException thrown when the Op was cancelled
    • interrupted

      void interrupted​(Op<V> op, InterruptedException e)
      Callback which is run when the observed Op is interrupted.
      Parameters:
      op - the interrupted Op
      e - the InterruptedException thrown when the Op was interrupted
    • failed

      void failed​(Op<V> op, ExecutionException e)
      Callback which is run when the observed Op fails.
      Parameters:
      op - the failed Op
      e - the ExecutionException thrown when the Op failed