com.waveset.task
Interface Monitor

All Known Implementing Classes:
AbstractMonitor

public interface Monitor


Field Summary
static java.lang.String code_id
          This is public only so that it can be contained in an interface.
 
Method Summary
 boolean checkBreak()
           
 java.lang.Object getProperty(java.lang.String name)
           
 void monitorDeath(java.lang.Throwable throes)
          A task must signal a fatal exception.
 void monitorDone(WavesetResult res)
          A task must signal completion by returning its result.
 void monitorErrorData(PersistentObject po)
           
 void monitorErrorData(PersistentObject po, java.lang.String actionTaken)
           
 void monitorErrorData(java.lang.String s)
           
 void monitorErrorMsg(Message msg)
           
 void monitorErrorMsg(java.lang.String msg)
           
 void monitorErrorMsg(java.lang.Throwable e)
           
 void monitorInputData(PersistentObject po)
           
 void monitorInputData(PersistentObject po, java.lang.String actionTaken)
           
 void monitorInputData(java.lang.String s)
           
 void monitorOutputData(PersistentObject po)
           
 void monitorOutputData(PersistentObject po, java.lang.String actionTaken)
           
 void monitorOutputData(java.lang.String s)
           
 void monitorOutputMsg(Message msg)
           
 void monitorOutputMsg(java.lang.String msg)
           
 void monitorProgress(java.lang.String msg)
          A task may report (terse) progress such as "Extracted 127 of 129 accounts read.".
 void monitorWarningMsg(Message msg)
           
 void monitorWarningMsg(java.lang.String msg)
           
 void monitorWarningMsg(java.lang.Throwable e)
           
 void setMonitorProgress(boolean b)
           
 void setMonitorSeverity(Severity severity)
          Specify the threshold for monitoring.
 void setProperty(java.lang.String name, java.lang.Object value)
           
 

Field Detail

code_id

public static final java.lang.String code_id
This is public only so that it can be contained in an interface.

See Also:
Constant Field Values
Method Detail

monitorDone

public void monitorDone(WavesetResult res)
A task must signal completion by returning its result.


monitorDeath

public void monitorDeath(java.lang.Throwable throes)
A task must signal a fatal exception.

This allows the monitor to free any resources, as well as to report the untimely death of the subject task in a standard way.


checkBreak

public boolean checkBreak()
Returns:
true if you want the task to kill itself, false if you want the task to continue.

monitorProgress

public void monitorProgress(java.lang.String msg)
A task may report (terse) progress such as "Extracted 127 of 129 accounts read.".

This information is placed in the persistent task instance so that summary status information is available from any server in a load-balanced environment.


setMonitorProgress

public void setMonitorProgress(boolean b)

setMonitorSeverity

public void setMonitorSeverity(Severity severity)
Specify the threshold for monitoring.

If the threshold is null Severity.OK (the default), then everything will be monitored.

Setting the threshold to Severity.WARNING will suppress informational messages.

Setting the threshold to Severity.ERROR will suppress both informational and warning messages.

Setting the threshold to null suppresses all of informational, warning, and non-fatal error messages.

NOTE: This threshold does not affect the behavior of monitorDone, monitorDeath, checkBreak, or monitorProgress.


monitorInputData

public void monitorInputData(PersistentObject po)

monitorInputData

public void monitorInputData(PersistentObject po,
                             java.lang.String actionTaken)

monitorInputData

public void monitorInputData(java.lang.String s)

monitorOutputData

public void monitorOutputData(PersistentObject po)

monitorOutputData

public void monitorOutputData(PersistentObject po,
                              java.lang.String actionTaken)

monitorOutputData

public void monitorOutputData(java.lang.String s)

monitorOutputMsg

public void monitorOutputMsg(Message msg)

monitorOutputMsg

public void monitorOutputMsg(java.lang.String msg)

monitorErrorData

public void monitorErrorData(PersistentObject po)

monitorErrorData

public void monitorErrorData(PersistentObject po,
                             java.lang.String actionTaken)

monitorErrorData

public void monitorErrorData(java.lang.String s)

monitorErrorMsg

public void monitorErrorMsg(Message msg)

monitorErrorMsg

public void monitorErrorMsg(java.lang.Throwable e)

monitorErrorMsg

public void monitorErrorMsg(java.lang.String msg)

monitorWarningMsg

public void monitorWarningMsg(Message msg)

monitorWarningMsg

public void monitorWarningMsg(java.lang.Throwable e)

monitorWarningMsg

public void monitorWarningMsg(java.lang.String msg)

setProperty

public void setProperty(java.lang.String name,
                        java.lang.Object value)

getProperty

public java.lang.Object getProperty(java.lang.String name)