org.activemath.util.checks
Class UrlChecker

java.lang.Object
  extended by java.lang.Thread
      extended by org.activemath.util.checks.Checker
          extended by org.activemath.util.checks.UrlChecker
All Implemented Interfaces:
Runnable

public class UrlChecker
extends Checker

A class that performs regular checks on a connection as configured in ActiveMath.properties. The value to configure is UrlChecker.Url.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
protected  int expectedDuration
           
protected  String urlToCheck
          stores the Url (as String) to open during the check
 
Fields inherited from class org.activemath.util.checks.Checker
aborted, BAD_STATE, BLOCKING_STATE, blockingPrepared, lastBlockingDate, lastBlockingDescription, lastFailureDate, lastFailureDescription, lastSuccessDate, retryInterval, SANE_STATE, shuttingDownSince, UNEXPECTED_BLOCKING_STATE
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
UrlChecker(Subconfiguration config)
          wrapped constructor
 
Method Summary
protected  void performCheck()
          Performs the URL connection and notifies the checker states appropriately.
 void run()
          runs the check itself
 String toString()
           
 
Methods inherited from class org.activemath.util.checks.Checker
computeBlocking, getCheckerState, getLastFailureDate, getLastFailureDescription, getLastSuccessDate, isBlocking, prepareForBlocking, testComplete, testFails, testSucceeds, unprepareForBlocking
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

urlToCheck

protected String urlToCheck
stores the Url (as String) to open during the check


expectedDuration

protected int expectedDuration
Constructor Detail

UrlChecker

public UrlChecker(Subconfiguration config)
wrapped constructor

Method Detail

run

public void run()
runs the check itself

Specified by:
run in interface Runnable
Specified by:
run in class Checker

performCheck

protected void performCheck()
Performs the URL connection and notifies the checker states appropriately.


toString

public String toString()
Overrides:
toString in class Thread