cgl.narada.matching.tagvalue
Class Predicate

java.lang.Object
  extended by cgl.narada.matching.tagvalue.Predicate
All Implemented Interfaces:
MatchingDebugFlags

public class Predicate
extends Object
implements MatchingDebugFlags

Predicate.java


Field Summary
 
Fields inherited from interface cgl.narada.matching.tagvalue.MatchingDebugFlags
EdgeAttributes_Debug, EventID_Debug, Matching_Debug, MatchingTreeEdge_Debug, MatchingTreeNode_Debug, MEvent_Debug, Predicate_Debug
 
Constructor Summary
Predicate(byte[] predicateBytes)
          This method serves to unmarshall a predicate stream received over the link.
Predicate(String subscription, int destinations)
          A Predicate is comprised of both the subscription as well as the destination of the unit/super-unit that has expressed an interest in it.
Predicate(String subscription, String brokerDestination, int destinations)
           
 
Method Summary
 boolean equals(Predicate _predicate)
          Compares two objects for equality.
 String getBrokerDestination()
           
 byte[] getBytes()
          This method returns the predicate as a stream of bytes, the unmarshalling counterpart to this marshalling scheme is contained within one of the Predicate constructors
 int getDestination()
          This method returns the destinations assocaited with the subscription.
 String getPredicateId()
           
 String getSubscription()
          This method returns the subscription associated with the predicate.
 int hashCode()
          Generates a hash code for the receiver.
static void main(String[] args)
           
 String toString()
          Provides a string representation of the predicate instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Predicate

public Predicate(String subscription,
                 int destinations)
A Predicate is comprised of both the subscription as well as the destination of the unit/super-unit that has expressed an interest in it.

Parameters:
subscription - The subscription is tag=value, tag=value pairs
destinations - The hierarchial destinations associated with this predicate

Predicate

public Predicate(String subscription,
                 String brokerDestination,
                 int destinations)

Predicate

public Predicate(byte[] predicateBytes)
This method serves to unmarshall a predicate stream received over the link. The corresponding marshalling method for the predicate is contained within the getBytes() method.

Parameters:
predicateBytes - The marshalled stream of predicate bytes that are received over a link.
Method Detail

getSubscription

public String getSubscription()
This method returns the subscription associated with the predicate.

Returns:
The subscription.

getDestination

public int getDestination()
This method returns the destinations assocaited with the subscription.

Returns:
The destinations.

getBrokerDestination

public String getBrokerDestination()

getPredicateId

public String getPredicateId()

equals

public boolean equals(Predicate _predicate)
Compares two objects for equality. Returns a boolean that indicates whether this object is equivalent to the specified object. This method is used when an object is stored in a hashtable.

Parameters:
_predicate - the Object to compare with
Returns:
true if these Objects are equal; false otherwise.
See Also:
Hashtable

hashCode

public int hashCode()
Generates a hash code for the receiver. This method is supported primarily for hash tables, such as those provided in java.util. If two objects are equal (equals(Object) returns true) they must have the same hash code

Overrides:
hashCode in class Object
Returns:
an integer hash code for the receiver

getBytes

public byte[] getBytes()
This method returns the predicate as a stream of bytes, the unmarshalling counterpart to this marshalling scheme is contained within one of the Predicate constructors

Returns:
The byte stream representation of the predicate

toString

public String toString()
Provides a string representation of the predicate instance.

Overrides:
toString in class Object
Returns:
Predicate as a String object.

main

public static void main(String[] args)


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