public final class ExternalSystemProcessingManager extends java.lang.Object implements ExternalSystemTaskNotificationListener, Disposable
Disposable.Parent
EP_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()
Disposable
dispose
in interface Disposable
public 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)
ExternalSystemTaskNotificationListener
onStart
in interface ExternalSystemTaskNotificationListener
id
- target task's idworkingDir
- working directorypublic void onStart(ExternalSystemTaskId id)
onStart
in interface ExternalSystemTaskNotificationListener
public void onStatusChange(ExternalSystemTaskNotificationEvent event)
ExternalSystemTaskNotificationListener
onStatusChange
in interface ExternalSystemTaskNotificationListener
event
- event that holds information about processing change state of the
target task
public void onTaskOutput(ExternalSystemTaskId id, java.lang.String text, boolean stdOut)
ExternalSystemTaskNotificationListener
onTaskOutput
in interface ExternalSystemTaskNotificationListener
id
- 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)
ExternalSystemTaskNotificationListener
onEnd
in interface ExternalSystemTaskNotificationListener
id
- target task's idpublic void onSuccess(ExternalSystemTaskId id)
ExternalSystemTaskNotificationListener
onSuccess
in interface ExternalSystemTaskNotificationListener
id
- target task's idpublic void onFailure(ExternalSystemTaskId id, java.lang.Exception e)
ExternalSystemTaskNotificationListener
onFailure
in interface ExternalSystemTaskNotificationListener
id
- target task's ide
- failure exceptionpublic void beforeCancel(ExternalSystemTaskId id)
ExternalSystemTaskNotificationListener
beforeCancel
in interface ExternalSystemTaskNotificationListener
id
- target task's idpublic void onCancel(ExternalSystemTaskId id)
ExternalSystemTaskNotificationListener
onCancel
in interface ExternalSystemTaskNotificationListener
id
- target task's idpublic void update()