|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.system.microcontainer.ServiceProxy
public class ServiceProxy
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.
This class is based on the old ServiceConfigurator
Constructor Summary | |
---|---|
ServiceProxy(ObjectName objectName,
MBeanServer server,
MBeanOperationInfo[] 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. |
Method Summary | |
---|---|
static Service |
getServiceProxy(ObjectName objectName,
MBeanServer server)
Get the Service interface through which the mbean given by objectName will be managed. |
static Service |
getServiceProxy(ObjectName objectName,
MBeanServer server,
boolean includeLifecycle)
Get the Service interface through which the mbean given by objectName will be managed. |
Object |
invoke(Object proxy,
Method method,
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 |
Constructor Detail |
---|
public ServiceProxy(ObjectName objectName, MBeanServer server, MBeanOperationInfo[] opInfo)
objectName
- the object nameserver
- the mbean serveropInfo
- the MBean operation infoMethod Detail |
---|
public static Service getServiceProxy(ObjectName objectName, MBeanServer server) throws Exception
objectName
- the object nameserver
- the mbean server
Exception
- for any errorpublic static Service getServiceProxy(ObjectName objectName, MBeanServer server, boolean includeLifecycle) throws Exception
objectName
- the object nameserver
- the mbean serverincludeLifecycle
- include lifecycle
Exception
- for any errorpublic Object invoke(Object proxy, Method method, Object[] args) throws Throwable
invoke
in interface InvocationHandler
proxy
- method
- args
-
Throwable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |