public abstract class ProgressMonitor extends Object
GitClient provides methods to start proper git
commands and such a method accepts an instance if ProgressMonitor
as its argument.
Clients of the git API may extend this class and through its methods catch
error and warning messages produced by a git command, changes in the state
of a command (when the command is started and when it's finished) and they may
cancel a running command by implementing the isCanceled method.| Modifier and Type | Class and Description |
|---|---|
static class |
ProgressMonitor.DefaultProgressMonitor
Basic implementation of the
ProgressMonitor abstract class. |
| Constructor and Description |
|---|
ProgressMonitor() |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
finished()
Called by a git command when it finishes its progress.
|
abstract boolean |
isCanceled()
Returns
true if the progress should be canceled. |
abstract void |
notifyError(String message)
Called when an error occurs during a git command's execution that however
does not prevent it from further actions.
|
abstract void |
notifyWarning(String message)
Called when a non-fatal warning should be delivered to a git command's
caller.
|
abstract void |
preparationsFailed(String message)
Called when a git command fails to start.
|
abstract void |
started(String command)
Called when a git command is started.
|
public abstract boolean isCanceled()
true if the progress should be canceled.
Git commands periodically check the result of the method and end their
progress immediately when the method returns truepublic abstract void started(String command)
command - a string representing a commandline version of the started commandpublic abstract void finished()
public abstract void preparationsFailed(String message)
message - error descriptionpublic abstract void notifyError(String message)
message - description of the errorpublic abstract void notifyWarning(String message)
message - description of the warningBuilt on May 19 2013. | Portions Copyright 1997-2013 Oracle. All rights reserved.