public interface MBeanServerProxy
Application logic can use MBeanServerProxy as follows:
Cluster cluster = CacheFactory.ensureCluster();
Registry registry = cluster.getManagement();
MBeanServerProxy proxy = registry.getMBeanServerProxy();
String sName = registry.ensureGlobalName(
"type=PartitionAssignment,service=partitioned,responsibility=DistributionCoordinator");
String sStatusHA = (String) proxy.getAttribute(sName, "HAStatus");
| Modifier and Type | Method and Description |
|---|---|
Object |
getAttribute(String sName, String sAttr)
Obtain the value of the specified MBean attribute.
|
Object |
invoke(String sName, String sOpName, Object[] aoParams, String[] asSignature)
Invoke an operation on the specified MBean.
|
boolean |
isMBeanRegistered(String sName)
Check whether or not an MBean with the specified name is already registered.
|
void |
setAttribute(String sName, String sAttr, Object oValue)
Set the value of the specified MBean attribute.
|
Object getAttribute(String sName, String sAttr)
sName - the MBean namesAttr - the attribute namevoid setAttribute(String sName, String sAttr, Object oValue)
sName - the MBean namesAttr - the attribute nameoValue - the attribute valueObject invoke(String sName, String sOpName, Object[] aoParams, String[] asSignature)
sName - the MBean name to invoke the method onsOpName - the name of the method to be invokedaoParams - an array containing the method parametersasSignature - an optional array containing the method signatures, this parameter is only necessary if there are multiple methods with the same nameboolean isMBeanRegistered(String sName)
sName - the MBean name