/[projects]/miscJava/CircuitBreaker/src/main/java/dk/thoerup/circuitbreaker/web/ActionCommand.java
ViewVC logotype

Diff of /miscJava/CircuitBreaker/src/main/java/dk/thoerup/circuitbreaker/web/ActionCommand.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2568 by torben, Fri Mar 20 08:58:46 2015 UTC revision 2569 by torben, Tue Jun 9 08:55:10 2015 UTC
# Line 6  import java.net.URLEncoder; Line 6  import java.net.URLEncoder;
6  import javax.servlet.http.HttpServletRequest;  import javax.servlet.http.HttpServletRequest;
7  import javax.servlet.http.HttpServletResponse;  import javax.servlet.http.HttpServletResponse;
8    
 import dk.thoerup.circuitbreaker.AccountingCircuitBreaker;  
9  import dk.thoerup.circuitbreaker.CircuitBreaker;  import dk.thoerup.circuitbreaker.CircuitBreaker;
10  import dk.thoerup.circuitbreaker.CircuitBreakerManager;  import dk.thoerup.circuitbreaker.CircuitBreakerManager;
11  import dk.thoerup.circuitbreaker.LoggingCircuitBreaker;  import dk.thoerup.circuitbreaker.statistics.AccountingStatistics;
12    import dk.thoerup.circuitbreaker.statistics.LoggingStatistics;
13    
14  public class ActionCommand implements Command {  public class ActionCommand implements Command {
15                    
# Line 33  public class ActionCommand implements Co Line 33  public class ActionCommand implements Co
33                                  cb.tripBreaker();                                  cb.tripBreaker();
34                                                    
35                          if (action.equalsIgnoreCase("resetcounters")) {                          if (action.equalsIgnoreCase("resetcounters")) {
36                                  AccountingCircuitBreaker acb = (AccountingCircuitBreaker) cb;                                  AccountingStatistics stats = (AccountingStatistics) cb.getStatistics();
37                                  acb.resetCounters();                                  stats.resetCounters();
38                          }                          }
39    
40                          if (action.equalsIgnoreCase("clearlog") ) {                          if (action.equalsIgnoreCase("clearlog") ) {
41                                  LoggingCircuitBreaker lcb = (LoggingCircuitBreaker) cb;                                  LoggingStatistics stats = (LoggingStatistics) cb.getStatistics();
42                                  lcb.clearLog();                                  stats.clearLog();
43                          }                          }
44                  }                  }
45                                    

Legend:
Removed from v.2568  
changed lines
  Added in v.2569

  ViewVC Help
Powered by ViewVC 1.1.20