public class StatusManager
extends java.lang.Object
Clients should add a listener for each file for which they need to follow the status (the same listener may be used for any number of files). The status manager will track status for any file with a listener.
Modifier and Type | Method and Description |
---|---|
IssueList |
addAssistListener(java.net.URL file,
Project project,
Workspace workspace,
AssistListener listener,
View view)
Adds an assist listener to a file.
|
IssueList |
addIssueListener(java.net.URL file,
Project project,
Workspace workspace,
IssueListener listener,
View view)
Adds an issue listener to a file.
|
boolean |
addStalenessListener(java.net.URL file,
Project project,
Workspace workspace,
StalenessListener listener)
Adds a staleness listener to a file.
|
Status |
addStatusListener(java.net.URL file,
Project project,
Workspace workspace,
StatusListener listener)
Adds a status listener to a file.
|
static StatusManager |
getStatusManager()
Gets the status manager.
|
void |
pause(boolean cancel)
Pauses the
StatusManager executor, if not already paused. |
void |
removeAssistListener(AssistListener listener)
Removes an assist listener from all files.
|
void |
removeAssistListener(java.net.URL file,
Project project,
Workspace workspace,
AssistListener listener)
Removes an assist listener from a file.
|
void |
removeIssueListener(IssueListener listener)
Removes an issue listener from all files.
|
void |
removeIssueListener(java.net.URL file,
Project project,
Workspace workspace,
IssueListener listener)
Removes an issue listener from a file.
|
void |
removeStalenessListener(StalenessListener listener)
Removes a staleness listener from all files.
|
void |
removeStalenessListener(java.net.URL file,
Project project,
Workspace workspace,
StalenessListener listener)
Removes a staleness listener from a file.
|
void |
removeStatusListener(StatusListener listener)
Removes a status listener from all files.
|
void |
removeStatusListener(java.net.URL file,
Project project,
Workspace workspace,
StatusListener listener)
Removes a status listener from a file.
|
void |
resume()
|
public static StatusManager getStatusManager()
public Status addStatusListener(java.net.URL file, Project project, Workspace workspace, StatusListener listener)
file
- The URL
of the file.project
- The project containing the file, or null if the file is a
project or workspace.workspace
- The workspace containing the file, or null if the file is
a workspace.listener
- A listener for changes in the status of the file.public void removeStatusListener(java.net.URL file, Project project, Workspace workspace, StatusListener listener)
file
- The URL
of the file.project
- The project containing the file, or null if the file is a
project or workspace.workspace
- The workspace containing the file, or null if the file is
a workspace.listener
- The listener to remove.public void removeStatusListener(StatusListener listener)
listener
- The listener to remove.public IssueList addIssueListener(java.net.URL file, Project project, Workspace workspace, IssueListener listener, View view)
file
- The URL
of the file.project
- The project containing the file, or null if the file is a
project or workspace.workspace
- The workspace containing the file, or null if the file is
a workspace.listener
- A listener for changes in the status or issues of the file.view
- The view depending on this listener, if any.public void removeIssueListener(java.net.URL file, Project project, Workspace workspace, IssueListener listener)
file
- The URL
of the file.project
- The project containing the file, or null if the file is a
project or workspace.workspace
- The workspace containing the file, or null if the file is
a workspace.listener
- The listener to remove.public void removeIssueListener(IssueListener listener)
listener
- The listener to remove.public IssueList addAssistListener(java.net.URL file, Project project, Workspace workspace, AssistListener listener, View view)
file
- The URL
of the file.project
- The project containing the file, or null if the file is a
project or workspace.workspace
- The workspace containing the file, or null if the file is
a workspace.listener
- A listener for changes in the status or issues of the file.view
- The view depending on this listener, if any.public void removeAssistListener(java.net.URL file, Project project, Workspace workspace, AssistListener listener)
file
- The URL
of the file.project
- The project containing the file, or null if the file is a
project or workspace.workspace
- The workspace containing the file, or null if the file is
a workspace.listener
- The listener to remove.public void removeAssistListener(AssistListener listener)
listener
- The listener to remove.public boolean addStalenessListener(java.net.URL file, Project project, Workspace workspace, StalenessListener listener)
file
- The URL
of the file.project
- The project containing the file, or null if the file is a
project or workspace.workspace
- The workspace containing the file, or null if the file is
a workspace.listener
- A listener for staleness of the status of the file.public void removeStalenessListener(java.net.URL file, Project project, Workspace workspace, StalenessListener listener)
file
- The URL
of the file.project
- The project containing the file, or null if the file is a
project or workspace.workspace
- The workspace containing the file, or null if the file is
a workspace.listener
- The listener to remove.public void removeStalenessListener(StalenessListener listener)
listener
- The listener to remove.public void pause(boolean cancel)
StatusManager
executor, if not already paused.
Each invocation of pause(boolean)
must be paired with a subsequent
invocation of resume()
. pause(boolean)
/resume()
pairs may be
nested.cancel
- whether to cancel tasks currently executing.public void resume()
StatusManager
executor, if only one pause(boolean)
has not been paired with a resume()
. Ignored if no pause(boolean)
s
are unpaired.