Class ObjectNameLinkImpl
- java.lang.Object
-
- com.caplin.management.jmx.relations.links.ObjectNameLinkImpl
-
- All Implemented Interfaces:
ObjectNameLink
,java.io.Serializable
public class ObjectNameLinkImpl extends java.lang.Object implements ObjectNameLink, java.io.Serializable
Default implementation of the
ObjectNameLink
interface.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ObjectNameLinkImpl(javax.management.ObjectName objectName, java.lang.String linkName)
Constructs an ObjectNameLinkImpl with the specified ObjectName and human readable link name.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object object)
Compares this ObjectNameLinkImpl to another one.java.lang.String
getLinkName()
Gets a human readable name for the MBean that this instance of ObjectNameLink represents a link to.javax.management.ObjectName
getObjectName()
Gets theObjectName
of the MBean that this instance of ObjectNameLink represents a link to.int
hashCode()
Returns a hash code value for the object.java.lang.String
toString()
Returns the human readable name of the linked MBean, as returned bygetLinkName()
.
-
-
-
Constructor Detail
-
ObjectNameLinkImpl
public ObjectNameLinkImpl(javax.management.ObjectName objectName, java.lang.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:
java.lang.IllegalArgumentException
- If either the objectName or linkName arguments arenull
.
-
-
Method Detail
-
getObjectName
public javax.management.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 interfaceObjectNameLink
- Returns:
- The
ObjectName
of the linked object.
-
getLinkName
public java.lang.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 interfaceObjectNameLink
- Returns:
- A human readable name for the linked object.
-
equals
public boolean equals(java.lang.Object object)
Compares this ObjectNameLinkImpl to another one.
- Overrides:
equals
in classjava.lang.Object
- 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.
- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- A hash code value for this object.
-
toString
public java.lang.String toString()
Returns the human readable name of the linked MBean, as returned by
getLinkName()
.- Overrides:
toString
in classjava.lang.Object
- Returns:
- The human readable name of the linked MBean.
-
-