Class ThreadDumps
java.lang.Object
com.cloudbees.jenkins.support.api.Component
com.cloudbees.jenkins.support.api.ObjectComponent<Computer>
com.cloudbees.jenkins.support.impl.ThreadDumps
- All Implemented Interfaces:
ExtensionPoint
,Describable<ObjectComponent<Computer>>
Thread dumps from the nodes.
- Author:
- Stephen Connolly
-
Nested Class Summary
Nested classes/interfaces inherited from class com.cloudbees.jenkins.support.api.Component
Component.ComponentCategory
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addContents
(Container result) Add contents to a containervoid
addContents
(Container container, Computer item) Add contents from a specific item to a containerSpecify in whichComponent.ComponentCategory
the current component is related.Returns the (possibly empty, never null) list of permissions that are required for the user to include this in a bundle.hudson.remoting.Future<String>
getThreadDump
(Node node) static String
getThreadDump
(hudson.remoting.VirtualChannel channel) Deprecated.boolean
isApplicable
(Computer item) Return if this component is applicable to a specific item.<C extends AbstractModelObject>
booleanisApplicable
(Class<C> clazz) Return if this component is applicable to a specific class of item.static void
printThreadInfo
(PrintWriter writer, ThreadInfo t, ThreadMXBean mbean) static void
printThreadInfo
(PrintWriter writer, ThreadInfo t, ThreadMXBean mbean, ContentFilter filter) Prints theThreadInfo
(becauseThreadInfo.toString()
caps out the stack trace at 8 frames).static void
threadDump
(OutputStream out) Dumps all of the threads' current information to an output stream.static void
Deprecated.static void
Deprecated.Methods inherited from class com.cloudbees.jenkins.support.api.ObjectComponent
allInstances, for_, isSelectedByDefault
Methods inherited from class com.cloudbees.jenkins.support.api.Component
getDisplayPermissions, getId, isEnabled, isSelectedByDefault, start
-
Constructor Details
-
ThreadDumps
@DataBoundConstructor public ThreadDumps()
-
-
Method Details
-
getRequiredPermissions
Description copied from class:Component
Returns the (possibly empty, never null) list of permissions that are required for the user to include this in a bundle. An empty list indicates that any user can include this bundle.- Specified by:
getRequiredPermissions
in classComponent
- Returns:
- the (possibly empty, never null) list of permissions that are required for the user to include this in a bundle.
-
getDisplayName
- Specified by:
getDisplayName
in classComponent
-
isApplicable
Description copied from class:ObjectComponent
Return if this component is applicable to a specific class of item.- Overrides:
isApplicable
in classObjectComponent<Computer>
- Type Parameters:
C
- Object that extendsAbstractModelObject
- Parameters:
clazz
- the class- Returns:
true
if applicable to this class
-
isApplicable
Description copied from class:ObjectComponent
Return if this component is applicable to a specific item.- Overrides:
isApplicable
in classObjectComponent<Computer>
- Parameters:
item
- the item- Returns:
- true if applicable
-
addContents
Description copied from class:ObjectComponent
Add contents to a container- Overrides:
addContents
in classObjectComponent<Computer>
- Parameters:
result
- aContainer
-
addContents
Description copied from class:ObjectComponent
Add contents from a specific item to a container- Specified by:
addContents
in classObjectComponent<Computer>
- Parameters:
container
- theContainer
item
- the item
-
getCategory
Description copied from class:Component
Specify in whichComponent.ComponentCategory
the current component is related.- Overrides:
getCategory
in classComponent
- Returns:
- An enum value of
Component.ComponentCategory
.
-
getThreadDump
- Throws:
IOException
-
getThreadDump
@Deprecated public static String getThreadDump(hudson.remoting.VirtualChannel channel) throws IOException, InterruptedException Deprecated.- Throws:
IOException
InterruptedException
-
threadDump
Dumps all of the threads' current information to an output stream.- Parameters:
out
- an output stream.- Throws:
UnsupportedEncodingException
- if the utf-8 encoding is not supported.
-
printThreadInfo
-
printThreadInfo
public static void printThreadInfo(PrintWriter writer, ThreadInfo t, ThreadMXBean mbean, @NonNull ContentFilter filter) Prints theThreadInfo
(becauseThreadInfo.toString()
caps out the stack trace at 8 frames). It filters the content with the filter. It's used by other components, likeDeadlockRequestComponent
viaDeadlockTrackChecker
- Parameters:
writer
- the writer to print to.t
- the thread to printmbean
- theThreadMXBean
to use.filter
- theContentFilter
to use for filtering the thread name.
-
threadDumpModern
@Deprecated public static void threadDumpModern(OutputStream out) throws UnsupportedEncodingException Deprecated.- Throws:
UnsupportedEncodingException
-
threadDumpLegacy
@Deprecated public static void threadDumpLegacy(OutputStream out) throws UnsupportedEncodingException Deprecated.- Throws:
UnsupportedEncodingException
-
getDescriptor
Description copied from class:ObjectComponent
- Specified by:
getDescriptor
in interfaceDescribable<ObjectComponent<Computer>>
- Overrides:
getDescriptor
in classObjectComponent<Computer>
-
threadDump(java.io.OutputStream)