java.lang.Object
com.scivicslab.pojoactor.core.distributed.NodeInfo

public class NodeInfo extends Object
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 Details

    • NodeInfo

      public NodeInfo(String nodeId, String host, int port)
      Constructs a new NodeInfo with specified parameters.
      Parameters:
      nodeId - unique identifier for this node
      host - the hostname or IP address
      port - the HTTP port number
  • Method Details

    • getNodeId

      public String getNodeId()
      Returns the node identifier.
      Returns:
      the node ID
    • getHost

      public String getHost()
      Returns the hostname or IP address.
      Returns:
      the host
    • getPort

      public int getPort()
      Returns the HTTP port number.
      Returns:
      the port
    • getAddress

      public String getAddress()
      Returns the network address in "host:port" format.
      Returns:
      the address string
    • getUrl

      public String getUrl()
      Returns the base URL for this node.
      Returns:
      the URL string (e.g., "http://192.168.1.10:8081")
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object