com.sun.appserv
Interface BytecodePreprocessor


public interface BytecodePreprocessor

Third party tool vendors may implement this interface to provide code instrumentation to the application server.


Method Summary
 boolean initialize(Hashtable parameters)
          Initialize the profiler instance.
 byte[] preprocess(String classname, byte[] classBytes)
          This function profiler-enables the given class.
 

Method Detail

initialize

boolean initialize(Hashtable parameters)
Initialize the profiler instance. This method should be called exactly once before any calls to preprocess.

Parameters:
parameters - Initialization parameters.
Returns:
true if initialization succeeded.

preprocess

byte[] preprocess(String classname,
                  byte[] classBytes)
This function profiler-enables the given class. This method should not be called until the initialization method has completed. It is thread- safe.

Parameters:
classname - The name of the class to process. Used for efficient filtering.
classBytes - Actual contents of class to process
Returns:
The instrumented class bytes.


Copyright © 2007 Mort Bay Consulting. All Rights Reserved.