org.logicalcobwebs.proxool.admin
Class SnapshotResultMonitor

java.lang.Object
  extended by org.logicalcobwebs.proxool.ResultMonitor
      extended by org.logicalcobwebs.proxool.admin.SnapshotResultMonitor

public abstract class SnapshotResultMonitor
extends ResultMonitor

A ResultMonitor specifically for Snapshots

Since:
Proxool 0.8
Version:
$Revision: 1.4 $, $Date: 2003/03/03 11:12:05 $
Author:
bill, $Author: billhorsman $ (current maintainer)

Field Summary
private  java.lang.String alias
           
private  SnapshotIF snapshot
           
 
Fields inherited from class org.logicalcobwebs.proxool.ResultMonitor
SUCCESS, TIMEOUT, WAITING
 
Constructor Summary
SnapshotResultMonitor(java.lang.String alias)
           
 
Method Summary
 boolean check()
          Passes the latest snapshot to check.
abstract  boolean check(SnapshotIF snapshot)
          Override this with your specific check
 SnapshotIF getSnapshot()
          Get the snapshot used in the most recent check
 
Methods inherited from class org.logicalcobwebs.proxool.ResultMonitor
getResult, setDelay, setTimeout
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

snapshot

private SnapshotIF snapshot

alias

private java.lang.String alias
Constructor Detail

SnapshotResultMonitor

public SnapshotResultMonitor(java.lang.String alias)
Parameters:
alias - so we can lookup the latest snapshot
Method Detail

check

public boolean check()
              throws java.lang.Exception
Passes the latest snapshot to check.

Specified by:
check in class ResultMonitor
Returns:
ResultMonitor.SUCCESS or ResultMonitor.TIMEOUT
Throws:
java.lang.Exception - if anything goes wrong

check

public abstract boolean check(SnapshotIF snapshot)
                       throws java.lang.Exception
Override this with your specific check

Parameters:
snapshot - the latest snapshot
Returns:
true if the result has happened, else false
Throws:
java.lang.Exception - if anything goes wrong

getSnapshot

public SnapshotIF getSnapshot()
Get the snapshot used in the most recent check

Returns:
snapshot