public class LoggingQueryInvocationErrorHandler extends Object implements QueryInvocationErrorHandler
Logger
.Modifier and Type | Class and Description |
---|---|
static class |
LoggingQueryInvocationErrorHandler.Builder
Builder class to instantiate a
LoggingQueryInvocationErrorHandler . |
Modifier | Constructor and Description |
---|---|
protected |
LoggingQueryInvocationErrorHandler(LoggingQueryInvocationErrorHandler.Builder builder)
Instantiate a
LoggingQueryInvocationErrorHandler based on the fields contained in the LoggingQueryInvocationErrorHandler.Builder . |
Modifier and Type | Method and Description |
---|---|
static LoggingQueryInvocationErrorHandler.Builder |
builder()
Instantiate a Builder to be able to create a
LoggingQueryInvocationErrorHandler . |
void |
onError(Throwable error,
QueryMessage<?,?> queryMessage,
MessageHandler messageHandler)
Invoked when an error occurred while invoking a message handler in a scatter-gather query.
|
protected LoggingQueryInvocationErrorHandler(LoggingQueryInvocationErrorHandler.Builder builder)
LoggingQueryInvocationErrorHandler
based on the fields contained in the LoggingQueryInvocationErrorHandler.Builder
.builder
- the LoggingQueryInvocationErrorHandler.Builder
used to instantiate a LoggingQueryInvocationErrorHandler
instancepublic static LoggingQueryInvocationErrorHandler.Builder builder()
LoggingQueryInvocationErrorHandler
.
The Logger
is defaulted to a LoggerFactory.getLogger(Class)
call using
LoggingQueryInvocationErrorHandler.class
.
LoggingQueryInvocationErrorHandler
public void onError(Throwable error, QueryMessage<?,?> queryMessage, MessageHandler messageHandler)
QueryInvocationErrorHandler
Note that this handler is not used for point-to-point queries. In that case, exceptions are reported directly to the invoker. Query Bus implementation may choose to implement point-to-point queries as scatter-gather, and only reporting the first answer returned. In that case, this method is invoked, and any propagated exceptions may or may not be reported to the sender of the query.
onError
in interface QueryInvocationErrorHandler
error
- The error that occurredqueryMessage
- The message causing the exception in the handlermessageHandler
- The handler that reported the exceptionCopyright © 2010–2019. All rights reserved.