User: cgjung
Date: 02/03/12 03:04:46
Modified: jboss.net/src/main/org/jboss/net/jmx
MBeanInvocationHandler.java
Log:
Axis Beta RC1 is here. Needs no more to be patched for integrating with the
jboss classloading architecture. Lots of interna have changed, though.
Adapted the deployment descriptors to support WSDD now.
Revision Changes Path
1.6 +70 -78
contrib/jboss.net/src/main/org/jboss/net/jmx/MBeanInvocationHandler.java
Index: MBeanInvocationHandler.java
===================================================================
RCS file:
/cvsroot/jboss/contrib/jboss.net/src/main/org/jboss/net/jmx/MBeanInvocationHandler.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- MBeanInvocationHandler.java 16 Oct 2001 15:52:51 -0000 1.5
+++ MBeanInvocationHandler.java 12 Mar 2002 11:04:46 -0000 1.6
@@ -5,7 +5,7 @@
* See terms of license at gnu.org.
*/
-// $Id: MBeanInvocationHandler.java,v 1.5 2001/10/16 15:52:51 cgjung Exp $
+// $Id: MBeanInvocationHandler.java,v 1.6 2002/03/12 11:04:46 cgjung Exp $
package org.jboss.net.jmx;
@@ -13,11 +13,9 @@
import javax.management.ObjectName;
-import org.apache.axis.client.ServiceClient;
-import org.apache.axis.AxisFault;
-import org.apache.axis.AxisEngine;
+import org.apache.axis.client.Call;
+import org.apache.axis.client.Service;
-import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Proxy;
import java.lang.reflect.Method;
@@ -28,80 +26,74 @@
* Helper class for dealing with remote JMX beans in typed or untyped ways.
* @created 1. Oktober 2001, 18:22
* @author <a href="mailto:[EMAIL PROTECTED]">Christoph G. Jung</a>
- * @version $Revision: 1.5 $
+ * @version $Revision: 1.6 $
*/
public class MBeanInvocationHandler extends AxisInvocationHandler {
-
- /** Creates new MBeanInvocationHandler pointing to a given url, using the given
engine */
- public MBeanInvocationHandler(URL endpoint) throws AxisFault {
- super(endpoint);
- }
-
- /** Creates new MBeanInvocationHandler pointing to a given url, using the given
engine */
- public MBeanInvocationHandler(URL endpoint, Map methodMap) throws AxisFault {
- super(endpoint,methodMap);
- }
-
- /** Creates new MBeanInvocationHandler pointing to a given url, using the given
engine */
- public MBeanInvocationHandler(URL endpoint, Map methodMap, Map interfaceMap)
throws AxisFault {
- super(endpoint,methodMap, interfaceMap);
- }
-
- /** Creates new MBeanInvocationHandler */
- public MBeanInvocationHandler(ServiceClient client) {
- super(client);
- }
-
- /** Creates new MBeanInvocationHandler */
- public MBeanInvocationHandler(ServiceClient client, Map methodMap) {
- super(client,methodMap);
- }
-
- /** Creates new MBeanInvocationHandler */
- public MBeanInvocationHandler(ServiceClient client, Map methodMap, Map
interfaceMap) {
- super(client,methodMap,interfaceMap);
- }
-
- /** Creates new MBeanInvocationHandler pointing to a given url, using the given
engine */
- public MBeanInvocationHandler(URL endpoint, AxisEngine engine) throws AxisFault
{
- super(endpoint,engine);
- }
-
- /** Creates new MBeanInvocationHandler pointing to a given url, using the given
engine */
- public MBeanInvocationHandler(URL endpoint, AxisEngine engine, Map methodMap)
throws AxisFault {
- super(endpoint,engine,methodMap);
- }
-
- /** Creates new MBeanInvocationHandler pointing to a given url, using the given
engine */
- public MBeanInvocationHandler(URL endpoint, AxisEngine engine, Map methodMap,
Map interfaceMap) throws AxisFault {
- super(endpoint,engine,methodMap, interfaceMap);
- }
-
-
- /** invocation using method signature */
- public Object invoke(String serviceName, String methodName, Object[] arguments,
Class[] classes)
- throws AxisFault {
- // convert classes to strings
- String[] classNames=new String[classes.length];
- for(int count=0;count<classes.length;count++)
- classNames[count]=classes[count].getName();
- // we convert the parameter structure
- Object[] realArgs= arguments!=null ? new Object[arguments.length+1] :
new Object[1];
- realArgs[0]=classNames;
- if(arguments!=null)
- System.arraycopy(arguments,0,realArgs,1,arguments.length);
- return invoke(serviceName,methodName,realArgs);
- }
-
- /** default creation of services */
- public static Object createMBeanService(Class _interface, URL endpoint) throws
AxisFault {
- return createAxisService(_interface,new MBeanInvocationHandler(endpoint));
- }
-
- /** default creation of services */
- public static Object createMBeanService(Class _interface,
MBeanInvocationHandler handler) throws AxisFault {
- return createAxisService(_interface,handler);
- }
-}
+ /** Creates new MBeanInvocationHandler pointing to a given url, using the given
engine */
+ public MBeanInvocationHandler(URL endpoint) {
+ super(endpoint);
+ }
+
+ /** Creates new MBeanInvocationHandler pointing to a given url, using the given
engine */
+ public MBeanInvocationHandler(URL endpoint, Map methodMap) {
+ super(endpoint, methodMap);
+ }
+
+ /** Creates new MBeanInvocationHandler pointing to a given url, using the given
engine */
+ public MBeanInvocationHandler(URL endpoint, Map methodMap, Map interfaceMap) {
+ super(endpoint, methodMap, interfaceMap);
+ }
+
+ /** Creates new MBeanInvocationHandler pointing to a given url, using the given
engine */
+ public MBeanInvocationHandler(URL endpoint, Map methodMap, Map interfaceMap,
boolean maintainSession)
+ {
+ super(endpoint, methodMap, interfaceMap,maintainSession);
+ }
+
+ /** Creates new MBeanInvocationHandler */
+ public MBeanInvocationHandler(Call call, Map methodMap, Map interfaceMap) {
+ super(call,methodMap,interfaceMap);
+ }
+
+ /** Creates new MBeanInvocationHandler */
+ public MBeanInvocationHandler(URL endpoint, Service service,Map methodMap, Map
interfaceMap) {
+ super(endpoint,service,methodMap,interfaceMap);
+ }
+
+ /** invocation using method signature */
+ public Object invoke(
+ String serviceName,
+ String methodName,
+ Object[] arguments,
+ Class[] classes)
+ throws java.rmi.RemoteException {
+ // convert classes to strings
+ String[] classNames = new String[classes.length];
+ for (int count = 0; count < classes.length; count++)
+ classNames[count] = classes[count].getName();
+ // we convert the parameter structure
+ Object[] realArgs =
+ arguments != null ? new Object[arguments.length + 1] : new Object[1];
+ realArgs[0] = classNames;
+ if (arguments != null)
+ System.arraycopy(arguments, 0, realArgs, 1, arguments.length);
+ return invoke(serviceName, methodName, realArgs);
+ }
+
+ /** default creation of services */
+ public static Object createMBeanService(Class _interface, URL endpoint)
+ {
+ return createAxisService(_interface, new MBeanInvocationHandler(endpoint));
+ }
+
+ /** default creation of services */
+ public static Object createMBeanService(
+ Class _interface,
+ MBeanInvocationHandler handler)
+ {
+ return createAxisService(_interface, handler);
+ }
+
+}
\ No newline at end of file
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development