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.
|
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(String name)
Register the INSTANCE as an mbean under the given name.
|
void |
traceCreate(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(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(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(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(String path)
Write all events to the file given by path
|
void |
writeAllEventsToFile(String path,
int sampleCount)
Write all events to the file given by path, repeating sampleCount times
at 5 second intervals.
|
void |
writeEventsToFile(String type,
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, createLinkMap, createRendezvous, createRendezvous, createTimer, deactivated, debug, decrementCounter, delay, deleteCounter, deleteLinkMap, deleteRendezvous, deleteTimer, err, errTraceException, 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, joinWait, killJVM, killJVM, killThread, link, link, linked, linked, matchIndex, noisy, noisyTraceException, openTrace, openTrace, out, outTraceException, printFrame, printlnFrame, readCounter, readCounter, rendezvous, 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, unlink, unlink, verbose, verboseTraceException, waitFor, waitFor, waitingprotected ThreadHistoryMonitorHelper(Rule rule)
public static void activated()
public static void installed(Rule rule)
public void registerHelperMBean(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 String getEventReport() throws IOException
ThreadHistoryMonitorHelperMXBeanThreadHistoryMonitorHelperMXBean.writeAllEventsToFile(String).getEventReport in interface ThreadHistoryMonitorHelperMXBeanIOException - if an io error occurspublic void writeEventsToFile(String type, String path) throws IOException
ThreadHistoryMonitorHelperMXBeanwriteEventsToFile in interface ThreadHistoryMonitorHelperMXBeantype - - one of create, start, exit, run; case insensitivepath - - the pathname of the file to write the event report to.IOException - if an io error occurspublic void writeAllEventsToFile(String path) throws IOException
writeAllEventsToFile in interface ThreadHistoryMonitorHelperMXBeanpath - path to fileIOException - if an io error occurspublic void writeAllEventsToFile(String path, int sampleCount) throws IOException
path - - the path to the event report filesampleCount - - the number of samples to takeIOException - - thrown on any IO failurepublic void traceCreate(Thread thread, int depth)
thread - the newly created threaddepth - unusedpublic void traceStart(Thread thread)
thread - the newly starting threadpublic void traceExit(Thread thread)
thread - the exiting threadpublic void traceRun(Runnable runnable)
runnable - the runnable being runCopyright © 2016. All rights reserved.