public class ConnectionStateMachineAdapter extends java.lang.Object implements IBlaubotConnectionStateMachineListener
IBlaubotConnectionStateMachineListener.| Constructor and Description |
|---|
ConnectionStateMachineAdapter() |
| Modifier and Type | Method and Description |
|---|---|
void |
onStateChanged(IBlaubotState oldState,
IBlaubotState newState)
Gets called when the
ConnectionStateMachine's state changed to state. |
void |
onStateMachineStarted()
Gets called when the
ConnectionStateMachine changes it's IBlaubotState
from the StoppedState to another IBlaubotState. |
void |
onStateMachineStopped()
Gets called when the
ConnectionStateMachine stopped. |
public void onStateChanged(IBlaubotState oldState, IBlaubotState newState)
IBlaubotConnectionStateMachineListenerConnectionStateMachine's state changed to state.onStateChanged in interface IBlaubotConnectionStateMachineListeneroldState - the former state (can be null)newState - the new statepublic void onStateMachineStopped()
IBlaubotConnectionStateMachineListenerConnectionStateMachine stopped.
This means a state change to StoppedState and is a shorthand for
public void onStateChange(IBlaubotState state) {
if(state instanceof StoppedState) {
// code
}
}onStateMachineStopped in interface IBlaubotConnectionStateMachineListenerpublic void onStateMachineStarted()
IBlaubotConnectionStateMachineListenerConnectionStateMachine changes it's IBlaubotState
from the StoppedState to another IBlaubotState.onStateMachineStarted in interface IBlaubotConnectionStateMachineListener