|
JXTA | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.jxta.document.Advertisement
net.jxta.document.ExtendableAdvertisement
net.jxta.protocol.AccessPointAdvertisement
public abstract class AccessPointAdvertisement
Provides a simple association of a PeerID
to an ordered list of
EndpointAddress
entries. Each EndpointAddress
defines one
Message Transport address by which the peer may be reached. The addresses
are sorted in the preferred order (which may refer to performance, cost,
efficiency, etc.) which they should be used.
RouteAdvertisement
.
PeerAdvertisement
,
RouteAdvertisement
Constructor Summary | |
---|---|
AccessPointAdvertisement()
|
Method Summary | |
---|---|
void |
addEndpointAddress(EndpointAddress address)
Add a new EndpointAddresses to the access point |
void |
addEndpointAddress(String address)
add a new EndpointAddresses to the access point |
void |
addEndpointAddresses(List<EndpointAddress> addrs)
Add all of the provided EndpointAddresses. |
void |
addEndpointAddresses(Vector<String> addresses)
Deprecated. Use addEndpointAddresses(List) instead. |
void |
clearEndpointAddresses()
Clears all EndpointAddresses. |
AccessPointAdvertisement |
clone()
Make a deep copy. |
boolean |
contains(EndpointAddress addr)
Check if the EndpointAddress is already associated with this access point |
String |
display()
Generate a string that displays an access point information for logging or debugging purpose |
boolean |
equals(Object target)
Equals means the same PID and the same endpoint addresses. |
static String |
getAdvertisementType()
Returns the identifying type of this Advertisement. |
String |
getBaseAdvType()
Returns the base type of this advertisement hierarchy. |
Enumeration<String> |
getEndpointAddresses()
Returns the endpoint addresses associated with this access point. |
PeerID |
getPeerID()
Gets the PeerID for this access point. |
Vector<String> |
getVectorEndpointAddresses()
Deprecated. Returning the Vector is dangerous and unwise. This feature will be removed. |
int |
hashCode()
|
void |
removeEndpointAddress(EndpointAddress addr)
Remove the specified EndpointAddress. |
void |
removeEndpointAddresses(Collection<EndpointAddress> addrs)
Remove the specified EndpointAddresses. |
void |
removeEndpointAddresses(List<String> addresses)
remove a list of EndpointAddresses from the access point |
void |
setEndpointAddresses(Vector<String> addresses)
Deprecated. This method causes the AccessPointAdvertisement to reference the provided array. This means that subsequent changes to the array will alter the endpoint addresses which are part of the AcccessPointAdvertisement . |
void |
setPeerID(PeerID pid)
Sets the PeerID for this access point. |
int |
size()
return number of endpoint addresses |
Methods inherited from class net.jxta.document.ExtendableAdvertisement |
---|
getDocument, handleAttribute, handleElement |
Methods inherited from class net.jxta.document.Advertisement |
---|
getAdvType, getID, getIndexFields, toString |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public AccessPointAdvertisement()
Method Detail |
---|
public AccessPointAdvertisement clone()
clone
in class Advertisement
public boolean equals(Object target)
equals
in class Object
public int hashCode()
hashCode
in class Object
public static String getAdvertisementType()
public final String getBaseAdvType()
final
.
getBaseAdvType
in class ExtendableAdvertisement
public PeerID getPeerID()
null
if no peer has been directly associated.public void setPeerID(PeerID pid)
pid
- The peer id associated with the endpoint addresses or
null
if no peer is directly associated.public void addEndpointAddresses(List<EndpointAddress> addrs)
addrs
- Add all of the specified endpoint addresses.public void clearEndpointAddresses()
public void removeEndpointAddress(EndpointAddress addr)
addr
- EndpointAddress to remove.public void removeEndpointAddresses(Collection<EndpointAddress> addrs)
addrs
- EndpointAddresses to remove.public Enumeration<String> getEndpointAddresses()
String
.@Deprecated public Vector<String> getVectorEndpointAddresses()
String
. The Vector contains the "live" data of this
advertisement. It should be modified only with great care.
String
.@Deprecated public void setEndpointAddresses(Vector<String> addresses)
AcccessPointAdvertisement
.
addresses
- Vector of EndpointAddresses represented as
String
. The Vector is not copied!@Deprecated public void addEndpointAddresses(Vector<String> addresses)
addEndpointAddresses(List)
instead.
addresses
- List of EndpointAddresses represented as
String
.public void addEndpointAddress(EndpointAddress address)
address
- An EndpointAddresspublic void addEndpointAddress(String address)
address
- EndpointAddress represented as String
.public void removeEndpointAddresses(List<String> addresses)
addresses
- List of EndpointAddresses represented as
String
.public int size()
public boolean contains(EndpointAddress addr)
addr
- endpoint address to check
public String display()
|
JXSE | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |