|
Project JXTA | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.jxta.impl.rendezvous.rpv.PeerViewDestination
net.jxta.impl.rendezvous.rpv.PeerViewElement
public final class PeerViewElement
An element of the PeerView.
The destination address (peerID) is part of PeerViewDestination, which implements the comparable interface. That makes it possible to sort and create ordered lists of PeerViewElements, and to search these lists while knowing only a destination address.
Constructor Summary | |
---|---|
PeerViewElement(EndpointService endpoint,
RdvAdvertisement radv)
Initialize from a RdvAdvertisement. |
Method Summary | |
---|---|
(package private) long |
getLastUpdateTime()
Return the time in absolute milliseconds at which we last updated this peer. |
RdvAdvertisement |
getRdvAdvertisement()
Get the encapsulated Peer Advertisement. |
(package private) boolean |
isAlive()
Return true if the remote peer is known to be alive,
false otherwise. |
(package private) boolean |
isInPeerView()
|
void |
messageSendFailed(OutgoingMessageEvent e)
|
void |
messageSendSucceeded(OutgoingMessageEvent e)
|
boolean |
sendMessage(Message msg,
String serviceName,
String serviceParam)
Send a message to the peer which is represented by the current PeerViewElement. |
(package private) void |
setAlive(boolean live)
Update the connection status based upon the result of the last message send. |
(package private) void |
setLastUpdateTime(long last)
Sets the time in absolute milliseconds at which we last updated this peer. |
(package private) void |
setPeerView(PeerView pv)
Sets the peerview |
(package private) RdvAdvertisement |
setRdvAdvertisement(RdvAdvertisement adv)
Set the encapsulated Peer Advertisement. |
String |
toString()
|
Methods inherited from class net.jxta.impl.rendezvous.rpv.PeerViewDestination |
---|
compareTo, equals, getDestAddress, hashCode |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
PeerViewElement(EndpointService endpoint, RdvAdvertisement radv)
rendezvous
- The rendezvous the element works for.adv
- the RdvAdvertisement from which to initializeMethod Detail |
---|
public String toString()
toString
in class Object
public void messageSendSucceeded(OutgoingMessageEvent e)
messageSendSucceeded
in interface OutgoingMessageEventListener
public void messageSendFailed(OutgoingMessageEvent e)
messageSendFailed
in interface OutgoingMessageEventListener
boolean isAlive()
true
if the remote peer is known to be alive,
false
otherwise.
true
if the remote peer is known to be
alive, false
otherwise.void setAlive(boolean live)
boolean isInPeerView()
void setPeerView(PeerView pv)
long getLastUpdateTime()
void setLastUpdateTime(long last)
public boolean sendMessage(Message msg, String serviceName, String serviceParam)
msg
- the message to sendserviceName
- the service name on the destination peer to
which the message will be demultiplexedserviceParam
- the service param on the destination peer
to which the message will be demultiplexed
public RdvAdvertisement getRdvAdvertisement()
RdvAdvertisement setRdvAdvertisement(RdvAdvertisement adv)
adv
- is the RdvAdvertisement to be set.
|
JXTA J2SE | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |