Project 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


Field Summary
static String GroupIDTag
           
static String NameTag
           
static String PeerIDTag
           
static String RouteTag
           
static String ServiceNameTag
           
 
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 a unique ID suitable for indexing of this Advertisement.
 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, 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
See Also:
Constant Field Values

PeerIDTag

public static final String PeerIDTag
See Also:
Constant Field Values

ServiceNameTag

public static final String ServiceNameTag
See Also:
Constant Field Values

NameTag

public static final String NameTag
See Also:
Constant Field Values

RouteTag

public static final String RouteTag
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

setGroupID

public void setGroupID(PeerGroupID id)
set the group Id


getPeerID

public PeerID getPeerID()
get the rdv peer id

Returns:
PeerID

setPeerID

public void setPeerID(PeerID id)
set the peer Id


getServiceName

public String getServiceName()
get the rdv service name

Returns:
String name

setServiceName

public void setServiceName(String n)
set the service name


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.

setName

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

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

getRouteAdv

public RouteAdvertisement getRouteAdv()
Get the Route Adv.

Returns:
RouteAdvertisement or null if no

setRouteAdv

public void setRouteAdv(RouteAdvertisement route)
set the RouteAdvertisement

Parameters:
route - RouteAdvertisement

getID

public ID getID()
Returns a unique ID suitable for indexing of this Advertisement.

The ID is supposed to be unique and is not guaranteed to be of any particular subclass of ID. Each class of advertisement is responsible for the choice of ID to return. The value for the ID returned can either be:

Since this ID is normally used for indexing, the IDs returned must be as unique as possible to avoid collisions.

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: unitialized index fields). Instead java.lang.IllegalStateException should be thrown.

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

JXTA J2SE