Class ProcFilesRetriever
- java.lang.Object
-
- com.cloudbees.jenkins.support.api.Component
-
- com.cloudbees.jenkins.support.api.ObjectComponent<Computer>
-
- com.cloudbees.jenkins.support.impl.ProcFilesRetriever
-
- All Implemented Interfaces:
ExtensionPoint
,Describable<ObjectComponent<Computer>>
- Direct Known Subclasses:
AdvancedProcFilesRetriever
public abstract class ProcFilesRetriever extends ObjectComponent<Computer>
Base class for gathering specified /proc files
-
-
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
Constructors Constructor Description ProcFilesRetriever()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
addContents(Container container)
Add contents to a containervoid
addContents(Container container, Computer item)
Add contents from a specific item to a containerprotected void
addUnixContents(Container container, Node node)
protected void
afterAddUnixContents(Container container, Node node, String name)
Override this method if you want to hook some code afteraddUnixContents(Container, Node)
.Component.ComponentCategory
getCategory()
Specify in whichComponent.ComponentCategory
the current component is related.abstract Map<String,String>
getFilesToRetrieve()
Returns the map of files that should be retrieved.protected static String
getNodeName(Node node)
protected List<Node>
getNodes()
Set<Permission>
getRequiredPermissions()
Returns the (possibly empty, never null) list of permissions that are required for the user to include this in a bundle.SystemPlatform
getSystemPlatform(Node node)
<C extends AbstractModelObject>
booleanisApplicable(Class<C> clazz)
Return if this component is applicable to a specific class of item.-
Methods inherited from class com.cloudbees.jenkins.support.api.ObjectComponent
allInstances, for_, getDescriptor, isApplicable, isSelectedByDefault
-
Methods inherited from class com.cloudbees.jenkins.support.api.Component
getDisplayName, getDisplayPermissions, getId, isEnabled, isSelectedByDefault, start
-
-
-
-
Method Detail
-
getFilesToRetrieve
public abstract Map<String,String> getFilesToRetrieve()
Returns the map of files that should be retrieved.file name => path in the support bundle
.For example
/proc/meminfo => meminfo.txt
.- Returns:
- the map of files that should be retrieved and put in the support bundle.
-
getRequiredPermissions
@NonNull public Set<Permission> 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.
-
addContents
public void addContents(@NonNull Container container)
Description copied from class:ObjectComponent
Add contents to a container- Overrides:
addContents
in classObjectComponent<Computer>
- Parameters:
container
- aContainer
-
addContents
public void addContents(@NonNull Container container, @NonNull Computer item)
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
@NonNull public Component.ComponentCategory 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
.
-
afterAddUnixContents
protected void afterAddUnixContents(@NonNull Container container, @NonNull Node node, String name)
Override this method if you want to hook some code afteraddUnixContents(Container, Node)
.- Parameters:
container
- the supportContainer
.node
- the node for which the method is called.name
- the node name, "master" if Controller, and slave/${nodeName} if an agent.
-
getSystemPlatform
public SystemPlatform getSystemPlatform(Node node)
-
isApplicable
public <C extends AbstractModelObject> boolean isApplicable(Class<C> clazz)
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
-
-