games.strategy.net
Interface INode

All Superinterfaces:
java.lang.Comparable<INode>, java.io.Serializable
All Known Implementing Classes:
Node

public interface INode
extends java.io.Serializable, java.lang.Comparable<INode>

A Node in a network. Node identity is based on address/port. The name is just a display name

Since different nodes may appear as different adresses to different nodes (eg the server sees a node as its nat accesseble adress, while the node itself sees itself as a subnet address), the address for a node is defined as the address that the server sees!

Author:
sgb

Method Summary
 java.net.InetAddress getAddress()
           
 java.lang.String getName()
           
 int getPort()
           
 java.net.InetSocketAddress getSocketAddress()
           
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Method Detail

getName

java.lang.String getName()
Returns:
the display/user name for the node

getAddress

java.net.InetAddress getAddress()
Returns:
the adress for the node as seen by the server

getPort

int getPort()
Returns:
the port for the node as seen by the server

getSocketAddress

java.net.InetSocketAddress getSocketAddress()
Returns:
the adress for the node as seen by the server