M
- the type of messages delivered to consumers@FunctionalInterface
public interface ConsumerErrorHandler<M extends com.google.protobuf.Message>
extends java.util.function.BiConsumer<io.spine.client.MessageConsumer<M,?>,java.lang.Throwable>
Modifier and Type | Method and Description |
---|---|
static <M extends com.google.protobuf.Message> |
logError(com.google.common.flogger.FluentLogger logger,
java.lang.String messageFormat,
java.lang.Class<? extends com.google.protobuf.Message> type)
Obtains the handler which logs the fact of the error using
the severe level of the passed logger.
|
static <M extends com.google.protobuf.Message> ConsumerErrorHandler<M> logError(com.google.common.flogger.FluentLogger logger, java.lang.String messageFormat, java.lang.Class<? extends com.google.protobuf.Message> type)
M
- the type of the messages delivered to the consumerlogger
- the instance of the logger to use for reporting the errormessageFormat
- the formatting message where the first parameter is the consumer which caused
the error, and the second parameter is the type of the message which caused the error