1 6 package org.logicalcobwebs.proxool; 7 8 import org.apache.commons.logging.Log; 9 import org.apache.commons.logging.LogFactory; 10 11 19 public class StateResultMonitor extends ResultMonitor implements StateListenerIF { 20 21 private static final Log LOG = LogFactory.getLog(StateResultMonitor.class); 22 23 private int upState; 24 25 private int expectedUpState; 26 27 32 public boolean check() throws Exception { 33 return (upState == expectedUpState); 34 } 35 36 public void upStateChanged(int upState) { 37 this.upState = upState; 38 } 39 40 public void setExpectedUpState(int expectedUpState) { 41 this.expectedUpState = expectedUpState; 42 } 43 44 } 45 46 47 | Popular Tags |