|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
T - The type of the command whose runtime information is managed by
the container.R - The type of the result which describes the reason why a container
reached the finished state.S - The type of the object that represents the execution state of the
container.public interface ICommandExecutionContainer<T extends ICommand<T,?>,R extends IExecutionResult,S extends IExecutionState<?>>
An interface describing the methods of an unit responsible for the management of the runtime information of a command.
IExecutionState| Method Summary | |
|---|---|
R |
awaitFinalized()
A method which blocks the calling thread until the command execution container is finalized or an interrupted exception occurs. |
R |
awaitFinalized(long timeout,
TimeUnit unit)
A method which blocks the calling thread until the command execution container is finalized or an interrupted exception occurs, or timeout expires. |
void |
awaitFinished()
A method which blocks the calling thread until the command execution container is finished or an interrupted exception occurs. |
void |
awaitFinished(long timeout,
TimeUnit unit)
A method which blocks the calling thread until the command execution container is finished, an interrupted exception occurs or the timeout is expired. |
void |
cancel()
Cancels the execution of the associated command. |
T |
getCommand()
Gets a deep copy of the command executed by this container. |
R |
getResult()
Returns the result of execution of the container. |
S |
getState()
Gets the current state of the container. |
| Method Detail |
|---|
void cancel()
void awaitFinished()
void awaitFinished(long timeout,
TimeUnit unit)
throws TimeoutException
timeout - time to wait for command execution to be finishedunit - unit for time parameter
TimeoutException - The exception is thrown when the timeout is reached.R awaitFinalized()
R awaitFinalized(long timeout,
TimeUnit unit)
throws TimeoutException
timeout - time to wait for command execution to be finishedunit - unit for time parameter
TimeoutException - The exception is thrown when the timeout is reached.T getCommand()
S getState()
R getResult()
The returned object contains the information why and how the container reached the state finished.
Result is returned only if container has reached state
IExecutionState.isFinalized(). For some containers this state is
reached at the same moment as the IExecutionState.isFinished(),
by some it is possible that some amount of time is needed to prepare the
execution result and finalized state comes after the finished state.
IllegalStateException - if the command execution container is not finalized.IExecutionState,
IExecutionResult
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||