Package org.jolokia.server.core.util.jmx
Interface MBeanServerAccess.MBeanAction<R>
- Type Parameters:
R- return type for the execute method
- Enclosing interface:
- MBeanServerAccess
public static interface MBeanServerAccess.MBeanAction<R>
A MBeanAction represent a single action on a MBeanServer for a given object name. The action is free
to throw a
InstanceNotFoundException or AttributeNotFoundException if the object name or attribute
is not contained in the give MBeanServer. In this case the next MBeanServer is tried, otherwise the result
from the action is returned and no other MBeanServers are tried-
Method Summary
Modifier and TypeMethodDescriptionexecute(MBeanServerConnection pConn, ObjectName pName, Object... extraArgs) Execute the action given toMBeanServerAccess.call(ObjectName, MBeanAction, Object...).
-
Method Details
-
execute
R execute(MBeanServerConnection pConn, ObjectName pName, Object... extraArgs) throws ReflectionException, InstanceNotFoundException, IOException, MBeanException, AttributeNotFoundException Execute the action given toMBeanServerAccess.call(ObjectName, MBeanAction, Object...).- Parameters:
pConn- MBeanServer on which the action should be performedpName- an objectname interpreted specifically by the actionextraArgs- any extra args given as context from the outside- Returns:
- the return value
- Throws:
ReflectionExceptionInstanceNotFoundException- if the MBean does not exist. ForMBeanServerAccess.call(ObjectName, MBeanAction, Object...)this implies to try the next MBeanServer.IOExceptionMBeanExceptionAttributeNotFoundException- if an attribute is read, this exception indicates, that the attribute is not known to the MBean specified (although the MBean has been found in the MBeanServer)
-