Project JXTA

net.jxta.protocol
Class EndpointAdvertisement

java.lang.Object
  |
  +--net.jxta.document.Advertisement
        |
        +--net.jxta.protocol.EndpointAdvertisement

public abstract class EndpointAdvertisement
extends Advertisement

This abstract class defines an Endpoint advertisement. Enpoint advertisements are used to represent each peer Platform endpoints. A peer can have many available endpoints. One endpoints for each configured network interfaces or protocol (IP, HTTP). The endpoint advertisement is a tag field in the peer group advertisement (see PeerGroupAdvertisement) to describe the endpoints available on the member peer of the peer group.

 <?xml version="1.0"?>
  <EndpointAdvertisement>
   <Name>string</Name>
   <Keywords>string</Keywords>
   <Address>endpoint address</Address>
   <TransportAdvertisement>transport</TransportAdvertisement>
  </EndpointAdvertisement>

Since:
JXTA 1.0
See Also:
PeerAdvertisement, PeerGroupAdvertisement, TransportAdvertisement

Constructor Summary
EndpointAdvertisement()
           
 
Method Summary
static java.lang.String getAdvertisementType()
          returns the advertisement type
 boolean getEnabled()
          Tells whether specific endpoint is enabled or not.
 java.lang.String getEndpointAddress()
          returns the endpointaddress
 java.lang.String getKeywords()
          returns the keywords associated with the endpoint
 java.lang.String getName()
          returns the name of the endpoint
 TransportAdvertisement getTransportAdvertisement()
          returns the transport advertisement associated with the endpoint
 void setEnabled(boolean enabled)
          enable or disable this specific endpoint.
 void setEndpointAddress(java.lang.String add)
          set the endpointaddress
 void setKeywords(java.lang.String keywords)
          sets the keywords associated with the endpoint
 void setName(java.lang.String name)
          sets the name of the endpoint
 void setTransportAdvertisement(TransportAdvertisement transport)
          sets the transport 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

EndpointAdvertisement

public EndpointAdvertisement()
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 endpoint
Returns:
string name of the endpoint
Since:
JXTA 1.0

setName

public void setName(java.lang.String name)
sets the name of the endpoint
Parameters:
name - of the endpoint
Since:
JXTA 1.0

getKeywords

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

setKeywords

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

getTransportAdvertisement

public TransportAdvertisement getTransportAdvertisement()
returns the transport advertisement associated with the endpoint
Returns:
TransportAdvertisement for the endpoint
Since:
JXTA 1.0

setTransportAdvertisement

public void setTransportAdvertisement(TransportAdvertisement transport)
sets the transport advertisement
Parameters:
transport - Transport Advertisement
Since:
JXTA 1.0

getEndpointAddress

public java.lang.String getEndpointAddress()
returns the endpointaddress
Returns:
String return the endpoint address
Since:
JXTA 1.0

setEndpointAddress

public void setEndpointAddress(java.lang.String add)
set the endpointaddress
Parameters:
add - endpoint address
Since:
JXTA 1.0

setEnabled

public void setEnabled(boolean enabled)
enable or disable this specific endpoint. keeping a disabled endpoint is usefull to remember its configuration.
Parameters:
enabled - whether it is enabled or disabled.
Since:
JXTA 1.0

getEnabled

public boolean getEnabled()
Tells whether specific endpoint is enabled or not.
Returns:
boolean whether it is enabled or disabled.
Since:
JXTA 1.0

Project JXTA