org.jdiagnose.runtime
Class DefaultDiagnosticContainerResult

java.lang.Object
  extended byorg.jdiagnose.runtime.DefaultDiagnosticContainerResult
All Implemented Interfaces:
DiagnosticContainerResult, ResultInfo

public class DefaultDiagnosticContainerResult
extends java.lang.Object
implements DiagnosticContainerResult

Author:
jmccrindle

Constructor Summary
DefaultDiagnosticContainerResult(MessageFactory messageFactory, DiagnosticContainer container)
           
 
Method Summary
 java.util.List getContainerResults()
           
 DiagnosticContainer getDiagnosticContainer()
           
 long getDuration()
           
 int getFailedDiagnostics()
           
 long getFinishTime()
           
protected  long getFinishTimeFromList(java.util.List resultInfos)
           
 DiagnosticMessage getMessage()
           
 java.lang.String getName()
           
 java.util.List getResults()
           
 long getStartTime()
           
protected  long getStartTimeFromList(java.util.List resultInfos)
           
 ResultState getState()
           
protected  ResultState getStateFromList(java.util.List resultInfos)
           
 int getSuccessfulDiagnostics()
           
 int getTotalDiagnostics()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultDiagnosticContainerResult

public DefaultDiagnosticContainerResult(MessageFactory messageFactory,
                                        DiagnosticContainer container)
Method Detail

getTotalDiagnostics

public int getTotalDiagnostics()
Specified by:
getTotalDiagnostics in interface DiagnosticContainerResult
Returns:
the total number of diagnostics represented by this result and its children

getFailedDiagnostics

public int getFailedDiagnostics()
Specified by:
getFailedDiagnostics in interface DiagnosticContainerResult
Returns:
the number of children diagnostics that have failed (so far)

getSuccessfulDiagnostics

public int getSuccessfulDiagnostics()
Specified by:
getSuccessfulDiagnostics in interface DiagnosticContainerResult
Returns:
the number of children diagnostics that have succeeded (so far)

getResults

public java.util.List getResults()
Specified by:
getResults in interface DiagnosticContainerResult
Returns:
children results, may be null

getName

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

getStateFromList

protected ResultState getStateFromList(java.util.List resultInfos)

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

getStartTimeFromList

protected long getStartTimeFromList(java.util.List resultInfos)

getFinishTimeFromList

protected long getFinishTimeFromList(java.util.List resultInfos)

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

getContainerResults

public java.util.List getContainerResults()
Specified by:
getContainerResults in interface DiagnosticContainerResult

getDiagnosticContainer

public DiagnosticContainer getDiagnosticContainer()
Specified by:
getDiagnosticContainer in interface DiagnosticContainerResult

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.