Class PluginTaskAbortNotifier
java.lang.Object
com.xebialabs.xlrelease.domain.tasks.plugin.PluginTaskAbortNotifier
Fires
TaskExecutorExtension.onAbort(com.xebialabs.xlrelease.osgi.api.tasks.TaskAbortContext) after a plugin task is aborted, so the extension can
release whatever external state it parked while suspended (a delegated remote task, a
reservation) — execute is never re-entered after an abort, so without this hook that
state would be orphaned.
Strictly fire-and-forget: runs on the auxiliary executor after the abort has already been
applied, and nothing thrown in the notification can affect the abort, the release, or the
caller. Same thread context as a normal execution (PluginTaskExecutionRunner: bundle
TCCL + release script user), so bridged host API calls behave identically in both.
-
Constructor Summary
ConstructorsConstructorDescriptionPluginTaskAbortNotifier(PluginTaskExtensionResolver extensionResolver, PluginTaskExecutionRunner executionRunner, ExecutorService auxiliaryExecutor, XLReleaseEventBus eventBus) -
Method Summary
Modifier and TypeMethodDescriptionvoidnotifyAbort(com.xebialabs.xlrelease.domain.PluginTask task) Never throws: an abort must succeed whether or not the plugin's cleanup can run.voidonTaskAborted(com.xebialabs.xlrelease.domain.events.TaskAbortedEvent event) The release-level abort path: aborting a whole release marks its tasks ABORTED throughTask.abort(), which fires this event — it never routes throughExecutionService.abortTask, so without this subscription a release abort would orphan every delegated external task.
-
Constructor Details
-
PluginTaskAbortNotifier
public PluginTaskAbortNotifier(PluginTaskExtensionResolver extensionResolver, PluginTaskExecutionRunner executionRunner, @Qualifier("auxiliary") ExecutorService auxiliaryExecutor, XLReleaseEventBus eventBus)
-
-
Method Details
-
onTaskAborted
public void onTaskAborted(com.xebialabs.xlrelease.domain.events.TaskAbortedEvent event) The release-level abort path: aborting a whole release marks its tasks ABORTED throughTask.abort(), which fires this event — it never routes throughExecutionService.abortTask, so without this subscription a release abort would orphan every delegated external task. A task-level abort may reachnotifyAbortthrough both routes; that is deliberate and harmless — extensions' onAbort is best-effort and cancelling a remote task twice is a no-op on the second attempt. -
notifyAbort
public void notifyAbort(com.xebialabs.xlrelease.domain.PluginTask task) Never throws: an abort must succeed whether or not the plugin's cleanup can run.
-