org.jdiagnose.library
Class TimeLimitDiagnostic

java.lang.Object
  extended byorg.jdiagnose.DiagnosticUnit
      extended byorg.jdiagnose.library.TimeLimitDiagnostic
All Implemented Interfaces:
Diagnostic, DiagnosticContainer, DiagnosticUnitLifeCycle

public class TimeLimitDiagnostic
extends DiagnosticUnit

Times a diagnostic and fails if the diagnostic took longer than maxTimeLimit or shorter than minTimeLimit to finish.

Author:
jmccrindle

Constructor Summary
TimeLimitDiagnostic()
          Default Constructor
TimeLimitDiagnostic(java.lang.String name)
          Construct with a new fully qualified name
 
Method Summary
 void diagnoseTimeLimit()
          Check to see that the Java Version is 1.3 or higher
 void setDiagnostic(Diagnostic diagnostic)
           
 void setMaxTimeMillis(long maxTimeMillis)
           
 void setMinTimeMillis(long minTimeMillis)
           
 void setRethrowFailures(boolean rethrowFailures)
           
 
Methods inherited from class org.jdiagnose.DiagnosticUnit
assertEquals, assertEquals, assertNotNull, assertNotNull, assertNull, assertNull, assertTrue, assertTrue, diagnose, getDiagnosticContainers, getDiagnostics, getName, setUp, tearDown
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TimeLimitDiagnostic

public TimeLimitDiagnostic()
Default Constructor


TimeLimitDiagnostic

public TimeLimitDiagnostic(java.lang.String name)
Construct with a new fully qualified name

Parameters:
name - the fqn of this diagnostic
Method Detail

diagnoseTimeLimit

public void diagnoseTimeLimit()
                       throws DiagnosticException
Check to see that the Java Version is 1.3 or higher

Throws:
DiagnosticException - if the Java Version isn't matched

setDiagnostic

public void setDiagnostic(Diagnostic diagnostic)
Parameters:
diagnostic - The diagnostic to set.

setMaxTimeMillis

public void setMaxTimeMillis(long maxTimeMillis)
Parameters:
maxTimeMillis - The maxTimeMillis to set.

setMinTimeMillis

public void setMinTimeMillis(long minTimeMillis)
Parameters:
minTimeMillis - The minTimeMillis to set.

setRethrowFailures

public void setRethrowFailures(boolean rethrowFailures)
Parameters:
rethrowFailures - The rethrowFailures to set.


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