edu.internet2.middleware.grouper.ws.status
Class DiagnosticTask

java.lang.Object
  extended by edu.internet2.middleware.grouper.ws.status.DiagnosticTask
Direct Known Subclasses:
DiagnosticDbTest, DiagnosticLoaderJobTest, DiagnosticMemoryTest, DiagnosticMinGroupSize, DiagnosticSourceTest

public abstract class DiagnosticTask
extends java.lang.Object

A task to be executed for diagnostics. Each task should append any text to return in the event
 of a failure to the method appendFailureText(). Text to use in the event of a success
 should be sent to the method appendSuccessText().

Author:
mchyzer $Id: DiagnosticTask.java,v 1.2 2009/03/09 07:29:00 mchyzer Exp $

Constructor Summary
DiagnosticTask()
           
 
Method Summary
 void appendSuccessTextLine(java.lang.String text)
          Append a line to the text to be used in the event of a success.
 boolean executeTask()
          Execute the diagnostic task.
 java.lang.StringBuilder retrieveFailureText()
          failure text if this was a failure
abstract  java.lang.String retrieveName()
          should be alphaNumeric in camelcase (for config file)
abstract  java.lang.String retrieveNameFriendly()
          friendly name to display on screen
 java.lang.StringBuilder retrieveSuccessText()
          success text if this was a success
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DiagnosticTask

public DiagnosticTask()
Method Detail

executeTask

public boolean executeTask()
Execute the diagnostic task.

Returns:
true if ok, false if not

retrieveFailureText

public java.lang.StringBuilder retrieveFailureText()
failure text if this was a failure

Returns:
the failure text

retrieveSuccessText

public java.lang.StringBuilder retrieveSuccessText()
success text if this was a success

Returns:
success text

appendSuccessTextLine

public void appendSuccessTextLine(java.lang.String text)
Append a line to the text to be used in the event of a success.
 Each line added has the current time of the operation added to it.

Parameters:
text - is the text to use.

retrieveName

public abstract java.lang.String retrieveName()
should be alphaNumeric in camelcase (for config file)

Returns:
name

retrieveNameFriendly

public abstract java.lang.String retrieveNameFriendly()
friendly name to display on screen

Returns:
the friendly name