Interface StateMachineSerialisationService<S,E>
- Type Parameters:
S
- the type of stateE
- the type of event
- All Known Implementing Classes:
AbstractKryoStateMachineSerialisationService
,KryoStateMachineSerialisationService
public interface StateMachineSerialisationService<S,E>
Generic interface to handle serialisation in a state machine.
-
Method Summary
Modifier and TypeMethodDescriptiondeserialiseStateMachineContext
(byte[] data) Deserialise state machine context from byte array.byte[]
serialiseStateMachineContext
(StateMachineContext<S, E> context) Serialise state machine context into byte array.
-
Method Details
-
serialiseStateMachineContext
Serialise state machine context into byte array.- Parameters:
context
- the context- Returns:
- the data as byte[]
- Throws:
Exception
- the exception when serialisation fails
-
deserialiseStateMachineContext
Deserialise state machine context from byte array.- Parameters:
data
- the data- Returns:
- the state machine context
- Throws:
Exception
- the exception when deserialisation fails
-