com.espertech.esper.adapter
Class AdapterStateManager

java.lang.Object
  extended by com.espertech.esper.adapter.AdapterStateManager

public class AdapterStateManager
extends java.lang.Object

A utility to manage the state transitions for an InputAdapter.


Constructor Summary
AdapterStateManager()
           
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AdapterStateManager

public AdapterStateManager()
Method Detail

getState

public AdapterState getState()
Returns:
the state

start

public void start()
           throws IllegalStateTransitionException
Transition into the STARTED state (from the OPENED state).

Throws:
IllegalStateTransitionException - if the transition is not allowed

stop

public void stop()
          throws IllegalStateTransitionException
Transition into the OPENED state.

Throws:
IllegalStateTransitionException - if the transition isn't allowed

pause

public void pause()
           throws IllegalStateTransitionException
Transition into the PAUSED state.

Throws:
IllegalStateTransitionException - if the transition isn't allowed

resume

public void resume()
            throws IllegalStateTransitionException
Transition into the STARTED state (from the PAUSED state).

Throws:
IllegalStateTransitionException - if the state transition is not allowed

destroy

public void destroy()
             throws IllegalStateTransitionException
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.


© 2006-2015 EsperTech Inc.
All rights reserved.
Visit us at espertech.com