Interface Provider

All Known Implementing Classes:

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 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. If any methods do not have a void return type, an java.lang.IllegalArgumentException will be thrown when the provider is registered.


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


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

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


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.