public interface IBlaubotState
ConnectionStateMachine. A state may do it's setup in the handleState() method and wait for events received from it's on...() methods. These methods are partly equivalent to the
IBlaubotDiscoveryEventListenermethods. After each call of one of the on...() methods, a
IBlaubotStatehas to be returned. If the
ConnectionStateMachineshould stay in the current state (this), simply return this - the state will not be dismissed then. If a state is dismissed by the
ConnectionStateMachine, the onDismiss() method will be called to allow a state to clean up.
|Modifier and Type||Method and Description|
Gets called if this state was set as currentState by the
Gets called when an
Gets called if a previously established connection from a remote
Gets called if a new connection from a remote
This is a helper for Timeout-Events needed for some
void handleState(StateMachineSession stateMachineSession)
stateMachineSession- a session object with access to the relevant
IBlaubotState onAdminMessage(AbstractAdminMessage adminMessage)
adminMessage- the received admin message
IBlaubotState onDeviceDiscoveryEvent(AbstractBlaubotDeviceDiscoveryEvent discoveryEvent)
IBlaubotDevice. Note: For each discoverable
AbstractBlaubotDeviceDiscoveryEventsubclass can be found in the de.hsrm.blaubot.statemachine.events package.
discoveryEvent- the discovery event.
IBlaubotState onConnectionEstablished(IBlaubotConnection connection)
connection- the established connection
IBlaubotState onConnectionClosed(IBlaubotConnection connection)
IBlaubotDevicewas closed due to an exception or intentionally.
connection- the closed connection
IBlaubotState onTimeoutEvent(AbstractTimeoutStateMachineEvent timeoutEvent)
IBlaubotStatecan subclass the
AbstractTimeoutStateMachineEventand push it to the
ConnectionStateMachine. A timeout event contains the state that issued the timeout so a
IBlaubotStatecan check if the timeout event belongs to himself or ignore it when this is not the case.
timeoutEvent- the occured event