|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.Thread th.co.edge.jseq.EventThread
public class EventThread
An EventThred
traces the execution of a Java process, keeping
track of all method calls as Activation
s in an
ActivationList
containing all root activations, that is, all
method calls that occur "magically" from outside the traced methods, for
example from the main method. Each Java thread is traced as a separate root
activation.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.lang.Thread |
---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
Field Summary |
---|
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
EventThread(com.sun.jdi.VirtualMachine vm,
ActivationList rootActivations,
java.util.List<java.lang.String> includes,
java.util.List<java.lang.String> excludes,
java.util.List<java.lang.String> boundaryMethods,
boolean trace)
Creates a new EventThread that traces a given JDI
VirtualMachine , filling in a list of root activations. |
Method Summary | |
---|---|
void |
run()
Handles all events generated by JDI, running for as long as the Java process is active, or until an attached process disconnects the event thread. |
void |
setEventRequests(java.lang.String startMethod)
Creates all JDI event requests, that is, defines the set of events that will be handled by this EventThread . |
Methods inherited from class java.lang.Thread |
---|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public EventThread(com.sun.jdi.VirtualMachine vm, ActivationList rootActivations, java.util.List<java.lang.String> includes, java.util.List<java.lang.String> excludes, java.util.List<java.lang.String> boundaryMethods, boolean trace)
EventThread
that traces a given JDI
VirtualMachine
, filling in a list of root activations.
A list of included and excluded method names determine which methods to trace. If the list of included method names is empty, all methods except the excluded ones are traced, and correspondingly if the list of excluded method name is empty. If both lists are non-empty, only the methods in the included list are traced, except the ones in the excluded list. Method names in the included and excluded lists can either be a fully qualified method name, or a simple wild-card expression starting or ending with "*".
For example, if the included list contains "foo.Bar.*", and the excluded
list is empty, all methods in the class foo.Bar
will be
traced. If the included list is empty and the excluded list contains
"java.*", everything but methods in the java
package will
be traced. Finally, if the included list contains "foo.Bar.*" and the
excluded list contains "foo.Bar.baz", all methods in the class
foo.Bar
will be traced, except for the method
baz
.
It is also possible to specify a list of boundary methods. A
For example, if the list of boundary methods contains "foo.Bar.baz",
tracing will include the call to baz
, but no methods
called by baz
. Normal tracing is resumed after
baz
returns.
vm
- the JDI VirtualMachine
, a representation of
the Java process to tracerootActivations
- the list of root activations that will be filled in during the
program traceincludes
- a list of method name pattern that will be included in the
program trace, where name patterns may start or end with the
wild-card "*"excludes
- a list of method name patterns that will be excluded in the
program trace, where name patterns may start or end with the
wild-card "*"boundaryMethods
- a list of boundary methods, methods where tracing will stop
during the execution of the methodtrace
- if true
the program trace (method entry and
exit, for example) will be echoed to System.out
Method Detail |
---|
public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
public void setEventRequests(java.lang.String startMethod)
EventThread
.
startMethod
- the fully qualified name of the method where tracing should
start, or null
if tracing should start
immediately
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |