cgl.narada.matching.xpath
Class XPathProfile

java.lang.Object
  extended by cgl.narada.matching.xpath.XPathProfile
All Implemented Interfaces:
XPathMatchingDebugFlags

public class XPathProfile
extends Object
implements XPathMatchingDebugFlags

An XPATH profile is stored in this class. The profile includes information regarding the xPath subscription that the client is interested in, and the destination associated with this.


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

Constructor Detail

XPathProfile

public XPathProfile(String subscription,
                    int destinations)
A XPathProfile 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 xPath subscription
destinations - The hierarchial destinations associated with this xPathProfile

XPathProfile

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

XPathProfile

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

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

getSubscription

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

Returns:
The subscription.

getDestination

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

Returns:
The destinations.

getBrokerDestination

public String getBrokerDestination()

getProfileId

public String getProfileId()

equals

public boolean equals(XPathProfile _xPathProfile)
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:
_xPathProfile - 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 xPathProfile as a stream of bytes, the unmarshalling counterpart to this marshalling scheme is contained within one of the XPathProfile constructors

Returns:
The byte stream representation of the xPathProfile

toString

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

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

main

public static void main(String[] args)


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