net.sf.panoptes.module.jmx
Class MbeanProxyFactory
java.lang.Object
|
+--net.sf.panoptes.module.jmx.MbeanProxyFactory
- public class MbeanProxyFactory
- extends java.lang.Object
Dynamically creates and uses a proxy for java.awt.event.ActionListener
via the classloader mechanism if called with
java de.fub.bytecode.util.JavaWrapper ProxyCreator
The trick is to encode the byte code we need into the class name
using the Utility.encode() method. This will result however in big
ugly class name, so for many cases it will be more sufficient to
put some clever creation code into the class loader.
This is
comparable to the mechanism provided via
java.lang.reflect.Proxy but more flexible.
- Version:
- $Id: ProxyCreator.java,v 1.5 2001/08/27 11:25:38 dahm Exp $
- Author:
- M. Dahm
- See Also:
de.fub.bytecode.util.JavaWrapper
,
de.fub.bytecode.util.ClassLoader
,
Utility
Method Summary |
static java.lang.Object |
createProxy(java.lang.String class_name)
Load class and create instance |
static void |
main(java.lang.String[] argv)
Create JavaClass object for a simple proxy for an java.awt.event.ActionListener
that just prints the passed arguments, load and use it via the class loader
mechanism. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MbeanProxyFactory
public MbeanProxyFactory()
createProxy
public static java.lang.Object createProxy(java.lang.String class_name)
- Load class and create instance
main
public static void main(java.lang.String[] argv)
throws java.lang.Exception
- Create JavaClass object for a simple proxy for an java.awt.event.ActionListener
that just prints the passed arguments, load and use it via the class loader
mechanism.
java.lang.Exception
Copyright © 2003 . All Rights Reserved.