org.jdiagnose.runtime
Class DefaultDiagnosticResult

java.lang.Object
  extended byorg.jdiagnose.runtime.DefaultDiagnosticResult
All Implemented Interfaces:
DiagnosticResult, ResultInfo

public class DefaultDiagnosticResult
extends java.lang.Object
implements DiagnosticResult

Author:
jmccrindle

Constructor Summary
DefaultDiagnosticResult(MessageFactory messageFactory, Diagnostic diagnostic)
           
 
Method Summary
 void diagnose()
          Rerun the diagnostic associated with this result
 Diagnostic getDiagnostic()
           
 long getDuration()
           
 long getFinishTime()
           
 DiagnosticMessage getMessage()
           
 java.lang.String getName()
           
 long getStartTime()
           
 ResultState getState()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultDiagnosticResult

public DefaultDiagnosticResult(MessageFactory messageFactory,
                               Diagnostic diagnostic)
Method Detail

getName

public java.lang.String getName()
Specified by:
getName in interface ResultInfo
Returns:
the name of the diagnostic that was run

getState

public ResultState getState()
Specified by:
getState in interface ResultInfo
Returns:
whether the diagnostic isn't running, has started/succeeded/failed

getDuration

public long getDuration()
Specified by:
getDuration in interface ResultInfo
Returns:
the length of time the diagnostic took to run in milliseconds

getStartTime

public long getStartTime()
Specified by:
getStartTime in interface ResultInfo
Returns:
the time in milliseconds when the diagnostic started

getFinishTime

public long getFinishTime()
Specified by:
getFinishTime in interface ResultInfo
Returns:
the time in milliseconds when the diagnostic completed

diagnose

public void diagnose()
Description copied from interface: DiagnosticResult
Rerun the diagnostic associated with this result

Specified by:
diagnose in interface DiagnosticResult

getDiagnostic

public Diagnostic getDiagnostic()
Specified by:
getDiagnostic in interface DiagnosticResult

getMessage

public DiagnosticMessage getMessage()
Specified by:
getMessage in interface ResultInfo
Returns:
the exception that caused the diagnostic to fail, if it failed. may often be null.


Copyright © 2004-2005 Grape Design Limited. All Rights Reserved.