| Modifier and Type | Method and Description |
|---|---|
Class<? extends State> |
call()
Executes the task in this state.
|
Class<? extends State> call() throws CouldNotPerformException
WaitTenSeconds implements State {
public Class<State> call() {
try {
Thread.sleep(10000);
} catch (InterruptedException ex) {
// handle interruption as shutdown
return FinalState.class;
}
return NextStateToProcessClass.class;
}
}
call in interface Callable<Class<? extends State>>CouldNotPerformException - is thrown if the state execution has failed.Copyright © 2015–2018 openbase.org. All rights reserved.