net.xqhs.graphs.context
Interface ContinuousMatchingProcess

All Known Subinterfaces:
ContinuousContextMatchingPlatform
All Known Implementing Classes:
CCMImplementation

public interface ContinuousMatchingProcess

The interface is a general interface for classes implementing a matching process that happens in the background (in a different thread).

The provided methods allow for controlling the process and adding or removing notification targets.

Author:
Andrei Olaru

Nested Class Summary
static interface ContinuousMatchingProcess.MatchNotificationReceiver
          An implementation is able to act as a receiver for match notifications.
 
Method Summary
 ContinuousMatchingProcess addMatchNotificationTarget(int thresholdK, ContinuousMatchingProcess.MatchNotificationReceiver receiver)
          Registers a ContinuousMatchingProcess.MatchNotificationReceiver as target for notifications for new matches below or with a specified k (see Match.
 boolean isContinuouslyMatching()
           
 ContinuousMatchingProcess removeMatchNotificationTarget(ContinuousMatchingProcess.MatchNotificationReceiver receiver)
          Removes all registrations of the specified ContinuousMatchingProcess.MatchNotificationReceiver.
 ContinuousMatchingProcess startContinuousMatching()
          Instructs the process to start or to resume (from the state in which it was stopped).
 ContinuousMatchingProcess stopContinuousMatching()
          Instructs the process to stop.
 

Method Detail

addMatchNotificationTarget

ContinuousMatchingProcess addMatchNotificationTarget(int thresholdK,
                                                     ContinuousMatchingProcess.MatchNotificationReceiver receiver)
Registers a ContinuousMatchingProcess.MatchNotificationReceiver as target for notifications for new matches below or with a specified k (see Match.

Parameters:
thresholdK - - the threshold k.
receiver - - the receiver for the notifications.
Returns:
the process itself.

removeMatchNotificationTarget

ContinuousMatchingProcess removeMatchNotificationTarget(ContinuousMatchingProcess.MatchNotificationReceiver receiver)
Removes all registrations of the specified ContinuousMatchingProcess.MatchNotificationReceiver.

Parameters:
receiver - - the specified notification receiver.
Returns:
the process itself.

startContinuousMatching

ContinuousMatchingProcess startContinuousMatching()
Instructs the process to start or to resume (from the state in which it was stopped). It may already be ongoing.

Returns:
the process itself.

stopContinuousMatching

ContinuousMatchingProcess stopContinuousMatching()
Instructs the process to stop. State will be kept until the process is resumed. It may already be stopped.

Returns:
the process itself.

isContinuouslyMatching

boolean isContinuouslyMatching()
Returns:
true if the process is currently ongoing (in a separate thread). false otherwise.