Class AbstractHandlerLoader<E extends ErrorHandler>

java.lang.Object
org.elasticsearch.hadoop.handler.impl.AbstractHandlerLoader<E>
Type Parameters:
E - The ErrorHandlers being created.
All Implemented Interfaces:
HandlerLoader<E>, org.elasticsearch.hadoop.serialization.SettingsAware

public abstract class AbstractHandlerLoader<E extends ErrorHandler> extends Object implements org.elasticsearch.hadoop.serialization.SettingsAware, HandlerLoader<E>
Performs the construction and initialization of ErrorHandler instances, implementations of which may be provided by third parties.
  • Constructor Details

    • AbstractHandlerLoader

      public AbstractHandlerLoader(Class<E> expected)
  • Method Details

    • setSettings

      public void setSettings(Settings settings)
      Specified by:
      setSettings in interface org.elasticsearch.hadoop.serialization.SettingsAware
    • getSettings

      protected Settings getSettings()
    • loadHandlers

      public List<E> loadHandlers()
      Specified by:
      loadHandlers in interface HandlerLoader<E extends ErrorHandler>
    • getHandlersPropertyName

      protected abstract String getHandlersPropertyName()
      Returns:
      the property name to use for getting the list of handler names
    • getHandlerPropertyName

      protected abstract String getHandlerPropertyName()
      Returns:
      the prefix for creating the properties to use for getting handler specific settings
    • loadBuiltInHandler

      protected abstract E loadBuiltInHandler(AbstractHandlerLoader.NamedHandlers handlerName)
      Builds the integration specific built-in handler for the job described by the handler name.
      Parameters:
      handlerName - The built in handler implementation that one should provide
      Returns:
      an instance of the built in handler