JXTA

net.jxta.protocol
Class RdvAdvertisement

java.lang.Object
  extended by net.jxta.document.Advertisement
      extended by net.jxta.document.ExtendableAdvertisement
          extended by net.jxta.protocol.RdvAdvertisement

public abstract class RdvAdvertisement
extends ExtendableAdvertisement

This class defines a Rendezvous Advertisement. This advertisement is indexed on "RdvGroupId", "RdvPeerId", and "RdvServiceName"


Field Summary
static String GroupIDTag
          GroupID tag
static String NameTag
          Name tag
static String PeerIDTag
          Rendezvous ID tag
static String RouteTag
          Route tage
static String ServiceNameTag
          Rendezvous service name tag
 
Constructor Summary
RdvAdvertisement()
           
 
Method Summary
static String getAdvertisementType()
          Returns the identifying type of this Advertisement.
 String getBaseAdvType()
          Returns the base type of this advertisement hierarchy.
 PeerGroupID getGroupID()
          get the group id
 ID getID()
          Returns an ID which identifies this Advertisement as uniquely as possible.
 String getName()
          get the symbolic name associated with the rdv
 PeerID getPeerID()
          get the rdv peer id
 RouteAdvertisement getRouteAdv()
          Get the Route Adv.
 String getServiceName()
          get the rdv service name
 void setGroupID(PeerGroupID id)
          set the group Id
 void setName(String n)
          set the symbolic name associated with the rdv
 void setPeerID(PeerID id)
          set the peer Id
 void setRouteAdv(RouteAdvertisement route)
          set the RouteAdvertisement
 void setServiceName(String n)
          set the service name
 
Methods inherited from class net.jxta.document.ExtendableAdvertisement
getDocument, handleAttribute, handleElement
 
Methods inherited from class net.jxta.document.Advertisement
clone, getAdvType, getIndexFields, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

GroupIDTag

public static final String GroupIDTag
GroupID tag

See Also:
Constant Field Values

NameTag

public static final String NameTag
Name tag

See Also:
Constant Field Values

PeerIDTag

public static final String PeerIDTag
Rendezvous ID tag

See Also:
Constant Field Values

RouteTag

public static final String RouteTag
Route tage

See Also:
Constant Field Values

ServiceNameTag

public static final String ServiceNameTag
Rendezvous service name tag

See Also:
Constant Field Values
Constructor Detail

RdvAdvertisement

public RdvAdvertisement()
Method Detail

getAdvertisementType

public static String getAdvertisementType()
Returns the identifying type of this Advertisement.

Returns:
String the type of advertisement

getBaseAdvType

public final String getBaseAdvType()
Returns the base type of this advertisement hierarchy. Typically, only the most basic advertisement of a type will implement this method and declare it as final.

Specified by:
getBaseAdvType in class ExtendableAdvertisement
Returns:
String the base type of advertisements in this hierarchy.

getGroupID

public PeerGroupID getGroupID()
get the group id

Returns:
String PeerGroupID

getID

public ID getID()
Returns an ID which identifies this Advertisement as uniquely as possible. This ID is typically used as the primary key for indexing of the Advertisement within databases.

Each advertisement sub-class must choose an appropriate implementation which returns canonical and relatively unique ID values for it's instances. Since this ID is commonly used for indexing, the IDs returned must be as unique as possible to avoid collisions. The value for the ID returned can either be:

For Advertisement types which normally return non-ID.nullID values no ID should be returned when asked to generate an ID while the Advertisement is an inconsistent state (example: uninitialized index fields). Instead IllegalStateException should be thrown.

Specified by:
getID in class Advertisement
Returns:
An ID that relatively uniquely identifies this advertisement or ID.nullID if this advertisement is of a type that is not normally indexed.

getName

public String getName()
get the symbolic name associated with the rdv

Returns:
String the name field. null is returned if no name has been associated with the advertisement.

getPeerID

public PeerID getPeerID()
get the rdv peer id

Returns:
PeerID

getRouteAdv

public RouteAdvertisement getRouteAdv()
Get the Route Adv.

Returns:
RouteAdvertisement or null if no

getServiceName

public String getServiceName()
get the rdv service name

Returns:
String name

setGroupID

public void setGroupID(PeerGroupID id)
set the group Id

Parameters:
id - The new groupID value

setName

public void setName(String n)
set the symbolic name associated with the rdv

Parameters:
n - the name this rdv adv should have.

setPeerID

public void setPeerID(PeerID id)
set the peer Id

Parameters:
id - The new peerID value

setRouteAdv

public void setRouteAdv(RouteAdvertisement route)
set the RouteAdvertisement

Parameters:
route - RouteAdvertisement

setServiceName

public void setServiceName(String n)
set the service name

Parameters:
n - The new serviceName value

JXSE