de.esprit.netsuite.rtask

## Interface RemoteCancellableTask

- All Superinterfaces:
    CancellableTask, TaskIdHolder
  All Known Subinterfaces:
    JournalTask<S>, RemoteTask<S>
  All Known Implementing Classes:
    AbstractBatchTask, AbstractDatabaseBatchTask, AbstractJournalOsProcessTask, AbstractJournalTask, AbstractRemoteOsProcessTask, AbstractRemoteTask, AgentExecutorTask, CoServerBindTask, LogCleanupBatchTask, RemoteArchiveExtractTask, RemoteArchiveListTask, RemoteJavaCommandTask, TestBatchTask

      public interface RemoteCancellableTask
      extends CancellableTask, TaskIdHolder

  Defines methods for remote canceling. Remote canceling is always done by any user and thus requires the `SessionId` of the killer.
  Author:
    Rainer Buesch

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `cancel(SessionId killerSessId)` Cancels the running task and stores the `SessionId` of the killer.
    `SessionId` | `getKillerSessionId()` Returns the `SessionId` of the one who cancelled this task

    - ### Methods inherited from interface de.esprit.appsuite.task.CancellableTask

      `wasCancelled`

    - ### Methods inherited from interface de.esprit.appsuite.task.TaskIdHolder

      `getTaskId`

- - ### Method Detail

    - #### cancel

          void cancel(SessionId killerSessId)

      Cancels the running task and stores the `SessionId` of the killer. Note that this call puts the task in a CANCEL_REQUESTED state. The task itself needs to detect this and perform any action needed for canceling itself - after all it puts itself in the cancelled state and terminates. The method `CancellableTask.wasCancelled()` returns true once a cancel was requested.

    - #### getKillerSessionId

          SessionId getKillerSessionId()

      Returns the `SessionId` of the one who cancelled this task

Copyright © 2014 EsprIT-Systems. All Rights Reserved.