org.jdiagnose
Class ResultInfoWrapper

java.lang.Object
  extended byorg.jdiagnose.ResultInfoWrapper
All Implemented Interfaces:
ResultInfo

public class ResultInfoWrapper
extends java.lang.Object
implements ResultInfo

Useful for decorating ResultInfo instances.

Author:
jmccrindle

Field Summary
protected  ResultInfo resultInfo
           
 
Constructor Summary
ResultInfoWrapper(ResultInfo resultInfo)
           
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 long getDuration()
           
 long getFinishTime()
           
 DiagnosticMessage getMessage()
           
 java.lang.String getName()
           
 long getStartTime()
           
 ResultState getState()
           
 int hashCode()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

resultInfo

protected ResultInfo resultInfo
Constructor Detail

ResultInfoWrapper

public ResultInfoWrapper(ResultInfo resultInfo)
Parameters:
resultInfo - instance that all the methods delegate to unless overwritten.
Method Detail

equals

public boolean equals(java.lang.Object obj)
See Also:
Object.equals(java.lang.Object)

getDuration

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

getFinishTime

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

getName

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

getStartTime

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

getState

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

hashCode

public int hashCode()
See Also:
Object.hashCode()

toString

public java.lang.String toString()
See Also:
Object.toString()

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.
See Also:
ResultInfo.getMessage()


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