NamedObjectpublic class NamedObject extends Object This class is used for storing a pair (name, object) where name is
an object name and object is a reference to the object. |
Fields Summary |
---|
private final ObjectName | nameObject name. | private final DynamicMBean | objectObject reference. |
Constructors Summary |
---|
public NamedObject(ObjectName objectName, DynamicMBean object)Allows a named object to be created.
if (objectName.isPattern()) {
throw new RuntimeOperationsException(new IllegalArgumentException("Invalid name->"+ objectName.toString()));
}
this.name= objectName;
this.object= object;
| public NamedObject(String objectName, DynamicMBean object)Allows a named object to be created.
ObjectName objName= new ObjectName(objectName);
if (objName.isPattern()) {
throw new RuntimeOperationsException(new IllegalArgumentException("Invalid name->"+ objName.toString()));
}
this.name= objName;
this.object= object;
|
Methods Summary |
---|
public boolean | equals(java.lang.Object object)Compares the current object name with another object name.
if (this == object) return true;
if (object == null) return false;
if (!(object instanceof NamedObject)) return false;
NamedObject no = (NamedObject) object;
return name.equals(no.getName());
| public javax.management.ObjectName | getName()Get the object name.
return name;
| public javax.management.DynamicMBean | getObject()Get the object
return object;
| public int | hashCode()Returns a hash code for this named object.
return name.hashCode();
|
|