package dk.thoerup.circuitbreaker.jmx; import dk.thoerup.circuitbreaker.AccountingCircuitBreaker; public class JmxAccountingCircuitBreaker extends JmxCircuitBreaker implements JmxAccountingCircuitBreakerMBean { private AccountingCircuitBreaker cb; public JmxAccountingCircuitBreaker(AccountingCircuitBreaker cb) { super(cb); this.cb = cb; } //Accounting section public int getTripCount() { return cb.getTripCount(); } public int getBlockCount() { return cb.getBlockCount(); } public int getTotalFailureCount() { return cb.getTotalFailureCount(); } public long getLastTrip() { return cb.getLastTrip(); } public long getLastResetCounters() { return cb.getLastResetCounters(); } public int getTotalCallCount() { return cb.getTotalCallCount(); } public void resetCounters() { cb.resetCounters(); } }