Project JXTA

net.jxta.protocol
Class PeerGroupAdvertisement

java.lang.Object
  |
  +--net.jxta.document.Advertisement
        |
        +--net.jxta.protocol.PeerGroupAdvertisement
Direct Known Subclasses:
PeerAdvertisement

public abstract class PeerGroupAdvertisement
extends Advertisement

This abstract class defines a PeerGroup advertisement A peer group advertisement fully describes a PeerGroup, and uniquely identifies a member of this peer group. The advertisement contains all the information needed to recognize this peer as the member of the peer group and to instanciate that group on another peer:


 <?xml version="1.0"?>
 <PeerAdvertisement>
   <Name>string</Name>
   <Keywords>string</Keywords>
   <Pid> Peer Id </Pid>
   <Gid>Peer Group Id </Gid>
   <isRendezVous> boolean </isRendezVous>
   <Service> service advertisement</Service>
           ...........
   <Service> service advertisement</Service>
   <Endpoint> endpoint Advertisement </Endpoint>
           ...........
   <Endpoint> endpoint Advertisement </Endpoint>
   <InitialApp> initial application  </InitialApplication>
   <GroupImpl>  group Implementation </GroupImpl>
 <PeerAdvertisement>
 

Since:
JXTA 1.0
See Also:
PeerGroupAdvertisement, ServiceAdvertisement, EndpointAdvertisement, TransportAdvertisement

Constructor Summary
PeerGroupAdvertisement()
           
 
Method Summary
static java.lang.String getAdvertisementType()
          returns the advertisement type
 ServiceAdvertisement getApp()
          returns the default application for the peergroup
 java.lang.String getAppCode()
          Convenience method.
 java.lang.String getCode(java.lang.String name)
          get the service implementation for a specific peer group service
 java.lang.String getDebugLevel()
          Returns the debug level
 java.util.Hashtable getEndpointAdvertisements()
          returns the endpoints associated with the peer group
 java.lang.String getGid()
          returns the peer group id
 java.lang.String getGroupCode()
          Convenience.
 ServiceAdvertisement getGroupImpl()
          returns the peer group framework service
 boolean getIsRendezvous()
          check if the member of the peer group is a rendez vous member
 java.lang.String getKeywords()
          returns the keywords associated with this peer group
 java.lang.String getName()
          returns the name of the peer group
 java.lang.String getPeerName()
          returns the name of the peer
 java.lang.String getPid()
          returns the peer id of the member of the peer group
 java.util.Hashtable getServiceAdvertisements()
          returns the services associated with the peer group
 void setApp(ServiceAdvertisement app)
          sets the default application
 void setDebugLevel(java.lang.String level)
          Set the debug level.
 void setEndpointAdvertisements(java.util.Hashtable endpoints)
          sets the endpoint advertisement
 void setGid(java.lang.String gid)
          sets the peer group id
 void setGroupImpl(ServiceAdvertisement group)
          sets the peer group service implementation.
 void setIsRendezvous(boolean flag)
          sets the peer group member as a rendezvous member
 void setKeywords(java.lang.String keywords)
          sets the keywords associated with this peer group
 void setName(java.lang.String name)
          sets the name of the peer group
 void setPeerName(java.lang.String peerName)
          sets the name of the peer
 void setPid(java.lang.String pid)
          sets the peer id of the member of this peer group
 void setServiceAdvertisements(java.util.Hashtable services)
          sets the service advertisement
 
Methods inherited from class net.jxta.document.Advertisement
getDocument, getLocalExpirationTime, setExpiration
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PeerGroupAdvertisement

public PeerGroupAdvertisement()
Method Detail

getAdvertisementType

public static java.lang.String getAdvertisementType()
returns the advertisement type
Returns:
string type
Since:
JXTA 1.0

getName

public java.lang.String getName()
returns the name of the peer group
Returns:
String name of the peer group
Since:
JXTA 1.0

setName

public void setName(java.lang.String name)
sets the name of the peer group
Parameters:
name - name of the peer group to be set
Since:
JXTA 1.0

getPeerName

