|
Project JXTA | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.jxta.impl.rendezvous.PeerConnection
net.jxta.impl.rendezvous.edge.RdvConnection
public class RdvConnection
Manages a connection with a client or a rendezvous peer.
Field Summary | |
---|---|
protected long |
beginRenewalAt
|
protected int |
cachedModCount
|
protected PeerAdvertisement |
cachedPeerAdvertisement
|
protected long |
leasedTil
|
Fields inherited from class net.jxta.impl.rendezvous.PeerConnection |
---|
cachedMessenger, connected, endpoint, group, peerid, peerName |
Constructor Summary | |
---|---|
RdvConnection(PeerGroup group,
RendezVousServiceImpl rdvService,
ID peer)
Constructor for the PeerConnection object |
Method Summary | |
---|---|
void |
connect(PeerAdvertisement padv,
long leaseDuration,
long earlyRenewal)
Declare that we are connected. |
long |
getRenewal()
Time at which the lease needs renewal in absolute milliseconds. |
boolean |
peerAdvertisementHasChanged()
|
protected void |
setLease(long leaseDuration)
Set the lease duration in relative milliseconds. |
void |
setLease(long leaseDuration,
long earlyRenewal)
Set the lease duration in relative milliseconds. |
String |
toString()
|
Methods inherited from class net.jxta.impl.rendezvous.PeerConnection |
---|
connect, equals, finalize, getCachedMessenger, getCachedMessenger, getLeaseEnd, getPeerID, getPeerName, hashCode, isConnected, messageSendFailed, messageSendSucceeded, sendMessage, setConnected, setPeerName |
Methods inherited from class java.lang.Object |
---|
clone, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected long leasedTil
protected long beginRenewalAt
protected PeerAdvertisement cachedPeerAdvertisement
protected int cachedModCount
Constructor Detail |
---|
public RdvConnection(PeerGroup group, RendezVousServiceImpl rdvService, ID peer)
group
- group contextendpoint
- the endpoint service to use for sending messages.peerid
- destination peeridleaseDuration
- connection duration in relative milliseconds.Method Detail |
---|
public String toString()
toString
in class PeerConnection
public boolean peerAdvertisementHasChanged()
protected void setLease(long leaseDuration)
setLease
in class PeerConnection
leaseDuration
- the lease duration in relative milliseconds.public void setLease(long leaseDuration, long earlyRenewal)
leaseDuration
- the lease duration in relative milliseconds.earlyRenewal
- amount of time in relative milliseconds before lease end to begin renewalpublic void connect(PeerAdvertisement padv, long leaseDuration, long earlyRenewal)
public long getRenewal()
|
JXTA J2SE | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |