|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectalt.jiapi.event.EventProducer
alt.jiapi.event.MethodEventProducer
public class MethodEventProducer
This class registers itself to Jiapi runtime and tracks method entries and exits. When either event happens it will notify each listeners that has been registered.
If an exception is thrown from a method, the exit event is not produced. That is, exit events are produced only for the normal exits from methods.
Constructor Summary | |
---|---|
MethodEventProducer(InstrumentationDescriptor id)
Constructor. |
|
MethodEventProducer(InstrumentationDescriptor id,
java.lang.String resolution)
Creates new MethodEventProducer. |
Method Summary | |
---|---|
void |
addMethodListener(MethodListener mel)
Adds a MethodListener. |
protected void |
fireMethodEnterEvent(java.lang.Object sourceObject,
java.lang.String methodName)
Fires an event on method entry. |
protected void |
fireMethodExitEvent(java.lang.Object sourceObject,
java.lang.String methodName)
Fires an event on method exit. |
void |
methodEntered(java.lang.Object sourceObject,
java.lang.String methodName)
This method is called by the Jiapi runtime. |
void |
methodExited(java.lang.Object sourceObject,
java.lang.String methodName)
This method is called by the Jiapi runtime. |
void |
removeMethodListener(MethodListener mel)
Removes a MethodListener. |
Methods inherited from class alt.jiapi.event.EventProducer |
---|
getResolutions, isProtected, isProtected, match, protect, release |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MethodEventProducer(InstrumentationDescriptor id)
id
- Instrumentation decsriptor, that this MethodEventProducer
registers itself to.public MethodEventProducer(InstrumentationDescriptor id, java.lang.String resolution)
id
- Instrumentation decsriptor, that this MethodEventProducer
registers itself to.resolution
- Resolution, that is used further to select which
methods will trigger events to be produced.Method Detail |
---|
public void addMethodListener(MethodListener mel)
mel
- a MethodListenerprotected void fireMethodEnterEvent(java.lang.Object sourceObject, java.lang.String methodName)
sourceObject
- Source ObjectmethodName
- Name of the methodprotected void fireMethodExitEvent(java.lang.Object sourceObject, java.lang.String methodName)
sourceObject
- Source ObjectmethodName
- Name of the methodpublic void methodEntered(java.lang.Object sourceObject, java.lang.String methodName)
public void methodExited(java.lang.Object sourceObject, java.lang.String methodName)
public void removeMethodListener(MethodListener mel)
mel
- a MethodListener
|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |