Class AbstractTrigger
- All Implemented Interfaces:
ExtensionPoint
,Describable<Trigger<?>>
,Serializable
- Direct Known Subclasses:
AbstractTriggerByFullContext
- Author:
- Gregory Boissinot
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class hudson.triggers.Trigger
Trigger.Cron
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionAbstractTrigger
(String cronTabSpec) protected
AbstractTrigger
(String cronTabSpec, boolean unblockConcurrentBuild) protected
AbstractTrigger
(String cronTabSpec, String triggerLabel) protected
AbstractTrigger
(String cronTabSpec, String triggerLabel, boolean unblockConcurrentBuild) -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract boolean
checkIfModified
(Node pollingNode, XTriggerLog log) Checks if there are modifications in the environment between last pollprotected boolean
protected XTriggerCause
Get the build cause instance to set This method may be overridden by subclasses in order to add additional information to the causeprotected abstract String
getCause()
Gets the trigger causeprotected abstract File
Gets the triggering log fileprotected abstract String
getName()
protected abstract Action[]
getScheduledActions
(Node pollingNode, XTriggerLog log) protected Action[]
getScheduledXTriggerActions
(Node pollingNode, XTriggerLog log) protected boolean
protected abstract boolean
Checks if a consistency workspace is required for the pollingprotected String
resolveEnvVars
(String value, AbstractProject<?, ?> project, Node node) Deprecated.void
run()
void
start
(BuildableItem project, boolean newInstance) protected void
start
(Node pollingNode, BuildableItem project, boolean newInstance, XTriggerLog log) Can be overridden if neededMethods inherited from class hudson.triggers.Trigger
all, checkTriggers, for_, getProjectAction, getProjectActions, getSpec, readResolve, stop, toString
-
Field Details
-
LOGGER
-
offlineSlaveOnStartup
protected transient boolean offlineSlaveOnStartup
-
-
Constructor Details
-
AbstractTrigger
- Throws:
ANTLRException
-
AbstractTrigger
- Throws:
ANTLRException
-
AbstractTrigger
- Throws:
ANTLRException
-
AbstractTrigger
protected AbstractTrigger(String cronTabSpec, String triggerLabel, boolean unblockConcurrentBuild) throws ANTLRException - Throws:
ANTLRException
-
-
Method Details
-
getTriggerLabel
-
getLogFile
Gets the triggering log file- Returns:
- the trigger log
-
requiresWorkspaceForPolling
protected abstract boolean requiresWorkspaceForPolling()Checks if a consistency workspace is required for the polling- Returns:
- true if a workspace is required for the job, false otherwise
-
start
- Overrides:
start
in classTrigger<BuildableItem>
-
start
protected void start(Node pollingNode, BuildableItem project, boolean newInstance, XTriggerLog log) throws XTriggerException Can be overridden if needed- Throws:
XTriggerException
-
resolveEnvVars
@Deprecated protected String resolveEnvVars(String value, AbstractProject<?, ?> project, Node node) throws XTriggerExceptionDeprecated.- Throws:
XTriggerException
-
run
public void run()- Overrides:
run
in classTrigger<BuildableItem>
-
getName
-
getDescriptor
- Specified by:
getDescriptor
in interfaceDescribable<Trigger<?>>
- Overrides:
getDescriptor
in classTrigger<BuildableItem>
-
getScheduledXTriggerActions
protected Action[] getScheduledXTriggerActions(Node pollingNode, XTriggerLog log) throws XTriggerException - Throws:
XTriggerException
-
getScheduledActions
-
checkIfModified
protected abstract boolean checkIfModified(Node pollingNode, XTriggerLog log) throws XTriggerException Checks if there are modifications in the environment between last poll- Returns:
- true if there are modifications
- Throws:
XTriggerException
-
requirePollingNode
protected boolean requirePollingNode() -
checkIfModified
- Throws:
XTriggerException
-
getCause
Gets the trigger cause- Returns:
- the trigger cause text
-
getBuildCause
Get the build cause instance to set This method may be overridden by subclasses in order to add additional information to the cause
-