org.jdiagnose.runtime
Class DefaultDiagnosticContainerResult
java.lang.Object
org.jdiagnose.runtime.DefaultDiagnosticContainerResult
- All Implemented Interfaces:
- DiagnosticContainerResult, ResultInfo
- public class DefaultDiagnosticContainerResult
- extends java.lang.Object
- implements DiagnosticContainerResult
- Author:
- jmccrindle
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultDiagnosticContainerResult
public DefaultDiagnosticContainerResult(MessageFactory messageFactory,
DiagnosticContainer container)
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.