public final class ExternalSystemProcessingManager extends java.lang.Object implements ExternalSystemTaskNotificationListener, Disposable
Disposable.ParentEP_NAME| Constructor and Description |
|---|
ExternalSystemProcessingManager() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(ExternalSystemTask task) |
void |
beforeCancel(ExternalSystemTaskId id)
Notifies that task with the given id is queued for the cancellation.
|
void |
dispose()
Usually not invoked directly, see class javadoc.
|
ExternalSystemTask |
findTask(ExternalSystemTaskType type,
ProjectSystemId projectSystemId,
java.lang.String externalProjectPath) |
java.util.List<ExternalSystemTask> |
findTasksOfState(ProjectSystemId projectSystemId,
ExternalSystemTaskState... taskStates) |
boolean |
hasTaskOfTypeInProgress(ExternalSystemTaskType type,
Project project)
Allows to check if any task of the given type is being executed at the moment.
|
void |
onCancel(ExternalSystemTaskId id)
Notifies that task with the given id is cancelled.
|
void |
onEnd(ExternalSystemTaskId id)
Notifies that task with the given id is finished.
|
void |
onFailure(ExternalSystemTaskId id,
java.lang.Exception e)
Notifies that task with the given id is failed.
|
void |
onStart(ExternalSystemTaskId id) |
void |
onStart(ExternalSystemTaskId id,
java.lang.String workingDir)
Notifies that task with the given id is about to be started.
|
void |
onStatusChange(ExternalSystemTaskNotificationEvent event)
Notifies about processing state change of task with the given id.
|
void |
onSuccess(ExternalSystemTaskId id)
Notifies that task with the given id is finished successfully.
|
void |
onTaskOutput(ExternalSystemTaskId id,
java.lang.String text,
boolean stdOut)
Notifies about text written to stdout/stderr during the task execution
|
void |
release(ExternalSystemTaskId id) |
void |
update() |
public void dispose()
Disposabledispose in interface Disposablepublic boolean hasTaskOfTypeInProgress(ExternalSystemTaskType type, Project project)
type - target task typetrue if any task of the given type is being executed at the moment;
false otherwisepublic ExternalSystemTask findTask(ExternalSystemTaskType type, ProjectSystemId projectSystemId, java.lang.String externalProjectPath)
public java.util.List<ExternalSystemTask> findTasksOfState(ProjectSystemId projectSystemId, ExternalSystemTaskState... taskStates)
public void add(ExternalSystemTask task)
public void release(ExternalSystemTaskId id)
public void onStart(ExternalSystemTaskId id, java.lang.String workingDir)
ExternalSystemTaskNotificationListeneronStart in interface ExternalSystemTaskNotificationListenerid - target task's idworkingDir - working directorypublic void onStart(ExternalSystemTaskId id)
onStart in interface ExternalSystemTaskNotificationListenerpublic void onStatusChange(ExternalSystemTaskNotificationEvent event)
ExternalSystemTaskNotificationListeneronStatusChange in interface ExternalSystemTaskNotificationListenerevent - event that holds information about processing change state of the
target taskpublic void onTaskOutput(ExternalSystemTaskId id, java.lang.String text, boolean stdOut)
ExternalSystemTaskNotificationListeneronTaskOutput in interface ExternalSystemTaskNotificationListenerid - id of the task being executedtext - text produced by external system during the target task executionstdOut - flag which identifies output type (stdout or stderr)public void onEnd(ExternalSystemTaskId id)
ExternalSystemTaskNotificationListeneronEnd in interface ExternalSystemTaskNotificationListenerid - target task's idpublic void onSuccess(ExternalSystemTaskId id)
ExternalSystemTaskNotificationListeneronSuccess in interface ExternalSystemTaskNotificationListenerid - target task's idpublic void onFailure(ExternalSystemTaskId id, java.lang.Exception e)
ExternalSystemTaskNotificationListeneronFailure in interface ExternalSystemTaskNotificationListenerid - target task's ide - failure exceptionpublic void beforeCancel(ExternalSystemTaskId id)
ExternalSystemTaskNotificationListenerbeforeCancel in interface ExternalSystemTaskNotificationListenerid - target task's idpublic void onCancel(ExternalSystemTaskId id)
ExternalSystemTaskNotificationListeneronCancel in interface ExternalSystemTaskNotificationListenerid - target task's idpublic void update()