Save This Page
Home » jboss-5.0.0.CR1-src » org » jboss » system » microcontainer » [javadoc | source]
org.jboss.system.microcontainer
public class: ServiceProxy [javadoc | source]
java.lang.Object
   org.jboss.system.microcontainer.ServiceProxy

All Implemented Interfaces:
    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.

This class is based on the old ServiceConfigurator

Constructor:
 public 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.
    Parameters:
    objectName - the object name
    server - the mbean server
    opInfo - the MBean operation info
Method from org.jboss.system.microcontainer.ServiceProxy Summary:
getServiceProxy,   getServiceProxy,   invoke
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.jboss.system.microcontainer.ServiceProxy Detail:
 public static Service getServiceProxy(ObjectName objectName,
    MBeanServer server) throws Exception 
    Get the Service interface through which the mbean given by objectName will be managed.
 public static Service getServiceProxy(ObjectName objectName,
    MBeanServer server,
    boolean includeLifecycle) throws Exception 
    Get the Service interface through which the mbean given by objectName will be managed.
 public Object invoke(Object proxy,
    Method method,
    Object[] args) throws 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.