|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.tomp2p.futures.BaseFutureImpl<FutureDiscover>
net.tomp2p.futures.FutureDiscover
public class FutureDiscover
The future that keeps track of network discovery such as discovery if its behind a NAT, the status if UPNP or NAT-PMP could be established, if there is portforwarding.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface net.tomp2p.futures.BaseFuture |
---|
BaseFuture.FutureType |
Field Summary |
---|
Fields inherited from class net.tomp2p.futures.BaseFutureImpl |
---|
completed, lock, reason, type |
Constructor Summary | |
---|---|
FutureDiscover()
|
Method Summary | |
---|---|
void |
done(PeerAddress ourPeerAddress,
PeerAddress reporter)
Gets called if the discovery was a success and an other peer could ping us with TCP and UDP. |
PeerAddress |
getPeerAddress()
The peerAddress where we are reachable |
PeerAddress |
getReporter()
|
boolean |
isDiscoveredTCP()
Checks if this peer can be reached via TCP. |
boolean |
isDiscoveredUDP()
Checks if this peer can be reached via UDP. |
void |
setDiscoveredTCP()
Intermediate result if TCP has been discovered. |
void |
setDiscoveredUDP()
Intermediate result if UDP has been discovered. |
void |
setTimeout(org.jboss.netty.util.Timer timer,
int delaySec)
Creates a new future object and creates a timer that fires failed after a timeout. |
Methods inherited from class net.tomp2p.futures.BaseFutureImpl |
---|
addCancellation, addListener, addListener, await, await, awaitListeners, awaitUninterruptibly, awaitUninterruptibly, cancel, getFailedReason, getType, isCompleted, isFailed, isSuccess, notifyListerenrs, removeListener, self, setCompletedAndNotify, setFailed, setFailed, setFailed, setFailed, setFailed |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FutureDiscover()
Method Detail |
---|
public void setTimeout(org.jboss.netty.util.Timer timer, int delaySec)
timer
- The timer to usedelaySec
- The delay in secondspublic void done(PeerAddress ourPeerAddress, PeerAddress reporter)
peerAddress
- The peerAddress of our serverpeerAddress
- The peerAddress of the peer that reported our addresspublic PeerAddress getPeerAddress()
public PeerAddress getReporter()
public void setDiscoveredTCP()
public void setDiscoveredUDP()
public boolean isDiscoveredTCP()
public boolean isDiscoveredUDP()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |