com.sun.tracing
Interface Provider

All Known Implementing Classes:
ProviderSkeleton

public interface Provider

Provider is a superinterface for user-defined tracing providers.

To define tracepoints, users must extend this interface and then use a ProviderFactory to create an instance of the newly-defined interface. Each method in the defined interface represents a tracepoint (or probe), which can be triggered by calling the associated method on the returned instance.

This interface also contains a getProbe() method, which can be used as keys to get direct handles to the Probe objects themselves. Probe objects can be triggered manually, or they can be queried to check their state.

When an application has finished triggering probes, it should call dispose() to free up any system resources associated with the Provider.

All methods declared in a subclass of this interface should have a void return type. Methods can have parameters, and when called the values of the arguments will be passed to the tracing implementation. Methods that do not have a void return value will always return null.

Since:
1.7

Method Summary
 void dispose()
          Disposes system resources associated with this provider.
 Probe getProbe(java.lang.reflect.Method method)
          Retrieves a reference to a Probe object, which is used to check status or to trigger the probe manually.
 

Method Detail

getProbe

Probe getProbe(java.lang.reflect.Method method)
Retrieves a reference to a Probe object, which is used to check status or to trigger the probe manually. If the provided method parameter is not a method of the provider interface, or if the provider interface has been disposed, then this returns null

Parameters:
method - a method declared in the provider.
Returns:
the specified probe represented by that method, or null.

dispose

void dispose()
Disposes system resources associated with this provider. After calling this method, triggering the probes will have no effect. Additional calls to this method after the first call are ignored.