uwcse.location
Class Subscription

java.lang.Object
  |
  +--uwcse.location.Subscription
Direct Known Subclasses:
NameSubscription, TypeSubscription

public abstract class Subscription
extends Object

A subscription to to receive periodic information about object(s) location(s).

Version:
$Revision: 1.8 $
Author:
Jeffrey Hightower

Field Summary
protected  Date m_expiration
           
protected  GUID m_id
           
protected  String m_subscriberAddress
           
protected  String m_subscriberId
           
 
Constructor Summary
Subscription()
          Create a new subscription that expires immediately.
Subscription(ServiceID serviceID, Date expiration)
          Create a new subscription with the given unique id and expiration date.
Subscription(Subscription s)
          Create a new subscription as a copy of the given one.
 
Method Summary
 boolean equals(Object@Subscription s)
          Test this subscription for equality with another subscription meaning they have the same GUID value and expiration time.
 Date getExpiration()
          Read the expiration date of this subscription.
 GUID getGUID()
          Get a copy of the unique id of this subscription.
 ServiceID getSubscriberServiceID()
          Get a copy of the service id of the subscriber
 int hashCode()
           
 String toString()
          Get a string representation of this subscription.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

m_id

protected GUID m_id

m_subscriberId

protected String m_subscriberId

m_subscriberAddress

protected String m_subscriberAddress

m_expiration

protected Date m_expiration
Constructor Detail

Subscription

public Subscription()
Create a new subscription that expires immediately. This method exists only to support no argument constructor XML serialization and is generally not used in practice.


Subscription

public Subscription(ServiceID serviceID,
                    Date expiration)
Create a new subscription with the given unique id and expiration date.


Subscription

public Subscription(Subscription s)
Create a new subscription as a copy of the given one.

Method Detail

equals

public boolean equals(Object@Subscription s)
Test this subscription for equality with another subscription meaning they have the same GUID value and expiration time.

Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

getSubscriberServiceID

public ServiceID getSubscriberServiceID()
Get a copy of the service id of the subscriber


getGUID

public GUID getGUID()
Get a copy of the unique id of this subscription.


getExpiration

public Date getExpiration()
Read the expiration date of this subscription.


toString

public String toString()
Get a string representation of this subscription.

Overrides:
toString in class Object


This documentation is for the Location Stack v0.8. The latest distribution, the documentation, and the list of contributors to the Location Stack can always be found at http://portolano.cs.washington.edu/projects/location/

© Copyright 2004 University of Washington CSE