nettyServer.close();
}
public Event poll() {
AvroFlumeEvent avroEvent = null;
try {
avroEvent = eventQueue.poll(30000, TimeUnit.MILLISECONDS);
} catch (final InterruptedException ie) {
// Ignore the exception.
}
if (avroEvent != null) {
return EventBuilder.withBody(avroEvent.getBody().array(),
toStringMap(avroEvent.getHeaders()));
} else {
System.out.println("No Event returned");
}
return null;
}