org.apache.flume.interceptor
Interface Interceptor

All Known Implementing Classes:
HostInterceptor, InterceptorChain, RegexExtractorInterceptor, RegexFilteringInterceptor, StaticInterceptor, TimestampInterceptor

@InterfaceAudience.Public
@InterfaceStability.Stable
public interface Interceptor


Nested Class Summary
static interface Interceptor.Builder
          Builder implementations MUST have a no-arg constructor
 
Method Summary
 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-2013 Apache Software Foundation. All Rights Reserved.