To define event types in an event provider class, write one method for each type of event that is related to the component. The requirements for each method are as follows:
The return value of the callback methods must be void.
The method body must be empty. You instantiate the event provider class in the class that invokes the method to send the event. For more information, see Sending an Event.
To enable the event to be used as an Oracle Solaris DTrace probe, each parameter in the method signature must be a Java language primitive, such as Integer, boolean, or String.
Annotate the declaration of each method with the org.glassfish.external.probe.provider.annotations.Probe annotation.
By default, the type of the event is the method name. If you overload a method in your class, you must uniquely identify the event type for each form of the method. To uniquely identify the event type, set the name element of the @Probe annotation to the name of the event type.
You are not required to uniquely identify the event type for methods that are not overloaded.