org.jppf.management
Class JPPFManagementInfo

java.lang.Object
  extended by 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.

Author:
Laurent Cohen
See Also:
Serialized Form

Field Summary
static int DRIVER
          DRIVER information type.
static int NODE
          Node information type.
 
Constructor Summary
JPPFManagementInfo(String host, int port, String id)
          Initialize this information with the specified parameters, using NODE as type.
JPPFManagementInfo(String host, int port, String id, int type)
          Initialize this information with the specified parameters.
 
Method Summary
 int compareTo(JPPFManagementInfo o)
          Compare this object with an other.
 boolean equals(Object obj)
          Compare this object with another for equality.
 String getHost()
          Get the host on which the node is running.
 String getId()
          Get the unique id for the node's mbean server.
 int getPort()
          Get the port on which the node's JMX server is listening.
 JPPFSystemInformation getSystemInfo()
          Get the system information associated with the node at the time of the initial connection.
 int getType()
          Get the type of component this info is for.
 int hashCode()
          Get the hashcode for this instance.
 boolean isDriver()
          Determine whether this information represents a driver, connected as a peer to the driver from which this information is obtained.
 boolean isNode()
          Determine whether this information represents a real node.
 void setSystemInfo(JPPFSystemInformation systemInfo)
          Set the system information associated with the node at the time of the initial connection.
 String toString()
          Get a string representation of this node information.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

DRIVER

public static final int DRIVER
DRIVER information type.

See Also:
Constant Field Values

NODE

public static final int NODE
Node information type.

See Also:
Constant Field Values
Constructor Detail

JPPFManagementInfo

public JPPFManagementInfo(String host,
                          int port,
                          String id)
Initialize this information with the specified parameters, using NODE as type.

Parameters:
host - the host on which the node is running.
port - the port on which the node's JMX server is listening.
id - unique id for the node's mbean server.

JPPFManagementInfo

public JPPFManagementInfo(String host,
                          int port,
                          String id,
                          int type)
Initialize this information with the specified parameters.

Parameters:
host - the host on which the node is running.
port - the port on which the node's JMX server is listening.
id - unique id for the node's mbean server.
type - the type of component this info is for, must be one of NODE or DRIVER.
Method Detail

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()
Get the hashcode for this instance.

Overrides:
hashCode in class Object
Returns:
the hashcode as an int.
See Also:
Object.hashCode()

equals

public boolean equals(Object obj)
Compare this object with another for equality.

Overrides:
equals in class Object
Parameters:
obj - the object to compare to.
Returns:
true if the two objects are equal, false otherwise.
See Also:
Object.equals(java.lang.Object)

compareTo

public int compareTo(JPPFManagementInfo o)
Compare this object with an other.

Specified by:
compareTo in interface Comparable<JPPFManagementInfo>
Parameters:
o - the other object to compare to.
Returns:
a negative number if this object is less than the other, 0 if they are equal, a positive number otherwise.
See Also:
Comparable.compareTo(java.lang.Object)

toString

public String toString()
Get a string representation of this node information.

Overrides:
toString in class Object
Returns:
a string with the host:port format.
See Also:
Object.toString()

getSystemInfo

public JPPFSystemInformation getSystemInfo()
Get the system information associated with the node at the time of the initial connection.

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.

getId

public String getId()
Get the unique id for the node's mbean server.

Returns:
the id as a string.

getType

public int getType()
Get the type of component this info is for.

Returns:
one of NODE or DRIVER.

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.


Copyright © 2005-2010 JPPF Team.