Class ObjectNameLinkImpl
java.lang.Object
com.caplin.management.jmx.relations.links.ObjectNameLinkImpl
- All Implemented Interfaces:
ObjectNameLink
,Serializable
Default implementation of the ObjectNameLink
interface.
- See Also:
-
Constructor Summary
ConstructorDescriptionObjectNameLinkImpl
(ObjectName objectName, String linkName) Constructs an ObjectNameLinkImpl with the specified ObjectName and human readable link name. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Compares this ObjectNameLinkImpl to another one.Gets a human readable name for the MBean that this instance of ObjectNameLink represents a link to.Gets theObjectName
of the MBean that this instance of ObjectNameLink represents a link to.int
hashCode()
Returns a hash code value for the object.toString()
Returns the human readable name of the linked MBean, as returned bygetLinkName()
.
-
Constructor Details
-
ObjectNameLinkImpl
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 arenull
.
-
-
Method Details
-
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 interfaceObjectNameLink
- Returns:
- The
ObjectName
of the linked object.
-
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 interfaceObjectNameLink
- Returns:
- A human readable name for the linked object.
-
equals
Compares this ObjectNameLinkImpl to another one.
- Overrides:
equals
in classObject
- Parameters:
object
- The object to be compared against.- Returns:
true
if the specified object is a ObjectNameLinkImpl and itsgetObjectName()
andgetLinkName()
values are identical to this ObjectNameLinkImpl.
-
hashCode
public int hashCode()Returns a hash code value for the object.
-
toString
Returns the human readable name of the linked MBean, as returned by
getLinkName()
.
-