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 SummaryFields
- 
Constructor SummaryConstructorsConstructorDescriptionHost(InetAddress address, int port) Creates a new host with the given address and port
- 
Method Summary
- 
Field Details- 
serializer
 
- 
- 
Constructor Details- 
HostCreates a new host with the given address and port- Parameters:
- address- The address of the host to create
- port- The port of the host to create
 
 
- 
- 
Method Details- 
getAddressGets the address of this host- Returns:
- The INetAddress
 
- 
getPortpublic int getPort()Gets the port of this host- Returns:
- The port
 
- 
toString
- 
equals
- 
hashCodepublic int hashCode()
- 
compareTo- Specified by:
- compareToin interface- Comparable<Host>
 
 
-