solar.service.directory
Class NameRecord

java.lang.Object
  |
  +--solar.service.directory.NameRecord
All Implemented Interfaces:
java.io.Serializable, SolarConstants

public class NameRecord
extends java.lang.Object
implements java.io.Serializable, SolarConstants

A record kept corresponding to a named resource, including its guid and current address. Note we delibrately separate the guid and its location (address), so a named resource can migrate without changing its guid.

Version:
$Id: NameRecord.java,v 1.6 2003/10/05 18:50:56 glchen Exp $
Author:
Guanling Chen
See Also:
Serialized Form

Field Summary
protected  Address _address
           
protected  Id _guid
           
protected  java.lang.Object _object
           
private static long serialVersionUID
           
 
Fields inherited from interface solar.SolarConstants
ADVERTISEMENT_SVID, ATTRIBUTE_RECORD_SVID, ATTRIBUTE_SVID, FILTER_CONFIG_SVID, FILTER_SPEC_SVID, GRAPH_SPEC_SVID, GUID_SVID, HEADER_SVID, ID_SVID, NAME_RECORD_SVID, PACK_POLICY_SVID, PIPE_SPEC_SVID, REQUEST_SVID, RPCACK_SVID
 
Constructor Summary
NameRecord(Id guid, Address address)
          Construct a name record with its guid and current contact address.
NameRecord(Id guid, Address address, java.lang.Object obj)
          Construct a name record with additional application-specific object.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Check whether two objects are equivalent name records.
 Address getAddress()
          Return the current contact address of corresponding name.
 Id getId()
          Return the guid of corresponding name.
 java.lang.Object getObject()
          Get the app-specific object registed with this name.
 java.lang.String toString()
          Return the string representation of this name record.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

_guid

protected Id _guid

_address

protected Address _address

_object

protected java.lang.Object _object
Constructor Detail

NameRecord

public NameRecord(Id guid,
                  Address address)
Construct a name record with its guid and current contact address.


NameRecord

public NameRecord(Id guid,
                  Address address,
                  java.lang.Object obj)
Construct a name record with additional application-specific object.

Method Detail

getId

public Id getId()
Return the guid of corresponding name.


getAddress

public Address getAddress()
Return the current contact address of corresponding name.


getObject

public java.lang.Object getObject()
Get the app-specific object registed with this name.


equals

public boolean equals(java.lang.Object obj)
Check whether two objects are equivalent name records.

Overrides:
equals in class java.lang.Object

toString

public java.lang.String toString()
Return the string representation of this name record.

Overrides:
toString in class java.lang.Object