org.jboss.system
Class ServiceController.ServiceProxy
java.lang.Object
org.jboss.system.ServiceController.ServiceProxy
- All Implemented Interfaces:
- java.lang.reflect.InvocationHandler
- Enclosing class:
- ServiceController (src)
- public class ServiceController.ServiceProxy
- extends java.lang.Object
- implements java.lang.reflect.InvocationHandler
An implementation of InvocationHandler used to proxy of the Service
interface for mbeans. It determines which of the start/stop
methods of the Service interface an mbean implements by inspecting its
MBeanOperationInfo values. Each Service interface method that has a
matching operation is forwarded to the mbean by invoking the method
through the MBeanServer object.
|
Method Summary |
java.lang.Object |
invoke(java.lang.Object proxy,
java.lang.reflect.Method method,
java.lang.Object[] args)
Map the method name to a Service interface method index and if the
corresponding hasOp array element is true, dispatch the method to the
mbean we are proxying. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ServiceController.ServiceProxy
public ServiceController.ServiceProxy(ObjectName (src) objectName,
MBeanOperationInfo (src) [] opInfo)
- Go through the opInfo array and for each operation that matches on of
the Service interface methods set the corresponding hasOp array value
to true.
- Parameters:
objectName - opInfo -
invoke
public java.lang.Object invoke(java.lang.Object proxy,
java.lang.reflect.Method method,
java.lang.Object[] args)
throws java.lang.Throwable
- Map the method name to a Service interface method index and if the
corresponding hasOp array element is true, dispatch the method to the
mbean we are proxying.
- Specified by:
invoke in interface java.lang.reflect.InvocationHandler
- Parameters:
proxy - method - args -
- Returns:
- Always null.
- Throws:
java.lang.Throwable