org.apache.flume.interceptor

## Interface Interceptor

- All Known Implementing Classes:
    HostInterceptor, InterceptorChain, MorphlineInterceptor, RegexExtractorInterceptor, RegexFilteringInterceptor, SearchAndReplaceInterceptor, StaticInterceptor, TimestampInterceptor, UUIDInterceptor

      @InterfaceAudience.Public
      @InterfaceStability.Stable
      public interface Interceptor

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Interface and Description
    --- | ---
    `static interface` | `Interceptor.Builder` Builder implementations MUST have a no-arg constructor

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()` Perform any closing / shutdown needed by the Interceptor.
    `void` | `initialize()` Any initialization / startup needed by the Interceptor.
    `Event` | `intercept(Event event)` Interception of a single `Event`.
    `List<Event>` | `intercept(List<Event> events)` Interception of a batch of events.

- - ### Method Detail

    - #### initialize

          void initialize()

      Any initialization / startup needed by the Interceptor.

    - #### intercept

          Event intercept(Event event)

      Interception of a single `Event`.
      Parameters:
        `event` - Event to be intercepted
      Returns:
        Original or modified event, or `null` if the Event is to be dropped (i.e. filtered out).

    - #### intercept

          List<Event> intercept(List<Event> events)

      Interception of a batch of events.
      Parameters:
        `events` - Input list of events
      Returns:
        Output list of events. The size of output list MUST NOT BE GREATER than the size of the input list (i.e. transformation and removal ONLY). Also, this method MUST NOT return `null`. If all events are dropped, then an empty List is returned.

    - #### close

          void close()

      Perform any closing / shutdown needed by the Interceptor.

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