|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ReturnType
- The type of data returned by the supervised command.public interface Supervisor<ReturnType>
A Supervisor
allows to monitor and control a Command
.
Method Summary | |
---|---|
ReturnType |
get()
Waits if necessary for the computation to complete, and then retrieves its result. |
ReturnType |
get(long timeout,
TimeUnit unit)
Waits if necessary for at most the given time for the computation to complete, and then retrieves its result, if available. |
String |
getCommandDescription()
Returns the localized Command description. |
String |
getCommandLabel()
Returns the localized Command name. |
void |
killCommand()
|
Methods inherited from interface org.keridwen.core.data.model.progress.Controllable |
---|
addControllableListener, clearControllableListener, getState, interrupt, isInterrupted, isInterruptible, isPausable, pause, removeControllableListener, resume |
Methods inherited from interface org.keridwen.core.data.model.progress.Progressable |
---|
addProgressableListener, clearProgressableListener, getProgress, getState, isDetermined, removeProgressableListener |
Method Detail |
---|
ReturnType get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
timeout
- the maximum time to waitunit
- the time unit of the timeout argument
CancellationException
- if the computation was cancelled
ExecutionException
- if the computation threw an exception
InterruptedException
- if the current thread was interrupted while waiting
TimeoutException
- if the wait timed outReturnType get() throws InterruptedException, ExecutionException
CancellationException
- if the computation was cancelled
ExecutionException
- if the computation threw an exception
InterruptedException
- if the current thread was interrupted while waitingString getCommandLabel()
Command
name.
String getCommandDescription()
Command
description.
void killCommand()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |