org.codehaus.aspectwerkz.hook
Class Plug

java.lang.Object
  extended byorg.codehaus.aspectwerkz.hook.Plug

public class Plug
extends Object

Main application that allow two steps preparation of the hook

This can be used instead of ProcessStarter to dual JVM and stream piping

Usage

 
  
   
    
     java [options..] org.codehaus.aspectwerkz.hook.Plug -target <targetJar.jar>
     java [options..] org.codehaus.aspectwerkz.hook.Plug -hotswap <jdwp options>
     java [options..] org.codehaus.aspectwerkz.hook.Plug -resume <jdwp options>
     java [options..] org.codehaus.aspectwerkz.hook.Plug -info <jdwp options>
     
    
   
  
 
For the last two invocations, [jdwp options] must be the subpart of the -Xrunjdwp option indicating how to connect to the remote JVM (see sample below or documentation). For now, only localhost connection is supported.
 
  
   
    
     If the JVM was started with -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=y
     Use java [options..] ..Plug -prepare transport=dt_socket,address=8000
     
    
   
  
 
Be sure to set AspectWerkz option prior to starting the JVM with -Xrunjdwp options.

Author:
Alexandre Vasseur

Constructor Summary
Plug()
           
 
Method Summary
 void hotswap(Map jdwp)
          Hotswaps the java.lang.ClassLoader of the remote JVM and resume
 void info(Map jdwp)
          Prints information about the remote JVM and resume
static void main(String[] args)
           
static Map parseArgs(String args)
          Parse a jdwp like string in a Map

transport=dt_socket,address=8000 will produce a Map of 2 entries whose keys are transport and address

 void resume(Map jdwp)
          Resume the remote JVM, without hotswapping classes
 void target(String destJar)
          Dumps the modified java.lang.ClassLoader in destJar

The aspectcwerkz.classloader.clclasspreprocessor is used if specified, else defaults to AspectWerkz layer 1

static void usage()
          Print usage information on stdout
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Plug

public Plug()
Method Detail

target

public void target(String destJar)
            throws Exception
Dumps the modified java.lang.ClassLoader in destJar

The aspectcwerkz.classloader.clclasspreprocessor is used if specified, else defaults to AspectWerkz layer 1

Parameters:
destJar -
Throws:
Exception

resume

public void resume(Map jdwp)
            throws Exception
Resume the remote JVM, without hotswapping classes

Parameters:
jdwp -
Throws:
Exception

info

public void info(Map jdwp)
          throws Exception
Prints information about the remote JVM and resume

Parameters:
jdwp -
Throws:
Exception

hotswap

public void hotswap(Map jdwp)
             throws Exception
Hotswaps the java.lang.ClassLoader of the remote JVM and resume

Parameters:
jdwp -
Throws:
Exception

usage

public static void usage()
Print usage information on stdout


parseArgs

public static Map parseArgs(String args)
                     throws Exception
Parse a jdwp like string in a Map

transport=dt_socket,address=8000 will produce a Map of 2 entries whose keys are transport and address

Parameters:
args -
Returns:
Map jdwp options
Throws:
Exception

main

public static void main(String[] args)


Copyright © 2002-2004 Jonas Bonér, Alexandre Vasseur. All Rights Reserved.