Package VASSAL.tools.opcache
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
{link #imageOpChange} on completion.
- Since:
- 3.1.0
- Author:
- Joel Uckelman
-
Method Summary
Modifier and TypeMethodDescriptionvoidcancelled(Op<V> op, CancellationException e) Callback which is run when the observedOpis cancelled.voidfailed(Op<V> op, ExecutionException e) Callback which is run when the observedOpfails.voidinterrupted(Op<V> op, InterruptedException e) Callback which is run when the observedOpis interrupted.voidCallback which is run when the observedOpcompletes successfully.
-
Method Details
-
succeeded
Callback which is run when the observedOpcompletes successfully.- Parameters:
op- the successfully completedOpval- the value of theOp
-
cancelled
Callback which is run when the observedOpis cancelled.- Parameters:
op- the cancelledOpe- theCancellationExceptionthrown when theOpwas cancelled
-
interrupted
Callback which is run when the observedOpis interrupted.- Parameters:
op- the interruptedOpe- theInterruptedExceptionthrown when theOpwas interrupted
-
failed
Callback which is run when the observedOpfails.- Parameters:
op- the failedOpe- theExecutionExceptionthrown when theOpfailed
-