Class DeferredMetaExtractionPlugin
- All Implemented Interfaces:
BaseExtractionPlugin
,DeferredExtractionPlugin
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 is able to run a secondary query
for traces and combine the results with previously retrieved traces, and that this plugin does not receive or
process 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, TraceSearcher)
).
Note for Hansken core developers: specifying 'meta'
in the matcher is
not necessary, the framework takes care of this.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
process
(Trace trace, DataContext dataContext, TraceSearcher searcher) Start processing atrace
.abstract void
process
(Trace trace, TraceSearcher searcher) Start processing atrace
.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.hansken.plugin.extraction.api.BaseExtractionPlugin
pluginInfo
-
Constructor Details
-
DeferredMetaExtractionPlugin
public DeferredMetaExtractionPlugin()
-
-
Method Details
-
process
public void process(Trace trace, DataContext dataContext, TraceSearcher searcher) throws ExecutionException, InterruptedException, IOException Description copied from interface:DeferredExtractionPlugin
Start processing atrace
. When processing a given trace, new properties may be set on it. New children can be added usingTrace.newChild(String, ThrowingConsumer)
.Note: the given trace should only be modified within the scope of this method. Any modifications afterward may be guarded against or result in undefined behaviour.
- Specified by:
process
in interfaceDeferredExtractionPlugin
- Parameters:
trace
- the trace to processdataContext
- data context of this trace extractionsearcher
- the searcher for the trace- Throws:
ExecutionException
- when an exception occurs while searching for tracesInterruptedException
- when a thread gets interrupted while searching for tracesIOException
- when an I/O exception occurs
-
process
public abstract void process(Trace trace, TraceSearcher searcher) throws ExecutionException, InterruptedException, IOException Start processing atrace
. When processing a given trace, new properties may be set on it. New children can be added usingTrace.newChild(String, ThrowingConsumer)
.Note: the given trace should only be modified within the scope of this method. Any modifications afterward may be guarded against or result in undefined behaviour.
- Parameters:
trace
- the trace to processsearcher
- the searcher for the trace- Throws:
ExecutionException
- when an exception occurs while searching for tracesInterruptedException
- when a thread gets interrupted while searching for tracesIOException
- when an I/O exception occurs
-