Class PluginTaskAbortNotifier

java.lang.Object
com.xebialabs.xlrelease.domain.tasks.plugin.PluginTaskAbortNotifier

@Component public class PluginTaskAbortNotifier extends Object
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 Details

  • 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 through Task.abort(), which fires this event — it never routes through ExecutionService.abortTask, so without this subscription a release abort would orphan every delegated external task. A task-level abort may reach notifyAbort through 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.