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

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

public abstract class DiagnosticTask
extends 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(String text)
          Append a line to the text to be used in the event of a success.
abstract  boolean equals(Object obj)
           
 boolean executeTask()
          Execute the diagnostic task.
abstract  int hashCode()
           
 StringBuilder retrieveFailureText()
          failure text if this was a failure
abstract  String retrieveName()
          should be alphaNumeric in camelcase (for config file)
abstract  String retrieveNameFriendly()
          friendly name to display on screen
 StringBuilder retrieveSuccessText()
          success text if this was a success
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DiagnosticTask

public DiagnosticTask()
Method Detail

equals

public abstract boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public abstract int hashCode()
Overrides:
hashCode in class Object

executeTask

public boolean executeTask()
Execute the diagnostic task.

Returns:
true if ok, false if not

retrieveFailureText

public StringBuilder retrieveFailureText()
failure text if this was a failure

Returns:
the failure text

retrieveSuccessText

public StringBuilder retrieveSuccessText()
success text if this was a success

Returns:
success text

appendSuccessTextLine

public void appendSuccessTextLine(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 String retrieveName()
should be alphaNumeric in camelcase (for config file)

Returns:
name

retrieveNameFriendly

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

Returns:
the friendly name