Package org.axonframework.serialization
Class JavaSerializer.Builder
java.lang.Object
org.axonframework.serialization.JavaSerializer.Builder
- Enclosing class:
JavaSerializer
Builder class to instantiate a
JavaSerializer.
The RevisionResolver is defaulted to an SerialVersionUIDRevisionResolver.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Initializes aJavaSerializeras specified through this Builder.revisionResolver(RevisionResolver revisionResolver) Sets theRevisionResolverused to resolve the revision from an object to be serialized.protected voidvalidate()Validates whether the fields contained in this Builder are set accordingly.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
revisionResolver
Sets theRevisionResolverused to resolve the revision from an object to be serialized. Defaults to anSerialVersionUIDRevisionResolverwhich resolvesserialVersionUIDof a class as the revision.- Parameters:
revisionResolver- aRevisionResolverused to resolve the revision from an object to be serialized- Returns:
- the current Builder instance, for fluent interfacing
-
build
Initializes aJavaSerializeras specified through this Builder.- Returns:
- a
JavaSerializeras specified through this Builder
-
validate
Validates whether the fields contained in this Builder are set accordingly.- Throws:
AxonConfigurationException- if one field is asserted to be incorrect according to the Builder's specifications
-