org.apache.flume.source.http

## Class BLOBHandler

- java.lang.Object
- - org.apache.flume.source.http.BLOBHandler

- All Implemented Interfaces:
    Configurable, HTTPSourceHandler

      public class BLOBHandler
      extends Object
      implements HTTPSourceHandler

  BLOBHandler for HTTPSource that accepts any binary stream of data as event.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `DEFAULT_MANDATORY_PARAMETERS`
    `static String` | `MANDATORY_PARAMETERS`
    `static String` | `PARAMETER_SEPARATOR`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `BLOBHandler()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `configure(Context context)` Request the implementing class to (re)configure itself.
    `List<Event>` | `getEvents(javax.servlet.http.HttpServletRequest request)` Takes an HttpServletRequest and returns a list of Flume Events.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### MANDATORY_PARAMETERS

          public static final String MANDATORY_PARAMETERS

      See Also:
        Constant Field Values

    - #### DEFAULT_MANDATORY_PARAMETERS

          public static final String DEFAULT_MANDATORY_PARAMETERS

      See Also:
        Constant Field Values

    - #### PARAMETER_SEPARATOR

          public static final String PARAMETER_SEPARATOR

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### BLOBHandler

          public BLOBHandler()

  - ### Method Detail

    - #### getEvents

          public List<Event> getEvents(javax.servlet.http.HttpServletRequest request)
                                throws Exception

      Takes an HttpServletRequest and returns a list of Flume Events. If this request cannot be parsed into Flume events based on the format this method will throw an exception. This method may also throw an exception if there is some sort of other error.

      Specified by:
        `getEvents` in interface `HTTPSourceHandler`
      Parameters:
        `request` - The request to be parsed into Flume events.
      Returns:
        List of Flume events generated from the request.
      Throws:
        `HTTPBadRequestException` - If the was not parsed correctly into an event because the request was not in the expected format.
        `Exception` - If there was an unexpected error.

    - #### configure

          public void configure(Context context)

      Description copied from interface: `Configurable`

      Request the implementing class to (re)configure itself.

      When configuration parameters are changed, they must be reflected by the component asap.

      There are no thread safety guarantees on when configure might be called.

      Specified by:
        `configure` in interface `Configurable`

Copyright © 2009-2016 Apache Software Foundation. All Rights Reserved.