com.jrockit.mc.flightrecorder.spi
Interface IProgressMonitor

All Known Implementing Classes:
PrintStreamProgressMonitor, SilentProgressMonitor

public interface IProgressMonitor

Interface for reporting progress when accessing the flight recorder.

Author:
Erik Gahlin

Method Summary
 void beginTask(int workUnits, java.lang.String description)
          Called when a task begins.
 boolean cancel()
          Cancels the current task.
 void done()
          Finished with all the work
 void doWork(int workUnits)
          Do some work
 void endTask()
          Called when the current task is finished
 void log(Severity severity, java.lang.String message, java.lang.Throwable throwable)
          Logs an error/warning
 

Method Detail

cancel

boolean cancel()
Cancels the current task.

Returns:
true if success

beginTask

void beginTask(int workUnits,
               java.lang.String description)
Called when a task begins.

Parameters:
workUnits -
description -

endTask

void endTask()
Called when the current task is finished


doWork

void doWork(int workUnits)
Do some work

Parameters:
workUnits - the number of units to work

done

void done()
Finished with all the work


log

void log(Severity severity,
         java.lang.String message,
         java.lang.Throwable throwable)
Logs an error/warning

Parameters:
severity - the severity
message - the message
throwable - an optional Throwable. Null if N/A


Copyright © 1999, 2011, Oracle and/or its affiliates. All rights reserved.