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)
IBlaubotConnectionStateMachineListener
ConnectionStateMachine
's state changed to state.onStateChanged
in interface IBlaubotConnectionStateMachineListener
oldState
- the former state (can be null)newState
- the new statepublic void onStateMachineStopped()
IBlaubotConnectionStateMachineListener
ConnectionStateMachine
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 IBlaubotConnectionStateMachineListener
public void onStateMachineStarted()
IBlaubotConnectionStateMachineListener
ConnectionStateMachine
changes it's IBlaubotState
from the StoppedState
to another IBlaubotState
.onStateMachineStarted
in interface IBlaubotConnectionStateMachineListener