com.sun.jdmk.tools
Class ProxyGen

java.lang.Object
  extended bycom.sun.jdmk.tools.ProxyGen

Deprecated. MBean proxies should be generated using MBeanServerInvocationHandler.newProxyInstance. There is no longer any need to generate proxies as Java source code. The proxygen tool may be removed in a future version of Java DMK.

public final class ProxyGen
extends Object

The main class of the proxygen tool.

The class parses an MBean (or a list of MBeans) and generates the associated ProxyMBeans. This class is usually invoked from the command line:

where <options> includes: In the list of <classes>, you should provide class names without the ".class" extension. By default, generated ProxyMBeans are unpackaged, enable both read and write access to their corresponding MBean, and are located in the current directory.

In order to invoke ProxyGen from the command line, the Java Dynamic ManagementTM Kit provides a script called proxygen which takes the same parameters.

On UNIX platforms the script is provided under
<install_dir>/SUNWjdmk/5.1/bin.

On Windows platforms the batch file is provided under
<install_dir>\SUNWjdmk\5.1\bin.


Method Summary
static int compile(String[] args)
          Deprecated. The compile method of the proxygen compiler.
static void main(String[] args)
          Deprecated. The main method of the proxygen compiler.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

main

public static void main(String[] args)
Deprecated. 
The main method of the proxygen compiler.

This method invokes the compiler.
If an error occurs, this method exits with a status of 1.
If the compilation succeeds, this method exits with a status of 0.

The parameter to this method contains strings with the same order and meaning as the command-line arguments listed above.


compile

public static int compile(String[] args)
Deprecated. 
The compile method of the proxygen compiler.

This method creates an instance of ProxyGen and performs the "compilation" of the MBean to generate its proxy.
If an error occurs, this method returns a value of 1.
If the compilation succeeds, this method returns a value of 0.

The parameter to this method contains strings with the same order and meaning as the command-line arguments listed above.


FCS Release
jdmk-5_1-b34.1 2005.02.10_16:46:09_MET

Copyright 1998-2004 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.