|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.mat.util.ConsoleProgressListener
public class ConsoleProgressListener
Class used as progress listener for the console. You can obtain one instance
via the IQuery.execute(org.eclipse.mat.util.IProgressListener)
method if the query is run from
Memory Analyzer run in batch mode.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.eclipse.mat.util.IProgressListener |
---|
IProgressListener.OperationCanceledException, IProgressListener.Severity |
Field Summary |
---|
Fields inherited from interface org.eclipse.mat.util.IProgressListener |
---|
UNKNOWN_TOTAL_WORK |
Constructor Summary | |
---|---|
ConsoleProgressListener(java.io.OutputStream out)
|
|
ConsoleProgressListener(java.io.PrintWriter out)
|
Method Summary | |
---|---|
void |
beginTask(java.lang.String name,
int totalWork)
Notifies that the main task is beginning. |
void |
done()
Notifies that the work is done; that is, either the main task is completed or the user canceled it. |
boolean |
isCanceled()
Returns whether cancelation of current operation has been requested. |
void |
sendUserMessage(IProgressListener.Severity severity,
java.lang.String message,
java.lang.Throwable exception)
Sends a message to the user. |
void |
setCanceled(boolean value)
Sets the cancel state to the given value. |
void |
subTask(java.lang.String name)
Notifies that a subtask of the main task is beginning. |
void |
worked(int work)
Notifies that a given number of work unit of the main task has been completed. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ConsoleProgressListener(java.io.OutputStream out)
public ConsoleProgressListener(java.io.PrintWriter out)
Method Detail |
---|
public void beginTask(java.lang.String name, int totalWork)
IProgressListener
beginTask
in interface IProgressListener
name
- the name (or description) of the main tasktotalWork
- the total number of work units into which the main task is
been subdivided. If the value is UNKNOWN
the
implementation is free to indicate progress in a way which
doesn't require the total number of work units in advance.public void done()
IProgressListener
done
in interface IProgressListener
public boolean isCanceled()
IProgressListener
isCanceled
in interface IProgressListener
true
if cancellation has been requested, and
false
otherwiseIProgressListener.setCanceled(boolean)
public void setCanceled(boolean value)
IProgressListener
setCanceled
in interface IProgressListener
value
- true
indicates that cancelation has been
requested (but not necessarily acknowledged);
false
clears this flagIProgressListener.isCanceled()
public void subTask(java.lang.String name)
IProgressListener
subTask
in interface IProgressListener
name
- the name (or description) of the subtaskpublic void worked(int work)
IProgressListener
worked
in interface IProgressListener
work
- the number of work units just completedpublic void sendUserMessage(IProgressListener.Severity severity, java.lang.String message, java.lang.Throwable exception)
IProgressListener
sendUserMessage
in interface IProgressListener
severity
- Severity as defined in IProgressListener.Severity
message
- The message localized to the current locale.exception
- The relevant low-level exception, or null
if
none.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |