Class JPPFManagementInfo

java.lang.Object
org.jppf.management.JPPFManagementInfo
All Implemented Interfaces:
Serializable, Comparable<JPPFManagementInfo>

public class JPPFManagementInfo extends Object implements Serializable, Comparable<JPPFManagementInfo>
Instances of this class encapsulate the information required to access the JMX server of a node or a driver.
Author:
Laurent Cohen
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Deprecated.
    the Android node feature is no longer part of JPPF
    static final int
    Deprecated.
    the .Net bridge feature is no longer part of JPPF
    static final int
    DRIVER information type.
    static final int
    Information that node is local on DRIVER or CLIENT.
    static final int
    Information that the node is a master node for the provisioning feature.
    static final int
    Node information type.
    static final int
    Peer driver information type.
    static final int
    Information that the node is a slave node for the provisioning feature.
    protected static final int
    Mask for elimination extended type attributes (bits 16-31).
  • Constructor Summary

    Constructors
    Constructor
    Description
    JPPFManagementInfo(String host, String ip, int port, String uuid, int type, boolean secure)
    Initialize this information with the specified parameters.
    JPPFManagementInfo(String host, String ip, int port, String uuid, int type, boolean secure, String masterUuid)
    Initialize this information with the specified parameters.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
     
    boolean
     
    Get the host on which the node is running.
    Get the ip address of the host on which the node or driver is running.
    Get the uuid of the master node that providioned this node.
    int
    Get the port on which the node's JMX server is listening.
    Get the system information associated with the node at the time of the initial connection.
    Get the unique id for the node's mbean server.
    int
     
    boolean
    Determine whether the node is active or inactive.
    boolean
    Deprecated.
    the Android node feature is no longer part of JPPF
    boolean
    Deprecated.
    the .Net bridge feature is no longer part of JPPF
    boolean
    Determine whether this information represents a driver, connected as a peer to the driver from which this information is obtained.
    boolean
    Determine whether this information represents a local node on client or driver.
    boolean
    Determine whether this information represents a master node for provisioning.
    boolean
    Determine whether this information represents a real node.
    boolean
    Determine whether this information represents a connection to peer driver.
    boolean
    Determine whether communication with the node or driver is be secure, i.e. via SSL/TLS.
    boolean
    Determine whether this information represents a slave node for provisioning.
    void
    setIsActive(boolean active)
    Specify whether the node is active or inactive.
    void
    Set the system information associated with the node at the time of the initial connection.
    Get a string displayed in the console.
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • DRIVER

      public static final int DRIVER
      DRIVER information type.
      See Also:
    • NODE

      public static final int NODE
      Node information type.
      See Also:
    • PEER

      public static final int PEER
      Peer driver information type.
      See Also:
    • MASTER

      public static final int MASTER
      Information that the node is a master node for the provisioning feature.
      See Also:
    • SLAVE

      public static final int SLAVE
      Information that the node is a slave node for the provisioning feature.
      See Also:
    • LOCAL

      public static final int LOCAL
      Information that node is local on DRIVER or CLIENT. Value of this constant can be changed in future!
      See Also:
    • DOTNET

      public static final int DOTNET
      Deprecated.
      the .Net bridge feature is no longer part of JPPF
      Information that the node is initialized with a .Net bridge and can execute .Net tasks. Value of this constant can be changed in future!
      Since:
      5.0
      See Also:
    • ANDROID

      @Deprecated public static final int ANDROID
      Deprecated.
      the Android node feature is no longer part of JPPF
      Information that the node is an Android node.
      Since:
      5.1
      See Also:
    • TYPE_MASK

      protected static final int TYPE_MASK
      Mask for elimination extended type attributes (bits 16-31).
      See Also:
  • Constructor Details

    • JPPFManagementInfo

      public JPPFManagementInfo(String host, String ip, int port, String uuid, int type, boolean secure)
      Initialize this information with the specified parameters.
      Parameters:
      host - the name of the host on which the node or driver is running.
      ip - the ip address of the host on which the node is running.
      port - the port on which the node's or driver's JMX server is listening.
      uuid - unique id of the node or driver.
      type - the type of component this info is for, must be one of NODE or DRIVER.
      secure - specifies whether communication with the node or driver should be secure, i.e. via SSL/TLS.
      Since:
      5.0
    • JPPFManagementInfo

      public JPPFManagementInfo(String host, String ip, int port, String uuid, int type, boolean secure, String masterUuid)
      Initialize this information with the specified parameters.
      Parameters:
      host - the name of the host on which the node or driver is running.
      ip - the ip address of the host on which the node is running.
      port - the port on which the node's or driver's JMX server is listening.
      uuid - unique id of the node or driver.
      type - the type of component this info is for, must be one of NODE or DRIVER.
      secure - specifies whether communication with the node or driver should be secure, i.e. via SSL/TLS.
      masterUuid - uuid of the node of which this node is a slave, if any.
      Since:
      5.0
  • Method Details

    • getHost

      public String getHost()
      Get the host on which the node is running.
      Returns:
      the host as a string.
    • getPort

      public int getPort()
      Get the port on which the node's JMX server is listening.
      Returns:
      the port as an int.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • compareTo

      public int compareTo(JPPFManagementInfo o)
      Specified by:
      compareTo in interface Comparable<JPPFManagementInfo>
    • toString

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

      public String toDisplayString()
      Get a string displayed in the console.
      Returns:
      .
    • getSystemInfo

      public JPPFSystemInformation getSystemInfo()
      Get the system information associated with the node at the time of the initial connection. Please note that this atrribute is transient and will always be null immediately after the JPPFManagementInfo object is retrieved from a remote server.
      Returns:
      a JPPFSystemInformation instance.
    • setSystemInfo

      public void setSystemInfo(JPPFSystemInformation systemInfo)
      Set the system information associated with the node at the time of the initial connection.
      Parameters:
      systemInfo - a JPPFSystemInformation instance.
    • getUuid

      public String getUuid()
      Get the unique id for the node's mbean server.
      Returns:
      the id as a string.
    • isPeer

      public boolean isPeer()
      Determine whether this information represents a connection to peer driver.
      Returns:
      true if this information represents a peer driver, false otherwise.
    • isNode

      public boolean isNode()
      Determine whether this information represents a real node.
      Returns:
      true if this information represents a node, false otherwise.
    • isDriver

      public boolean isDriver()
      Determine whether this information represents a driver, connected as a peer to the driver from which this information is obtained.
      Returns:
      true if this information represents a driver, false otherwise.
    • isSecure

      public boolean isSecure()
      Determine whether communication with the node or driver is be secure, i.e. via SSL/TLS.
      Returns:
      true if the connection is secure, false otherwise.
    • isMasterNode

      public boolean isMasterNode()
      Determine whether this information represents a master node for provisioning.
      Returns:
      true if the node is a master node, false otherwise.
    • isSlaveNode

      public boolean isSlaveNode()
      Determine whether this information represents a slave node for provisioning.
      Returns:
      true if the node is a master node, false otherwise.
    • isLocal

      public boolean isLocal()
      Determine whether this information represents a local node on client or driver.
      Returns:
      true if the node is local to a driver, false otherwise
    • isDotnetCapable

      public boolean isDotnetCapable()
      Deprecated.
      the .Net bridge feature is no longer part of JPPF
      Determine whether this information represents a node than can execute .Net tasks.
      Returns:
      true if the node is .Net-capable, false otherwise.
      Since:
      5.0
    • isAndroidNode

      public boolean isAndroidNode()
      Deprecated.
      the Android node feature is no longer part of JPPF
      Determine whether this information represents an Android node.
      Returns:
      true if the node an Android node, false otherwise.
      Since:
      5.1
    • isActive

      public boolean isActive()
      Determine whether the node is active or inactive.
      Returns:
      true if the node is active, false if it is inactve.
    • setIsActive

      public void setIsActive(boolean active)
      Specify whether the node is active or inactive.
      Parameters:
      active - true if the node is active, false if it is inactve.
    • getIpAddress

      public String getIpAddress()
      Get the ip address of the host on which the node or driver is running.
      Returns:
      the ip address as a string.
      Since:
      5.0
    • getMasterUuid

      public String getMasterUuid()
      Get the uuid of the master node that providioned this node.
      Returns:
      the uuid of the node of which this node is a slave, if any, or null if this object doesn't represent a node, or if it represents a node that is not a slave.