public abstract class Diagnostic extends hudson.model.AbstractDescribableImpl<Diagnostic> implements hudson.ExtensionPoint, Serializable
Constructor and Description |
---|
Diagnostic()
Creates a diagnostic
|
Diagnostic(int initialDelay,
int period,
int runs)
Creates a diagnostic
|
Modifier and Type | Method and Description |
---|---|
void |
afterExecutionFinished(DiagnosticsContainer result)
Called when all the executions have been completed or the diagnostics session has been canceled.
|
static hudson.DescriptorExtensionList<Diagnostic,DiagnosticDescriptor<?>> |
all()
All the registered
DiagnosticDescriptor s. |
void |
beforeExecutionStart(DiagnosticsContainer result)
Called before the first execution of the first run of this diagnostic.
|
boolean |
equals(Object obj) |
DiagnosticDescriptor<?> |
getDescriptor() |
abstract String |
getFileName()
Name used for the folder and files to be created.
|
String |
getId()
By default, the
Class.getName() of the component implementation |
int |
getInitialDelay()
Indicates the number milliseconds to delay the first execution
|
int |
getPeriod()
The period to wait between successive executions in milliseconds
|
int |
getRuns()
Number of times this diagnostic should be executed on the diagnostic session
|
int |
hashCode() |
abstract void |
runDiagnostic(DiagnosticsContainer result,
int run)
Executes the diagnostic
|
void |
setInitialDelay(int initialDelay)
Sets the number milliseconds to delay the first execution
|
void |
setPeriod(int period)
Sets the period to wait between successive executions in milliseconds
|
void |
setRuns(int runs)
Sets the number of times this diagnostic should be executed on the diagnostic session
|
public Diagnostic()
public Diagnostic(int initialDelay, int period, int runs)
initialDelay
- number milliseconds to delay the first executionperiod
- period to wait between successive executions in millisecondsruns
- number of times this diagnostic should be executed on the diagnostic sessionpublic void setInitialDelay(int initialDelay)
initialDelay
- milliseconds to delay the first executionpublic int getInitialDelay()
public void setPeriod(int period)
period
- to wait between successive executions in millisecondspublic int getPeriod()
public void setRuns(int runs)
runs
- number of times this diagnostic should be executed on the diagnostic sessionpublic int getRuns()
@Nonnull public String getId()
Class.getName()
of the component implementation@Nonnull public abstract String getFileName()
public abstract void runDiagnostic(@Nonnull DiagnosticsContainer result, int run) throws IOException
result
- DiagnosticsContainer
where the diagnostic should write the resultsrun
- execution number of this callIOException
- thrown when there is a problem executing the diagnosticpublic void beforeExecutionStart(DiagnosticsContainer result) throws IOException
result
- the DiagnosticsContainer
to store the result toIOException
- thrown when there is a problem executing the diagnosticpublic void afterExecutionFinished(@Nonnull DiagnosticsContainer result) throws IOException
result
- the DiagnosticsContainer
to store the result toIOException
- thrown when there is a problem executing the diagnosticpublic DiagnosticDescriptor<?> getDescriptor()
getDescriptor
in interface hudson.model.Describable<Diagnostic>
getDescriptor
in class hudson.model.AbstractDescribableImpl<Diagnostic>
@Nonnull @Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class) public static hudson.DescriptorExtensionList<Diagnostic,DiagnosticDescriptor<?>> all()
DiagnosticDescriptor
s.DiagnosticDescriptor
s.Copyright © 2016–2017. All rights reserved.