Class DiagnosticTask

java.lang.Object
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().
  • Constructor Details

    • DiagnosticTask

      public DiagnosticTask()
  • Method Details

    • equals

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

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

      protected abstract boolean doTask()
      The actual task for the sublass to populate.
      Returns:
      true if success, false if a failure.
    • executeTask

      public boolean executeTask()
      Execute the diagnostic task.
      Returns:
      true if ok, false if not
    • ignoringDiagnostic

      protected boolean ignoringDiagnostic()
      See if ignoring something based on messages key.
      Returns:
      true if ignoring the diagnostic
    • 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.
    • appendFailureTextLine

      protected void appendFailureTextLine(String text)
      Append a line to the text to be used in the event of a failure.
       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