Class DefaultFailureHandler

java.lang.Object
org.graylog.failure.DefaultFailureHandler
All Implemented Interfaces:
FailureHandler

public class DefaultFailureHandler extends Object implements FailureHandler
A fallback failure handler, which persists submitted failures in Mongo via IndexFailureService. Only indexing failures supported.
  • Constructor Details

    • DefaultFailureHandler

      @Inject public DefaultFailureHandler(IndexFailureService indexFailureService)
  • Method Details

    • handle

      public void handle(FailureBatch failureBatch)
      Description copied from interface: FailureHandler
      Handles a batch of failures
      Specified by:
      handle in interface FailureHandler
      Parameters:
      failureBatch - a batch of failures, supported by this handler
    • supports

      public boolean supports(FailureBatch failureBatch)
      Description copied from interface: FailureHandler
      Guides the main failure handling service, when deciding whether this handler is suitable for a certain batch of failures
      Specified by:
      supports in interface FailureHandler
      Parameters:
      failureBatch - a batch of failures to test
      Returns:
      true if the batch can be processed by this handler
    • isEnabled

      public boolean isEnabled()
      Description copied from interface: FailureHandler
      Guides the main failure handling service, when deciding whether this handler is available for processing.
      Specified by:
      isEnabled in interface FailureHandler
      Returns:
      true if this handler can accept failure batches