Interface IEventSinkFactory
-
public interface IEventSinkFactory
Event sink factories are responsible for handling event types during parsing.See
the package documentation
for a longer discussion on how parser extensions work.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description IEventSink
create(String identifier, String label, String[] category, String description, List<ValueField> dataStructure)
Create a new event sink for an event type.void
flush()
Called when all events have been sent to the event sinks.
-
-
-
Method Detail
-
create
IEventSink create(String identifier, String label, String[] category, String description, List<ValueField> dataStructure)
Create a new event sink for an event type. This method will be called one or more times for every event type present in the Flight Recording.The implementation should have a subfactory that has been saved during instantiation with the
IParserExtension.getEventSinkFactory
call.The create call takes event type metadata which can optionally be modified before calling the create method of the subfactory to get a subsink. Note that
create
may be called multiple times on the subfactory to set up a case where a single input event type can be split into multiple output event types.The returned event sink is used to receive and optionally modify event data. This data is then passed on to the subsink.
Implementations of this method must be thread safe.
- Parameters:
identifier
- event type IDlabel
- human readable name for the event typecategory
- a category path for the event typedescription
- human readable description of the event typedataStructure
- metadata for the event fields- Returns:
- an event sink
-
flush
void flush()
Called when all events have been sent to the event sinks. Make sure that all pending events have been processed before returning from this call.The implementation should have a subfactory.
flush
must be called on that just before returning.If no flush operations need to be done, then simply call flush on the subfactory.
-
-