public abstract class AbstractExternalSystemTask extends UserDataHolderBase implements ExternalSystemTask
Modifier | Constructor and Description |
---|---|
protected |
AbstractExternalSystemTask(ProjectSystemId id,
ExternalSystemTaskType type,
Project project,
java.lang.String externalProjectPath) |
Modifier and Type | Method and Description |
---|---|
boolean |
cancel(ExternalSystemTaskNotificationListener... listeners)
Initiates cancel request.
|
boolean |
cancel(ProgressIndicator indicator,
ExternalSystemTaskNotificationListener... listeners)
Initiates cancel request of the current task and updates given indicator's
status during that. |
protected boolean |
compareAndSetState(ExternalSystemTaskState expect,
ExternalSystemTaskState update) |
protected abstract boolean |
doCancel() |
protected abstract void |
doExecute() |
boolean |
equals(java.lang.Object o) |
void |
execute(ExternalSystemTaskNotificationListener... listeners)
Executes current task at the calling thread, i.e.
|
void |
execute(ProgressIndicator indicator,
ExternalSystemTaskNotificationListener... listeners)
Executes current task and updates given indicator's
status during that. |
java.lang.Throwable |
getError() |
java.lang.String |
getExternalProjectPath() |
ProjectSystemId |
getExternalSystemId() |
ExternalSystemTaskId |
getId() |
Project |
getIdeProject() |
ExternalSystemTaskState |
getState() |
int |
hashCode() |
void |
refreshState()
Forces current task to refresh
its state . |
protected void |
setState(ExternalSystemTaskState state) |
java.lang.String |
toString() |
protected java.lang.String |
wrapProgressText(java.lang.String text) |
protected static ExternalSystemTaskNotificationListener |
wrapWithListener(ExternalSystemProgressNotificationManagerImpl manager) |
changeUserMap, clearUserData, clone, copyCopyableDataTo, copyUserDataTo, getCopyableUserData, getUserData, getUserDataString, getUserMap, isUserDataEmpty, putCopyableUserData, putUserData, putUserDataIfAbsent, replace, setUserMap
protected AbstractExternalSystemTask(ProjectSystemId id, ExternalSystemTaskType type, Project project, java.lang.String externalProjectPath)
public ProjectSystemId getExternalSystemId()
public ExternalSystemTaskId getId()
getId
in interface ExternalSystemTask
public ExternalSystemTaskState getState()
getState
in interface ExternalSystemTask
protected void setState(ExternalSystemTaskState state)
protected boolean compareAndSetState(ExternalSystemTaskState expect, ExternalSystemTaskState update)
public java.lang.Throwable getError()
getError
in interface ExternalSystemTask
public Project getIdeProject()
public java.lang.String getExternalProjectPath()
public void refreshState()
ExternalSystemTask
its state
.refreshState
in interface ExternalSystemTask
public void execute(ProgressIndicator indicator, ExternalSystemTaskNotificationListener... listeners)
ExternalSystemTask
status
during that.execute
in interface ExternalSystemTask
indicator
- target progress indicatorlisteners
- callbacks to be notified on task execution updatepublic void execute(ExternalSystemTaskNotificationListener... listeners)
ExternalSystemTask
execute
in interface ExternalSystemTask
listeners
- callbacks to be notified about the task execution updateprotected abstract void doExecute() throws java.lang.Exception
java.lang.Exception
public boolean cancel(ProgressIndicator indicator, ExternalSystemTaskNotificationListener... listeners)
ExternalSystemTask
status
during that.cancel
in interface ExternalSystemTask
indicator
- target progress indicatorlisteners
- callbacks to be notified on task execution updatepublic boolean cancel(ExternalSystemTaskNotificationListener... listeners)
ExternalSystemTask
cancel
in interface ExternalSystemTask
listeners
- callbacks to be notified about the task execution updateprotected abstract boolean doCancel() throws java.lang.Exception
java.lang.Exception
protected java.lang.String wrapProgressText(java.lang.String text)
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
protected static ExternalSystemTaskNotificationListener wrapWithListener(ExternalSystemProgressNotificationManagerImpl manager)