com.evolution.player.core.network
Interface IRemoteNetworkNode

All Superinterfaces:
INetworkNode

public interface IRemoteNetworkNode
extends INetworkNode

A remote network node is a network node at a remote address.

Clients must not implement

Since:
0.6

Method Summary
 java.util.UUID[] getNeighbors()
          The id of all connected nodes.
 int getNeighborsCount()
          Returns the number of connections for this node.
 boolean hasNeighbor(java.util.UUID uuid)
          Is this node connected to the node with the given id?
 boolean isReachable()
          Can this node be reached directly? If this returns false then the node is probably behind a firewall or NAT.
 
Methods inherited from interface com.evolution.player.core.network.INetworkNode
getIp, getPort, getScoreBoard, getUUID
 

Method Detail

isReachable

boolean isReachable()
Can this node be reached directly? If this returns false then the node is probably behind a firewall or NAT. If this returns true the node is either reachable or its reachability has not yet been challenged.

Returns:
false if this node is not reachable, true otherwise

hasNeighbor

boolean hasNeighbor(java.util.UUID uuid)
Is this node connected to the node with the given id?

Parameters:
uuid - the id of the node to check for connection
Returns:
true if this node is connected to a node with the given id.

getNeighborsCount

int getNeighborsCount()
Returns the number of connections for this node.

Returns:
the number of connections

getNeighbors

java.util.UUID[] getNeighbors()
The id of all connected nodes.

Returns:
the id of the connected nodes
See Also:
INetwork.getNode(UUID)