Package com.offbynull.coroutines.user
Class CoroutineReader.DefaultCoroutineDeserializer
- java.lang.Object
-
- com.offbynull.coroutines.user.CoroutineReader.DefaultCoroutineDeserializer
-
- All Implemented Interfaces:
CoroutineReader.CoroutineDeserializer
- Enclosing class:
- CoroutineReader
public static final class CoroutineReader.DefaultCoroutineDeserializer extends java.lang.Object implements CoroutineReader.CoroutineDeserializer
Default implementation ofCoroutineReader.CoroutineDeserializer
(uses Java's built-in serialization mechanism). This implementation has the the following restrictions...- Deserialization will fail if you have any synchronized blocks (monitor locks).
- The classes that make up the current state of your coroutine must be serializable (must implement
Serializable
). - The variables/operands that make up the current state of your coroutine must be serializable (must either be primitives or
implement
Serializable
).
-
-
Constructor Summary
Constructors Constructor Description DefaultCoroutineDeserializer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SerializedState
deserialize(byte[] data)
Deserializes a coroutine.
-
-
-
Method Detail
-
deserialize
public SerializedState deserialize(byte[] data)
Description copied from interface:CoroutineReader.CoroutineDeserializer
Deserializes a coroutine.- Specified by:
deserialize
in interfaceCoroutineReader.CoroutineDeserializer
- Parameters:
data
- byte array to deserialize- Returns:
- deserialized state
-
-