Class AdapterStateManager
java.lang.Object
com.espertech.esper.runtime.client.util.AdapterStateManager
A utility to manage the state transitions for an InputAdapter.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
destroy()
Transition into the DESTROYED state.void
Disallow future state changes, and throw an IllegalStateTransitionException if they are attempted.getState()
void
pause()
Transition into the PAUSED state.void
resume()
Transition into the STARTED state (from the PAUSED state).void
start()
Transition into the STARTED state (from the OPENED state).void
stop()
Transition into the OPENED state.
-
Constructor Details
-
AdapterStateManager
public AdapterStateManager()
-
-
Method Details
-
getState
- Returns:
- the state
-
start
Transition into the STARTED state (from the OPENED state).- Throws:
IllegalStateTransitionException
- if the transition is not allowed
-
stop
Transition into the OPENED state.- Throws:
IllegalStateTransitionException
- if the transition isn't allowed
-
pause
Transition into the PAUSED state.- Throws:
IllegalStateTransitionException
- if the transition isn't allowed
-
resume
Transition into the STARTED state (from the PAUSED state).- Throws:
IllegalStateTransitionException
- if the state transition is not allowed
-
destroy
Transition into the DESTROYED state.- Throws:
IllegalStateTransitionException
- if the transition isn't allowed
-
disallowStateTransitions
public void disallowStateTransitions()Disallow future state changes, and throw an IllegalStateTransitionException if they are attempted.
-