public java.lang.String getPeerName()
returns the name of the peer
Returns:
String name of the peer
Since:
JXTA 1.0

setPeerName

public void setPeerName(java.lang.String peerName)
sets the name of the peer
Parameters:
peerName - name of the peer to be set
Since:
JXTA 1.0

getKeywords

public java.lang.String getKeywords()
returns the keywords associated with this peer group
Returns:
String keywords associated with the peer group
Since:
JXTA 1.0

setKeywords

public void setKeywords(java.lang.String keywords)
sets the keywords associated with this peer group
Parameters:
keywords -  
Since:
JXTA 1.0

getPid

public java.lang.String getPid()
returns the peer id of the member of the peer group
Returns:
String peer id
Since:
JXTA 1.0

setPid

public void setPid(java.lang.String pid)
sets the peer id of the member of this peer group
Returns:
pid peer id of the peer group member
Since:
JXTA 1.0

getGid

public java.lang.String getGid()
returns the peer group id
Returns:
String return the peer group id
Since:
JXTA 1.0

setGid

public void setGid(java.lang.String gid)
sets the peer group id
Parameters:
gid - group id to be set
Since:
JXTA 1.0

getIsRendezvous

public boolean getIsRendezvous()
check if the member of the peer group is a rendez vous member
Returns:
boolean true if it is a rendezvous
Since:
JXTA 1.0

setIsRendezvous

public void setIsRendezvous(boolean flag)
sets the peer group member as a rendezvous member
Parameters:
flag - boolean value
Since:
JXTA 1.0

getServiceAdvertisements

public java.util.Hashtable getServiceAdvertisements()
returns the services associated with the peer group
Returns:
Hashtable hashtable of service Advertisements for the peer group
Since:
JXTA 1.0

setServiceAdvertisements

public void setServiceAdvertisements(java.util.Hashtable services)
sets the service advertisement
Parameters:
services - hashtable of service advertisements
Since:
JXTA 1.0

getEndpointAdvertisements

public java.util.Hashtable getEndpointAdvertisements()
returns the endpoints associated with the peer group
Returns:
Hashtable hashtable of endpoints for the peer group
Since:
JXTA 1.0

setApp

public void setApp(ServiceAdvertisement app)
sets the default application
Parameters:
ServiceAdvertisement - default application service advertisement
Since:
JXTA 1.0

setGroupImpl

public void setGroupImpl(ServiceAdvertisement group)
sets the peer group service implementation. Code to implement the peer group framework
Parameters:
ServiceAdvertisement - advertisement for the peer group framework service
Since:
JXTA 1.0

getApp

public ServiceAdvertisement getApp()
returns the default application for the peergroup
Returns:
ServiceAdvertisement default application for the peer group
Since:
JXTA 1.0

getGroupImpl

public ServiceAdvertisement getGroupImpl()
returns the peer group framework service
Returns:
ServiceAdvertisement peer group framework implementation
Since:
JXTA 1.0

setEndpointAdvertisements

public void setEndpointAdvertisements(java.util.Hashtable endpoints)
sets the endpoint advertisement
Parameters:
endpoints - hashtable of endpoint advertisements
Since:
JXTA 1.0

getCode

public java.lang.String getCode(java.lang.String name)
get the service implementation for a specific peer group service
Parameters:
name - name of the peer group service
Returns:
String code implementation for the service
Since:
JXTA 1.0

getGroupCode

public java.lang.String getGroupCode()
Convenience. Get the service implementatio for the peer group framework
Returns:
String the service implementation.
Since:
JXTA 1.0

getAppCode

public java.lang.String getAppCode()
Convenience method. Returns the implementation for the default peer group application
Returns:
String implementation for the default peer group application
Since:
JXTA 1.0

setDebugLevel

public void setDebugLevel(java.lang.String level)
Set the debug level.
Parameters:
level - The name of the level: error, warn, info, debug.
Since:
JXTA 1.0

getDebugLevel

public java.lang.String getDebugLevel()
Returns the debug level
Returns:
String the name of the level.
Since:
JXTA 1.0

Project JXTA