public class ThreadHistoryMonitorHelper extends Helper implements ThreadHistoryMonitorHelperMXBean
| Modifier | Constructor and Description |
|---|---|
protected |
ThreadHistoryMonitorHelper(Rule rule) |
| Modifier and Type | Method and Description |
|---|---|
static void |
activated()
Looks to the org.jboss.byteman.sample.helper.debug system property to
set the class DEBUG mode flag.
|
ThreadMonitorEvent[] |
getCreateEvents()
Get the array of thread creation events.
|
java.lang.String |
getEventReport()
Get a string description of all thread events.
|
ThreadMonitorEvent[] |
getExitEvents()
Get the array of thread exit events.
|
ThreadMonitorEvent[] |
getRunEvents()
Get the array of Runnable.run events.
|
ThreadMonitorEvent[] |
getStartEvents()
Get the array of thread start events.
|
static void |
installed(Rule rule) |
void |
registerHelperMBean(java.lang.String name)
Register the INSTANCE as an mbean under the given name.
|
void |
traceCreate(java.lang.Thread thread,
int depth)
trace creation of the supplied thread to System.out
this should only be triggered from the constructor for class java.lang.Thread"
|
void |
traceExit(java.lang.Thread thread)
trace exit of the supplied thread to System.out
this should only be triggered from the call to java.lang.Thread.exit"
|
void |
traceRun(java.lang.Runnable runnable)
trace run of the supplied Runnable to System.out
this should only be triggered from a call to an implementation of java.lang.Runnable.run"
|
void |
traceStart(java.lang.Thread thread)
trace start of the supplied thread to System.out
this should only be triggered from the call to java.lang.Thread.start"
|
void |
writeAllEventsToFile(java.lang.String path)
Write all events to the file given by path
|
void |
writeAllEventsToFile(java.lang.String path,
int sampleCount)
Write all events to the file given by path, repeating sampleCount times
at 5 second intervals.
|
void |
writeEventsToFile(java.lang.String type,
java.lang.String path)
Write a report of all events of the indicated type to the given path.
|
addCountDown, callerCheck, callerEquals, callerEquals, callerEquals, callerEquals, callerEquals, callerEquals, callerEquals, callerEquals, callerEquals, callerMatches, callerMatches, callerMatches, callerMatches, callerMatches, callerMatches, callerMatches, callerMatches, callerMatches, clear, closeTrace, countDown, createCountDown, createCounter, createCounter, createJoin, createRendezvous, createRendezvous, createTimer, deactivated, debug, decrementCounter, delay, deleteCounter, deleteRendezvous, deleteTimer, flag, flagged, formatAllStacks, formatAllStacks, formatAllStacks, formatAllStacks, formatStack, formatStack, formatStack, formatStack, formatStackBetween, formatStackBetween, formatStackBetween, formatStackBetween, formatStackBetween, formatStackBetween, formatStackBetweenMatches, formatStackBetweenMatches, formatStackBetweenMatches, formatStackBetweenMatches, formatStackBetweenMatches, formatStackBetweenMatches, formatStackMatching, formatStackMatching, formatStackMatching, formatStackMatching, formatStackMatching, formatStackMatching, formatStackRange, formatThreadStack, formatThreadStack, formatThreadStack, formatThreadStack, getCountDown, getElapsedTimeFromTimer, getObjectSize, getRendezvous, getStack, incrementCounter, incrementCounter, isCountDown, isJoin, isRendezvous, joinEnlist, joinWait, killJVM, killJVM, killThread, matchIndex, openTrace, openTrace, printFrame, printlnFrame, readCounter, readCounter, rendezvous, resetTimer, setTriggering, signalKill, signalKill, signalThrow, signalThrow, signalWake, signalWake, toString, trace, trace, traceAllStacks, traceAllStacks, traceAllStacks, traceAllStacks, traceAllStacks, traceAllStacks, traceClose, traceln, traceln, traceOpen, traceOpen, traceStack, traceStack, traceStack, traceStack, traceStack, traceStack, traceStackBetween, traceStackBetween, traceStackBetween, traceStackBetween, traceStackBetween, traceStackBetween, traceStackBetween, traceStackBetween, traceStackBetween, traceStackBetweenMatches, traceStackBetweenMatches, traceStackBetweenMatches, traceStackBetweenMatches, traceStackBetweenMatches, traceStackBetweenMatches, traceStackBetweenMatches, traceStackBetweenMatches, traceStackBetweenMatches, traceStackMatching, traceStackMatching, traceStackMatching, traceStackMatching, traceStackMatching, traceStackMatching, traceStackMatching, traceStackMatching, traceStackMatching, traceStackRange, traceThreadStack, traceThreadStack, traceThreadStack, traceThreadStack, traceThreadStack, traceThreadStack, triggerIndex, uninstalled, waitFor, waitFor, waitingprotected ThreadHistoryMonitorHelper(Rule rule)
public static void activated()
public static void installed(Rule rule)
public void registerHelperMBean(java.lang.String name)
name - - the object name string to register the INSTANCE underpublic ThreadMonitorEvent[] getCreateEvents()
ThreadHistoryMonitorHelperMXBeangetCreateEvents in interface ThreadHistoryMonitorHelperMXBeanpublic ThreadMonitorEvent[] getStartEvents()
ThreadHistoryMonitorHelperMXBeangetStartEvents in interface ThreadHistoryMonitorHelperMXBeanpublic ThreadMonitorEvent[] getExitEvents()
ThreadHistoryMonitorHelperMXBeangetExitEvents in interface ThreadHistoryMonitorHelperMXBeanpublic ThreadMonitorEvent[] getRunEvents()
ThreadHistoryMonitorHelperMXBeangetRunEvents in interface ThreadHistoryMonitorHelperMXBeanpublic java.lang.String getEventReport()
throws java.io.IOException
ThreadHistoryMonitorHelperMXBeanThreadHistoryMonitorHelperMXBean.writeAllEventsToFile(String).getEventReport in interface ThreadHistoryMonitorHelperMXBeanjava.io.IOExceptionpublic void writeEventsToFile(java.lang.String type,
java.lang.String path)
throws java.io.IOException
ThreadHistoryMonitorHelperMXBeanwriteEventsToFile in interface ThreadHistoryMonitorHelperMXBeantype - - one of create, start, exit, run; case insensitivepath - - the pathname of the file to write the event report to.java.io.IOExceptionpublic void writeAllEventsToFile(java.lang.String path)
throws java.io.IOException
writeAllEventsToFile in interface ThreadHistoryMonitorHelperMXBeanpath - java.io.IOExceptionpublic void writeAllEventsToFile(java.lang.String path,
int sampleCount)
throws java.io.IOException
path - - the path to the event report filesampleCount - - the number of samples to takejava.io.IOException - - thrown on any IO failurepublic void traceCreate(java.lang.Thread thread,
int depth)
thread - the newly created threadpublic void traceStart(java.lang.Thread thread)
thread - the newly starting threadpublic void traceExit(java.lang.Thread thread)
thread - the exiting threadpublic void traceRun(java.lang.Runnable runnable)
runnable - the runnable being runCopyright © 2013. All Rights Reserved.