Interface StateMachineSerialisationService<S,E>

Type Parameters:
S - the type of state
E - the type of event
All Known Implementing Classes:
AbstractKryoStateMachineSerialisationService, KryoStateMachineSerialisationService

public interface StateMachineSerialisationService<S,E>
Generic interface to handle serialisation in a state machine.
Author:
Janne Valkealahti
  • Method Details

    • serialiseStateMachineContext

      byte[] serialiseStateMachineContext(StateMachineContext<S,E> context) throws Exception
      Serialise state machine context into byte array.
      Parameters:
      context - the context
      Returns:
      the data as byte[]
      Throws:
      Exception - the exception when serialisation fails
    • deserialiseStateMachineContext

      StateMachineContext<S,E> deserialiseStateMachineContext(byte[] data) throws Exception
      Deserialise state machine context from byte array.
      Parameters:
      data - the data
      Returns:
      the state machine context
      Throws:
      Exception - the exception when deserialisation fails