com.ibm.ram.client.status
Class RAMStatusMonitor

java.lang.Object
  extended by SubProgressMonitor
      extended by com.ibm.ram.client.status.RAMStatusMonitor

public class RAMStatusMonitor
extends SubProgressMonitor

Monitors progress. This monitor uses a given amount of work ticks from a parent monitor, and can be used as follows:

     try {
         pm.beginTask("Main Task", 100);
         doSomeWork(pm, 30);
         RAMStatusPorgressMonitor subMonitor= new RAMStatusPorgressMonitor(pm, 40);
         try {
             subMonitor.beginTask("", 300);
             doSomeWork(subMonitor, 300);
         } finally {
             subMonitor.done();
         }
         doSomeWork(pm, 30);
     } finally {
         pm.done();
     }
 

Since:
7.1
Author:
kbauer

Constructor Summary
RAMStatusMonitor()
          Creates a RAMStatus Monitor based on NullProgress monitor
RAMStatusMonitor(IProgressMonitor monitor, int ticks)
          Creates a new sub-progress monitor for the given monitor.
RAMStatusMonitor(IProgressMonitor monitor, int ticks, int style)
          Creates a new sub-progress monitor for the given monitor.
 
Method Summary
 void appendStatus(java.lang.Object targetObject, int severity, int code, java.lang.String message, java.lang.Throwable exception)
          This method is called when a mojor status update is encountered by the client.
 RAMStatus getStatus()
           
 void setCanceled(boolean b)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RAMStatusMonitor

public RAMStatusMonitor()
Creates a RAMStatus Monitor based on NullProgress monitor

Since:
7.1.1

RAMStatusMonitor

public RAMStatusMonitor(IProgressMonitor monitor,
                        int ticks,
                        int style)
Creates a new sub-progress monitor for the given monitor. The sub progress monitor uses the given number of work ticks from its parent monitor.

Parameters:
monitor - the parent progress monitor
ticks - the number of work ticks allocated from the parent monitor
Since:
7.1

RAMStatusMonitor

public RAMStatusMonitor(IProgressMonitor monitor,
                        int ticks)
Creates a new sub-progress monitor for the given monitor. The sub progress monitor uses the given number of work ticks from its parent monitor.

Parameters:
monitor - the parent progress monitor
ticks - the number of work ticks allocated from the parent monitor
style - one of
  • SUPPRESS_SUBTASK_LABEL
  • PREPEND_MAIN_LABEL_TO_SUBTASK
See Also:
#SUPPRESS_SUBTASK_LABEL, #PREPEND_MAIN_LABEL_TO_SUBTASK
Method Detail

getStatus

public RAMStatus getStatus()
Returns:
the runningStatus
Since:
7.1

setCanceled

public void setCanceled(boolean b)

appendStatus

public void appendStatus(java.lang.Object targetObject,
                         int severity,
                         int code,
                         java.lang.String message,
                         java.lang.Throwable exception)
This method is called when a mojor status update is encountered by the client.

Parameters:
object -
severity -
code -
message -
exception -
Since:
7.1