public class StaticInterceptor extends Object implements Interceptor
key: Key to use in static header insertion. (default is "key")
value: Value to use in static header insertion. (default is "value")
preserveExisting: Whether to preserve an existing value for 'key' (default is true)
Sample config:
  
   agent.sources.r1.type = SEQ 
   agent.sources.r1.interceptors = i1 
   agent.sources.r1.interceptors.i1.type = static 
   agent.sources.r1.interceptors.i1.preserveExisting = false 
   agent.sources.r1.interceptors.i1.key = datacenter 
   agent.sources.r1.interceptors.i1.value= NYC_01 
 
   agent.sources.r1.channels = c1
| Modifier and Type | Class and Description | 
|---|---|
static class  | 
StaticInterceptor.Builder
Builder which builds new instance of the StaticInterceptor. 
 | 
static class  | 
StaticInterceptor.Constants  | 
| 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)
Modifies events in-place. 
 | 
List<Event> | 
intercept(List<Event> events)
Delegates to  
intercept(Event) in a loop. | 
public void initialize()
Interceptorinitialize in interface Interceptorpublic Event intercept(Event event)
intercept in interface Interceptorevent - Event to be interceptednull if the Event
 is to be dropped (i.e. filtered out).public List<Event> intercept(List<Event> events)
intercept(Event) in a loop.intercept in interface Interceptorevents - public void close()
Interceptorclose in interface InterceptorCopyright © 2009-2022 Apache Software Foundation. All Rights Reserved.