public class AdapterStateManager extends Object
Constructor and Description |
---|
AdapterStateManager() |
Modifier and Type | Method and Description |
---|---|
void |
destroy()
Transition into the DESTROYED state.
|
void |
disallowStateTransitions()
Disallow future state changes, and throw an IllegalStateTransitionException if they
are attempted.
|
AdapterState |
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.
|
public AdapterState getState()
public void start() throws IllegalStateTransitionException
IllegalStateTransitionException
- if the transition is not allowedpublic void stop() throws IllegalStateTransitionException
IllegalStateTransitionException
- if the transition isn't allowedpublic void pause() throws IllegalStateTransitionException
IllegalStateTransitionException
- if the transition isn't allowedpublic void resume() throws IllegalStateTransitionException
IllegalStateTransitionException
- if the state transition is not allowedpublic void destroy() throws IllegalStateTransitionException
IllegalStateTransitionException
- if the transition isn't allowedpublic void disallowStateTransitions()