org.netbeans.modules.j2ee.deployment.profiler.spi
Interface Profiler


public interface Profiler

Profiler has to implement this interface and register it in the default Lookup.


Method Summary
 boolean attachProfiler(Map projectProperties)
          This method is used from the nbstartprofiledserver task to connect the Profiler to a server ready for profiling.
 ProfilerServerSettings getSettings(String serverInstanceID)
          This method is used from the Runtime tab to obtain settings for starting the server.
 int getState()
          Returns state of Profiler agent instance started from the IDE.
 void notifyStarting()
          Inform the profiler that some server is starting in the profile mode.
 javax.enterprise.deploy.spi.status.ProgressObject shutdown()
          Stops execution of the application (its JVM) currently being profiled.
 

Method Detail

notifyStarting

void notifyStarting()
Inform the profiler that some server is starting in the profile mode. It allows the Profiler to correctly detect STATE_STARTING.


attachProfiler

boolean attachProfiler(Map projectProperties)
This method is used from the nbstartprofiledserver task to connect the Profiler to a server ready for profiling.

Parameters:
projectProperties - properties of project the nbstartprofiledserver ant task was started from.
Returns:
true if the Profiler successfully attached to the server.

getSettings

ProfilerServerSettings getSettings(String serverInstanceID)
This method is used from the Runtime tab to obtain settings for starting the server. It displays dialog and let the user choose required mode (direct/dynamic attach) and other settings for the server startup.

Parameters:
serverInstanceID - ID of the server instance that is going to be started
Returns:
required settings or null if user cancelled starting the server.

getState

int getState()
Returns state of Profiler agent instance started from the IDE. It detects possible response from an unknown (not started from the IDE) Profiler agent, in this case it returns STATE_INACTIVE.

Returns:
state of Profiler agent instance.

shutdown

javax.enterprise.deploy.spi.status.ProgressObject shutdown()
Stops execution of the application (its JVM) currently being profiled. Shutdown is performed by the Profiler agent when in STATE_BLOCKED, STATE_RUNNING or STATE_PROFILING state.

Returns:
object used to monitor progress of shutdown.

 

Built on March 27 2006.  |  Portions Copyright 1997-2005 Sun Microsystems, Inc. All rights reserved.