Class DefaultDeadLetterStatementFactory.Builder<E extends EventMessage>
java.lang.Object
org.axonframework.messaging.eventhandling.deadletter.jdbc.DefaultDeadLetterStatementFactory.Builder<E>
- Type Parameters:
E- An implementation ofEventMessagewithin theDeadLetterthis factory constructsPreparedStatementsfor.
- Enclosing class:
DefaultDeadLetterStatementFactory<E extends EventMessage>
protected static class DefaultDeadLetterStatementFactory.Builder<E extends EventMessage>
extends Object
Builder class to instantiate a
DefaultDeadLetterStatementFactory.
The schema is defaulted to a DeadLetterSchema.defaultSchema().
The generic Converter and
EventConverter are hard requirements and should be provided.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Initializes aDefaultDeadLetterStatementFactoryas specified through this Builder.eventConverter(EventConverter eventConverter) Sets theEventConverterto convert theevent payloadandMetadataof theDeadLetterwhen storing it to a database.genericConverter(Converter genericConverter) Sets theConverterto convert theTrackingTokenand diagnostics of theDeadLetterwhen storing it to the database.schema(DeadLetterSchema schema) Sets the givenschemaused to define the table and column names used when constructing allPreparedStatements.protected voidvalidate()Validate whether the fields contained in this Builder are set accordingly.
-
Constructor Details
-
Builder
protected Builder()
-
-
Method Details
-
schema
Sets the givenschemaused to define the table and column names used when constructing allPreparedStatements. Defaults to aDeadLetterSchema.defaultSchema().- Parameters:
schema- TheDeadLetterSchemaused to define the table and column names used when constructing allPreparedStatements.- Returns:
- The current Builder, for fluent interfacing.
-
genericConverter
Sets theConverterto convert theTrackingTokenand diagnostics of theDeadLetterwhen storing it to the database.- Parameters:
genericConverter- The converter to use forTrackingTokensand diagnostics.- Returns:
- The current Builder, for fluent interfacing.
-
eventConverter
Sets theEventConverterto convert theevent payloadandMetadataof theDeadLetterwhen storing it to a database.- Parameters:
eventConverter- The event converter to use forevent payloads andMetadatainstances.- Returns:
- The current Builder, for fluent interfacing.
-
build
Initializes aDefaultDeadLetterStatementFactoryas specified through this Builder.- Returns:
- A
DefaultDeadLetterStatementFactoryas specified through this Builder.
-
validate
protected void validate()Validate whether the fields contained in this Builder are set accordingly.- Throws:
AxonConfigurationException- When one field asserts to be incorrect according to the Builder's specifications.
-