@@ -0,0 +1,1421 @@
+package com.architecting.ch11;%0A%0Aimport java.util.List;%0Aimport java.util.concurrent.atomic.AtomicLong;%0A%0Aimport org.apache.flume.Context;%0Aimport org.apache.flume.Event;%0Aimport org.apache.flume.interceptor.Interceptor;%0A%0Apublic class FlumeInterceptor implements Interceptor %7B%0A  private final String headerKey;%0A  private static final String CONF_HEADER_KEY = %22header%22;%0A  private static final String DEFAULT_HEADER = %22count%22;%0A  private final AtomicLong currentCount;%0A%0A  private FlumeInterceptor(Context ctx) %7B%0A    headerKey = ctx.getString(CONF_HEADER_KEY, DEFAULT_HEADER);%0A    currentCount = new AtomicLong(0);%0A  %7D%0A%0A  @Override%0A  public void initialize() %7B%0A    // No op%0A  %7D%0A%0A  @Override%0A  public Event intercept(final Event event) %7B%0A    long count = currentCount.incrementAndGet();%0A    event.getHeaders().put(headerKey, String.valueOf(count));%0A    return event;%0A  %7D%0A%0A  @Override%0A  public List%3CEvent%3E intercept(final List%3CEvent%3E events) %7B%0A    for (Event e : events) %7B%0A      intercept(e); // Ignore the return value; the event is modified in place%0A    %7D%0A    return events;%0A  %7D%0A%0A  @Override%0A  public void close() %7B%0A    // No op%0A  %7D%0A%0A  public static class FlumeInterceptorBuilder implements Interceptor.Builder %7B%0A    private Context ctx;%0A%0A    @Override%0A    public Interceptor build() %7B%0A      return new FlumeInterceptor(ctx);%0A    %7D%0A%0A    @Override%0A    public void configure(Context context) %7B%0A      this.ctx = context;%0A    %7D%0A  %7D%0A%7D%0A

Change class name, add imports, re-format.