org.logicalcobwebs.proxool
Class StateResultMonitor

java.lang.Object
  extended by org.logicalcobwebs.proxool.ResultMonitor
      extended by org.logicalcobwebs.proxool.StateResultMonitor
All Implemented Interfaces:
StateListenerIF

public class StateResultMonitor
extends ResultMonitor
implements StateListenerIF

A ResultMonitor specifically for State

Since:
Proxool 0.8
Version:
$Revision: 1.3 $, $Date: 2003/03/04 10:24:40 $
Author:
bill, $Author: billhorsman $ (current maintainer)

Field Summary
private  int expectedUpState
           
private static Log LOG
           
private  int upState
           
 
Fields inherited from class org.logicalcobwebs.proxool.ResultMonitor
SUCCESS, TIMEOUT, WAITING
 
Fields inherited from interface org.logicalcobwebs.proxool.StateListenerIF
STATE_BUSY, STATE_DOWN, STATE_OVERLOADED, STATE_QUIET
 
Constructor Summary
StateResultMonitor()
           
 
Method Summary
 boolean check()
          waits for statistics
 void setExpectedUpState(int expectedUpState)
           
 void upStateChanged(int upState)
           
 
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

LOG

private static final Log LOG

upState

private int upState

expectedUpState

private int expectedUpState
Constructor Detail

StateResultMonitor

public StateResultMonitor()
Method Detail

check

public boolean check()
              throws java.lang.Exception
waits for statistics

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

upStateChanged

public void upStateChanged(int upState)
Specified by:
upStateChanged in interface StateListenerIF

setExpectedUpState

public void setExpectedUpState(int expectedUpState)