public class DefaultControllerNode extends java.lang.Object implements ControllerNode
ControllerNode.State
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_PORT |
Constructor and Description |
---|
DefaultControllerNode(NodeId id,
IpAddress ip)
Creates a new instance with the specified id and IP address.
|
DefaultControllerNode(NodeId id,
IpAddress ip,
int tcpPort)
Creates a new instance with the specified id and IP address and TCP port.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
int |
hashCode() |
NodeId |
id()
Returns the instance identifier.
|
IpAddress |
ip()
Returns the IP address of the controller instance.
|
int |
tcpPort()
Returns the TCP port on which the node listens for connections.
|
java.lang.String |
toString() |
public static final int DEFAULT_PORT
public DefaultControllerNode(NodeId id, IpAddress ip)
id
- instance identifierip
- instance IP addresspublic NodeId id()
ControllerNode
id
in interface ControllerNode
public IpAddress ip()
ControllerNode
ip
in interface ControllerNode
public int tcpPort()
ControllerNode
tcpPort
in interface ControllerNode
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object