Package com.gruelbox.transactionoutbox
Class DefaultInvocationSerializer
java.lang.Object
com.gruelbox.transactionoutbox.DefaultInvocationSerializer
- All Implemented Interfaces:
InvocationSerializer
A locked-down serializer which supports a limited list of primitives and simple JDK value types.
Only the following are supported:
Invocation
itself- Primitive types such as
int
ordouble
or the boxed equivalents String
Date
UUID
- The
java.time
classes: - Arrays specifically typed to one of the above types
- Any types specifically passed in, which must be GSON compatible.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
deserializeInvocation
(Reader reader) Deserializes an invocation from the supplied reader.void
serializeInvocation
(Invocation invocation, Writer writer) Serializes an invocation to the supplied writer.
-
Method Details
-
serializeInvocation
Description copied from interface:InvocationSerializer
Serializes an invocation to the supplied writer.- Specified by:
serializeInvocation
in interfaceInvocationSerializer
- Parameters:
invocation
- The invocation.writer
- The writer.
-
deserializeInvocation
Description copied from interface:InvocationSerializer
Deserializes an invocation from the supplied reader.- Specified by:
deserializeInvocation
in interfaceInvocationSerializer
- Parameters:
reader
- The reader.- Returns:
- The deserialized invocation.
-
builder
-