|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IStatefulObject<StateType,ErrorType extends Throwable>
IStatefulObject interface.
| Method Summary | |
|---|---|
void |
addStateListener(StateListener<StateType> listener)
Add on-event listener. |
void |
addStateNotifiable(StateListener<StateType> notifiable)
Add post-event notification listener. |
ErrorType |
getError()
Get error state or null |
StateType |
getState()
getState. |
void |
removeStateListener(StateListener<StateType> listener)
removeStateListener. |
void |
removeStateNotifiable(StateListener<StateType> notifiable)
removeStateNotifiable. |
StateType |
waitForState(Set<StateType> set)
Wait until state changes to one of the given states. |
StateType |
waitForState(Set<StateType> set,
long timeout,
TimeUnit unit)
Wait until state changes to one of the given states or until time out occurs. |
StateType |
waitForStateUninterruptibly(Set<StateType> set)
Wait until state changes to one of the given states. |
| Method Detail |
|---|
void addStateNotifiable(StateListener<StateType> notifiable)
notifiable - a StateListener object.void removeStateNotifiable(StateListener<StateType> notifiable)
removeStateNotifiable.
notifiable - a StateListener object.void addStateListener(StateListener<StateType> listener)
listener - a StateListener object.void removeStateListener(StateListener<StateType> listener)
removeStateListener.
listener - a StateListener object.StateType getState()
getState.
StateType waitForState(Set<StateType> set)
throws InterruptedException,
ErrorType extends Throwable
set - states that ends waiting
InterruptedException - if any.
ErrorType - if any.
ErrorType extends Throwable
StateType waitForStateUninterruptibly(Set<StateType> set)
throws ErrorType extends Throwable
set - states that ends waiting
ErrorType - if any.
ErrorType extends Throwable
StateType waitForState(Set<StateType> set,
long timeout,
TimeUnit unit)
throws InterruptedException,
TimeoutException,
ErrorType extends Throwable
set - a Set object.timeout - a long.unit - a TimeUnit object.
InterruptedException - thread was interrupted
TimeoutException - timeout occured
ErrorType - if any.
ErrorType extends ThrowableErrorType getError()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||