org.glassfish.api
Interface BytecodePreprocessor


@Contract
public interface BytecodePreprocessor

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


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

Method Detail

initialize

boolean initialize(java.util.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(java.lang.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 © 2012 GlassFish Community. All Rights Reserved.