Class NodeInfo
java.lang.Object
com.scivicslab.pojoactor.core.distributed.NodeInfo
Information about a node in the distributed actor system.
This class holds the network address and identification information for a node that can host actors.
Usage Example
NodeInfo node1 = new NodeInfo("node1", "192.168.1.10", 8081);
System.out.println(node1.getAddress()); // "192.168.1.10:8081"
System.out.println(node1.getUrl()); // "http://192.168.1.10:8081"
- Since:
- 3.0.0, 3.0.0
- Author:
- devteam@scivics-lab.com
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
NodeInfo
Constructs a new NodeInfo with specified parameters.- Parameters:
nodeId- unique identifier for this nodehost- the hostname or IP addressport- the HTTP port number
-
-
Method Details
-
getNodeId
Returns the node identifier.- Returns:
- the node ID
-
getHost
Returns the hostname or IP address.- Returns:
- the host
-
getPort
public int getPort()Returns the HTTP port number.- Returns:
- the port
-
getAddress
Returns the network address in "host:port" format.- Returns:
- the address string
-
getUrl
Returns the base URL for this node.- Returns:
- the URL string (e.g., "http://192.168.1.10:8081")
-
toString
-
equals
-
hashCode
public int hashCode()
-