cgl.narada.matching.regex
Class ClientRegExMatching

java.lang.Object
  extended by cgl.narada.matching.regex.ClientRegExMatching
All Implemented Interfaces:
MatchingTree, RegExMatchingDebugFlags

public class ClientRegExMatching
extends Object
implements MatchingTree, RegExMatchingDebugFlags

This class implements the regEx matching algorithm. This provides methods to add a subscription and also to remove interest in a subscription predicate. The matching algorithm should also be able to compute destinations.


Field Summary
 
Fields inherited from interface cgl.narada.matching.regex.RegExMatchingDebugFlags
ClientRegExMatching_Debug, RegExMatching_Debug, RegExProfile_Debug
 
Constructor Summary
ClientRegExMatching(int unitLevel, int systemLevel, ProfilePropagationProtocol profilePropagationProtocol)
          The RegExMatching constructor
 
Method Summary
 void addSubscriptionProfile(Profile profile)
          This method adds a subscription profile to the matching tree
 boolean evaluateRegExOnInput(Pattern regExPattern, String contentSynopsis)
           
 int getManagedProfileType()
          Returns the type of profiles managed by this matching engine
 int getMatchingLevel()
          This method returns the level assocaited with this matching tree.
static void main(String[] args)
           
 Object matchEvent(NBEvent nbEvent)
          This method return the destinations assocaited with an event that needs to be matched to the matching tree
 void propagateChangesToHigherLevels(Profile profile, boolean addProfile)
          Propagates profile changes to higher levels
 void removeProfilesForDestination(Object clientIdentifier, String linkId)
           
 void removeSubscriptionProfile(Profile profile)
          This method adds a subscription profile to the matching tree
 void setNodeDestination(Destinations destination)
          This method sets the destination address for this node
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClientRegExMatching

public ClientRegExMatching(int unitLevel,
                           int systemLevel,
                           ProfilePropagationProtocol profilePropagationProtocol)
The RegExMatching constructor

Method Detail

getMatchingLevel

public int getMatchingLevel()
This method returns the level assocaited with this matching tree. A node could be a gateway at multiple levels. How it handles destinations at different levels, and propagates destinations at different levels is dicatated by the level of the matching tree which computes the destinations and initiates profile propagation changes.

Specified by:
getMatchingLevel in interface MatchingTree
Returns:
The level of the matching tree.

setNodeDestination

public void setNodeDestination(Destinations destination)
This method sets the destination address for this node

Specified by:
setNodeDestination in interface MatchingTree

addSubscriptionProfile

public void addSubscriptionProfile(Profile profile)
This method adds a subscription profile to the matching tree

Specified by:
addSubscriptionProfile in interface MatchingTree
Parameters:
profile - The profile comprising the subscription and the destination assocaited with the subscription.

removeSubscriptionProfile

public void removeSubscriptionProfile(Profile profile)
Description copied from interface: MatchingTree
This method adds a subscription profile to the matching tree

Specified by:
removeSubscriptionProfile in interface MatchingTree

removeProfilesForDestination

public void removeProfilesForDestination(Object clientIdentifier,
                                         String linkId)

propagateChangesToHigherLevels

public void propagateChangesToHigherLevels(Profile profile,
                                           boolean addProfile)
Description copied from interface: MatchingTree
Propagates profile changes to higher levels

Specified by:
propagateChangesToHigherLevels in interface MatchingTree

matchEvent

public Object matchEvent(NBEvent nbEvent)
This method return the destinations assocaited with an event that needs to be matched to the matching tree

Specified by:
matchEvent in interface MatchingTree
Returns:
The destination as an INT

evaluateRegExOnInput

public boolean evaluateRegExOnInput(Pattern regExPattern,
                                    String contentSynopsis)

getManagedProfileType

public int getManagedProfileType()
Returns the type of profiles managed by this matching engine

Specified by:
getManagedProfileType in interface MatchingTree

main

public static void main(String[] args)


For comments and suggestions please send e-mail to The NaradaBrokering Project