cgl.narada.matching.rtp
Class ClientRtpMatching

java.lang.Object
  extended by cgl.narada.matching.rtp.ClientRtpMatching
All Implemented Interfaces:
RtpMatchingDebugFlags, RtpMatchingTree

public class ClientRtpMatching
extends Object
implements RtpMatchingTree, RtpMatchingDebugFlags

This class implements the rtp 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.rtp.RtpMatchingDebugFlags
ClientRtpMatching_Debug, RtpMatching_Debug, RtpProfile_Debug
 
Constructor Summary
ClientRtpMatching(int unitLevel, int systemLevel, RtpProfilePropagation rtpPropagate)
          The RtpMatching constructor
 
Method Summary
 void addSubscriptionProfile(RtpProfile rtpProfile)
          This method adds a subscription profile to the matching tree
 int getMatchingLevel()
          This method returns the level assocaited with this matching tree.
static void main(String[] args)
           
 ArrayList matchEvent(RtpEvent rtpEvent)
          This method return the destinations assocaited with an event that needs to be matched to the matching tree
 void propagateChangesToHigherLevels(RtpProfile rtpProfile, boolean addProfile)
           
 void removeProfilesForDestination(Object clientIdentifier)
           
 void removeProfileWithId(Object profileId)
          This method removes a subscription profile
 void removeSubscriptionProfile(RtpProfile rtpProfile)
           
 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

ClientRtpMatching

public ClientRtpMatching(int unitLevel,
                         int systemLevel,
                         RtpProfilePropagation rtpPropagate)
The RtpMatching 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.

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 RtpMatchingTree

addSubscriptionProfile

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

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

removeSubscriptionProfile

public void removeSubscriptionProfile(RtpProfile rtpProfile)
Specified by:
removeSubscriptionProfile in interface RtpMatchingTree

removeProfilesForDestination

public void removeProfilesForDestination(Object clientIdentifier)

removeProfileWithId

public void removeProfileWithId(Object profileId)
This method removes a subscription profile


propagateChangesToHigherLevels

public void propagateChangesToHigherLevels(RtpProfile rtpProfile,
                                           boolean addProfile)
Specified by:
propagateChangesToHigherLevels in interface RtpMatchingTree

matchEvent

public ArrayList matchEvent(RtpEvent rtpEvent)
This method return the destinations assocaited with an event that needs to be matched to the matching tree

Returns:
The destination as an INT

main

public static void main(String[] args)


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