Class ObjectNameLinkImpl

java.lang.Object
com.caplin.management.jmx.relations.links.ObjectNameLinkImpl
All Implemented Interfaces:
ObjectNameLink, Serializable

public class ObjectNameLinkImpl extends Object implements ObjectNameLink, Serializable

Default implementation of the ObjectNameLink interface.

See Also:
  • Constructor Details

    • ObjectNameLinkImpl

      public ObjectNameLinkImpl(ObjectName objectName, String linkName)

      Constructs an ObjectNameLinkImpl with the specified ObjectName and human readable link name.

      Parameters:
      objectName - The ObjectName the MBean this object links to was registered with.
      linkName - The human readable name of the MBean this object links to.
      Throws:
      IllegalArgumentException - If either the objectName or linkName arguments are null.
  • Method Details

    • getObjectName

      public ObjectName getObjectName()
      Description copied from interface: ObjectNameLink

      Gets the ObjectName of the MBean that this instance of ObjectNameLink represents a link to.

      Specified by:
      getObjectName in interface ObjectNameLink
      Returns:
      The ObjectName of the linked object.
    • getLinkName

      public String getLinkName()
      Description copied from interface: ObjectNameLink

      Gets a human readable name for the MBean that this instance of ObjectNameLink represents a link to.

      Specified by:
      getLinkName in interface ObjectNameLink
      Returns:
      A human readable name for the linked object.
    • equals

      public boolean equals(Object object)

      Compares this ObjectNameLinkImpl to another one.

      Overrides:
      equals in class Object
      Parameters:
      object - The object to be compared against.
      Returns:
      true if the specified object is a ObjectNameLinkImpl and its getObjectName() and getLinkName() values are identical to this ObjectNameLinkImpl.
    • hashCode

      public int hashCode()

      Returns a hash code value for the object.

      Overrides:
      hashCode in class Object
      Returns:
      A hash code value for this object.
    • toString

      public String toString()

      Returns the human readable name of the linked MBean, as returned by getLinkName().

      Overrides:
      toString in class Object
      Returns:
      The human readable name of the linked MBean.