Class Host
java.lang.Object
pt.unl.fct.di.novasys.network.data.Host
- All Implemented Interfaces:
Comparable<Host>
Represents a node in the network layer, including its IP Address and listen port
- Author:
- pfouto
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionHost
(InetAddress address, int port) Creates a new host with the given address and port -
Method Summary
-
Field Details
-
serializer
-
-
Constructor Details
-
Host
Creates a new host with the given address and port- Parameters:
address
- The address of the host to createport
- The port of the host to create
-
-
Method Details
-
getAddress
Gets the address of this host- Returns:
- The INetAddress
-
getPort
public int getPort()Gets the port of this host- Returns:
- The port
-
toString
-
equals
-
hashCode
public int hashCode() -
compareTo
- Specified by:
compareTo
in interfaceComparable<Host>
-