org.jdiagnose.remote
Class DefaultResultInfo
java.lang.Object
org.jdiagnose.remote.DefaultResultInfo
- All Implemented Interfaces:
- ResultInfo
- public class DefaultResultInfo
- extends java.lang.Object
- implements ResultInfo
- Author:
- jmccrindle
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
DefaultResultInfo
public DefaultResultInfo()
DefaultResultInfo
public DefaultResultInfo(ResultInfo resultInfo)
- Copy constructor
- Parameters:
resultInfo
- the resultInfo to copy. should not be null
DefaultResultInfo
public DefaultResultInfo(java.lang.String name,
ResultState state,
long duration,
DiagnosticMessage message,
long startTime,
long finishTime)
- Parameters:
name
- state
- duration
- startTime
- finishTime
-
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
toString
public java.lang.String toString()
setDuration
public void setDuration(long duration)
- Parameters:
duration
- The duration to set.
setFinishTime
public void setFinishTime(long finishTime)
- Parameters:
finishTime
- The finishTime to set.
setName
public void setName(java.lang.String name)
- Parameters:
name
- The name to set.
setStartTime
public void setStartTime(long startTime)
- Parameters:
startTime
- The startTime to set.
setState
public void setState(ResultState state)
- Parameters:
state
- The state to set.
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.
setMessage
public void setMessage(DiagnosticMessage message)
Copyright © 2004-2005 Grape Design Limited. All Rights Reserved.