Package org.axonframework.queryhandling
Class LoggingQueryInvocationErrorHandler.Builder
java.lang.Object
org.axonframework.queryhandling.LoggingQueryInvocationErrorHandler.Builder
- Enclosing class:
LoggingQueryInvocationErrorHandler
Builder class to instantiate a
LoggingQueryInvocationErrorHandler.
The Logger is defaulted to a LoggerFactory.getLogger(Class) call using
LoggingQueryInvocationErrorHandler.class.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Initializes aLoggingQueryInvocationErrorHandleras specified through this Builder.logger(org.slf4j.Logger logger) Sets theLoggerto log errors with from query handlers.protected voidvalidate()Validates whether the fields contained in this Builder are set accordingly.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
logger
Sets theLoggerto log errors with from query handlers. Defaults to the result ofLoggerFactory.getLogger(Class), usingLoggingQueryInvocationErrorHandler.classas input. Defaults to aLoggerFactory.getLogger(Class)call, providing theLoggingQueryInvocationErrorHandlertype.- Parameters:
logger- theLoggerto log errors with from query handlers- Returns:
- the current Builder instance, for fluent interfacing
-
build
Initializes aLoggingQueryInvocationErrorHandleras specified through this Builder.- Returns:
- a
LoggingQueryInvocationErrorHandleras 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
-