Package org.graylog.failure
Interface FailureHandler
- All Known Implementing Classes:
DefaultFailureHandler
public interface FailureHandler
A handler for failures, occurring at different stages of message processing
(e.g. pipeline processing, extraction, Elasticsearch indexing). To register
a handler implementation you need to inform Guice about the new dependency
via
Multibinder
:
Multibinder<FailureHandler> failureHandlerBinder = Multibinder.newSetBinder(binder(), FailureHandler.class);
failureHandlerBinder.addBinding().to(MyCustomFailureHandler.class);
-
Method Summary
Modifier and TypeMethodDescriptionvoid
handle
(FailureBatch failureBatch) Handles a batch of failuresboolean
Guides the main failure handling service, when deciding whether this handler is available for processing.boolean
supports
(FailureBatch failureBatch) Guides the main failure handling service, when deciding whether this handler is suitable for a certain batch of failures
-
Method Details
-
handle
Handles a batch of failures- Parameters:
failureBatch
- a batch of failures, supported by this handler
-
supports
Guides the main failure handling service, when deciding whether this handler is suitable for a certain batch of failures- Parameters:
failureBatch
- a batch of failures to test- Returns:
- true if the batch can be processed by this handler
-
isEnabled
boolean isEnabled()Guides the main failure handling service, when deciding whether this handler is available for processing.- Returns:
- true if this handler can accept failure batches
-