public class LoggingQueryInvocationErrorHandler extends Object implements QueryInvocationErrorHandler
Logger
.Constructor and Description |
---|
LoggingQueryInvocationErrorHandler()
Initialize the error handler to log to a logger registered for this class.
|
LoggingQueryInvocationErrorHandler(org.slf4j.Logger logger)
Initialize the error handler to use the given
logger to log errors from query handlers. |
Modifier and Type | Method and Description |
---|---|
void |
onError(Throwable error,
QueryMessage<?,?> queryMessage,
MessageHandler messageHandler)
Invoked when an error occurred while invoking a message handler in a scatter-gather query.
|
public LoggingQueryInvocationErrorHandler()
public LoggingQueryInvocationErrorHandler(org.slf4j.Logger logger)
logger
to log errors from query handlers.logger
- The logger to log errors withpublic 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–2017. All rights reserved.