Class MetaExtractionPlugin

  • All Implemented Interfaces:
    BaseExtractionPlugin, ExtractionPlugin

    public abstract class MetaExtractionPlugin
    extends Object
    implements ExtractionPlugin
    Meta extraction plugins can be used by Hansken to process traces during the extraction process. A processed trace can be enriched with new information and new child traces can also be created.

    The difference between this and a normal ExtractionPlugin is that this plugin does not receive or processes any data, only a trace itself.

    When a plugin matches on the trace which is currently processed by Hansken (for example, because it has certain properties), the plugin will receive the matched trace in order to process it (see process(Trace)).

    Note for Hansken core developers: specifying 'meta' in the matcher is not necessary, the framework takes care of this.

    • Constructor Detail

      • MetaExtractionPlugin

        public MetaExtractionPlugin()
    • Method Detail

      • process

        public final void process​(Trace trace,
                                  DataContext dataContext)
                           throws IOException
        Description copied from interface: ExtractionPlugin
        Start processing a trace with a given data context. When processing a given trace, new properties may be set on it. New children can be added using Trace.newChild(String, ThrowingConsumer).

        A trace can have multiple data sequences of different types. Because of this, a certain trace might be processed multiple times (depending on if this plugin triggers on the different data types).

        Note: the given trace should only be modified within the scope of this method. Any modifications afterwards may be guarded against or result in undefined behavior.

        Specified by:
        process in interface ExtractionPlugin
        Parameters:
        trace - the trace to process
        dataContext - data context of the traces data stream that is being processed
        Throws:
        IOException - when an I/O error occurs
      • process

        public abstract void process​(Trace trace)
                              throws IOException
        Start processing a trace without any of its associated data streams. When processing a given trace, new properties may be set on it. New children can be added using Trace.newChild(String, ThrowingConsumer).

        Note: the given trace should only be modified within the scope of this method. Any modifications afterwards may be guarded against or result in undefined behaviour.

        Parameters:
        trace - the trace to process
        Throws:
        IOException - when an I/O error occurs