public final class Host extends Object implements Addressable<IpAddress>, Distributable, Serializable
Instances of this class are immutable, making them inherently threadsafe.
This class overrides equals(java.lang.Object)
and hashCode()
so that instances
play nicely with the Collection classes.
Constructor and Description |
---|
Host(IpAddress ipAddress,
PortNumber port)
Creates a host.
|
public Host(IpAddress ipAddress, PortNumber port)
ipAddress
- host's IP addressport
- port the host is listening topublic IpAddress address()
Addressable
address
in interface Addressable<IpAddress>
public PortNumber port()
Copyright © 2015. All Rights Reserved.