org.apache.qpid.management.wsdm.capabilities
Class MBeanCapability
java.lang.Object
org.apache.muse.core.AbstractCapability
org.apache.muse.ws.resource.impl.AbstractWsResourceCapability
org.apache.qpid.management.wsdm.capabilities.MBeanCapability
- All Implemented Interfaces:
- org.apache.muse.core.Capability, org.apache.muse.core.Initialization, org.apache.muse.core.InitializationParameters, org.apache.muse.core.Shutdown, org.apache.muse.ws.resource.WsResourceCapability
public abstract class MBeanCapability
- extends org.apache.muse.ws.resource.impl.AbstractWsResourceCapability
Abstract capability used for centralize common
behaviour of the QMan resource(s) related capabilities.
Constructor Summary |
MBeanCapability()
Builds a new capability related to the given object name. |
Method Summary |
(package private) Object |
getAttribute(String attributeName)
Returns the attribute value of a QMan managed object instance. |
(package private) Result |
invoke(String operationName,
Object[] params,
String[] signature)
Invokes the requested operation on target JMX resource. |
(package private) void |
setAttribute(String attributeName,
Object value)
Sets the value for the given attribute on this MBean (proxy). |
(package private) void |
setResourceObjectName(ObjectName objectName)
Injects on this capability the object name of the target mbean. |
Methods inherited from class org.apache.muse.ws.resource.impl.AbstractWsResourceCapability |
createGettersAndSetters, deleteProperty, getGetter, getProperty, getPropertyElements, getPropertyNames, getSetter, getWsResource, initialize, insertProperty, invokeMethod, setResource, updateProperty |
Methods inherited from class org.apache.muse.core.AbstractCapability |
getActions, getCapabilityURI, getEnvironment, getInitializationParameter, getInitializationParameters, getLog, getMessageHandler, getPersistence, getResource, hasBeenInitialized, hasBeenShutdown, initializeCompleted, prepareShutdown, setCapabilityURI, setEnvironment, setInitializationParameters, setLog, setMessageHandler, setMessageHandlers, setPersistence, shutdown |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.muse.core.Capability |
getActions, getCapabilityURI, getEnvironment, getLog, getMessageHandler, getPersistence, getResource, initializeCompleted, prepareShutdown, setCapabilityURI, setEnvironment, setLog, setMessageHandlers, setPersistence |
Methods inherited from interface org.apache.muse.core.Initialization |
hasBeenInitialized |
Methods inherited from interface org.apache.muse.core.InitializationParameters |
getInitializationParameter, getInitializationParameters, setInitializationParameters |
Methods inherited from interface org.apache.muse.core.Shutdown |
hasBeenShutdown, shutdown |
_mxServer
protected final MBeanServer _mxServer
_objectName
protected ObjectName _objectName
MBeanCapability
public MBeanCapability()
- Builds a new capability related to the given object name.
- Parameters:
objectName
- the name of the target object of this capability.
setResourceObjectName
void setResourceObjectName(ObjectName objectName)
- Injects on this capability the object name of the target mbean.
- Parameters:
objectName
- the object name of the target mbean.
getAttribute
Object getAttribute(String attributeName)
throws NoSuchAttributeFault,
EntityInstanceNotFoundFault,
QManFault
- Returns the attribute value of a QMan managed object instance.
- Parameters:
attributeName
- the name of the attribute to be requested.
- Returns:
- the value for the requested attribute.
- Throws:
NoSuchAttributeFault
- when the requested attribute cannot be found
on the given entity instance.
EntityInstanceNotFoundFault
- when the requested entity instance cannot
be found.
QManFault
- in case of internal system failure.
setAttribute
void setAttribute(String attributeName,
Object value)
throws NoSuchAttributeFault,
EntityInstanceNotFoundFault,
QManFault
- Sets the value for the given attribute on this MBean (proxy).
- Parameters:
objectName
- the object name of the target instance (excluding the domain
name).attributeName
- the name of the attribute to be requested.value
- the value for the requested attribute.
- Throws:
NoSuchAttributeFault
- when the requested attribute cannot be found on the given
entity instance.
EntityInstanceNotFoundFault
- when the requested entity instance cannot be found.
QManFault
- in case of internal system failure.
invoke
Result invoke(String operationName,
Object[] params,
String[] signature)
throws EntityInstanceNotFoundFault,
MethodInvocationFault,
QManFault
- Invokes the requested operation on target JMX resource.
- Parameters:
operationName
- the name of the operation to be invoked.params
- parameters used for operation invocation.signature
- the operation / method signature.
- Throws:
EntityInstanceNotFoundFault
- when the target MBean doesn't exist on Management server.
MethodInvocationFault
- when the invocation of the requested operation raises an exception.
QManFault
- in case of not-well known failure.
Licensed to the Apache Software Foundation