|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ContinuousContextMatchingPlatform
The interface is meant to be implemented by classes offering complete, real-time (asynchronous) context matching functionality.
An implementation relies on a principal, context graph, and a set of context patterns. A class using the implementation is able to set notification receivers in case that matches are identified.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface net.xqhs.graphs.context.ContinuousMatchingProcess |
---|
ContinuousMatchingProcess.MatchNotificationReceiver |
Method Summary | |
---|---|
ContinuousContextMatchingPlatform |
addContextPattern(ContextPattern pattern)
Adds a context pattern to the set of context patterns, if not already existing. |
ContinuousContextMatchingPlatform |
addMatchNotificationTarget(ContextPattern pattern,
ContinuousMatchingProcess.MatchNotificationReceiver receiver)
Adds a notification target for matches of the specified pattern. |
ContinuousContextMatchingPlatform |
removeContextPattern(ContextPattern pattern)
Removes a pattern from the platform. |
ContinuousContextMatchingPlatform |
setContextGraph(ContextGraph graph)
Assigns a new context graph to this implementation. |
ContinuousMatchingProcess |
startMatchingAgainstAllPatterns(Graph graph,
int thresholdK,
ContinuousMatchingProcess.MatchNotificationReceiver receiver)
Creates a new ContinuousMatchingProcess , unrelated to the platform except for the set of patterns, to
match all patterns against the specified Graph instance. |
ContinuousMatchingProcess |
startMatchingAgainstGraph(Graph pattern,
int thresholdK,
ContinuousMatchingProcess.MatchNotificationReceiver receiver)
Creates a new ContinuousMatchingProcess , unrelated to the platform except for the current sequence of the
Context Graph (not the matching sequence), that matches the context graph against the specified pattern. |
Methods inherited from interface net.xqhs.graphs.context.ContinuousMatchingProcess |
---|
addMatchNotificationTarget, isContinuouslyMatching, removeMatchNotificationTarget, startContinuousMatching, stopContinuousMatching |
Method Detail |
---|
ContinuousContextMatchingPlatform setContextGraph(ContextGraph graph)
The platform will begin matching the current set of patterns to the new graph immediately.
graph
- - the ContextGraph
.
ContinuousContextMatchingPlatform addContextPattern(ContextPattern pattern)
The pattern will not allow modifications after this method is called (it will be Config.locked()
.
Matching against the pattern will begin immediately.
pattern
- - the GraphPattern
to add.
ContinuousContextMatchingPlatform removeContextPattern(ContextPattern pattern)
pattern
- - the ContextPattern
to remove.
ContinuousContextMatchingPlatform addMatchNotificationTarget(ContextPattern pattern, ContinuousMatchingProcess.MatchNotificationReceiver receiver)
pattern
- - the GraphPattern
whose new matches will be notified to the receiver.receiver
- - the receiver of notifications.
ContinuousMatchingProcess startMatchingAgainstAllPatterns(Graph graph, int thresholdK, ContinuousMatchingProcess.MatchNotificationReceiver receiver)
ContinuousMatchingProcess
, unrelated to the platform except for the set of patterns, to
match all patterns against the specified Graph
instance.
The matching process is started immediately
When matches of any k below or equal to the specified threshold are detected, the notification receiver is invoked.
graph
- - the graph to match the patterns against.thresholdK
- - the threshold k (see Match
).receiver
- - the receiver for match notifications.
ContinuousMatchingProcess
instance.ContinuousMatchingProcess startMatchingAgainstGraph(Graph pattern, int thresholdK, ContinuousMatchingProcess.MatchNotificationReceiver receiver)
ContinuousMatchingProcess
, unrelated to the platform except for the current sequence of the
Context Graph (not the matching sequence), that matches the context graph against the specified pattern.
Matching is done against a shadow of the context graph. Any subsequent changes to the context graph will not be visible in the matching process.
Except for the snapshot of the context graph, this method uses no resources of the platform.
The matching process is started immediately.
When matches of any k below or equal to the specified threshold are detected, the notification receiver is invoked.
pattern
- - the pattern to match (can be a normal Graph
).thresholdK
- - the threshold k (see Match
).receiver
- - the receiver for match notifications.
ContinuousMatchingProcess
instance.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |