switch monitor test to annotations as well

This commit is contained in:
Jesse McConnell 2012-08-15 14:20:15 -05:00
parent 129fb06f1f
commit e1daf7bcbd
2 changed files with 6 additions and 3 deletions

View File

@ -13,16 +13,22 @@
package org.eclipse.jetty.monitor; package org.eclipse.jetty.monitor;
import org.eclipse.jetty.util.annotation.ManagedAttribute;
import org.eclipse.jetty.util.annotation.ManagedObject;
import org.eclipse.jetty.util.annotation.ManagedOperation;
@ManagedObject("Request Counter")
public class RequestCounter public class RequestCounter
{ {
public long _counter; public long _counter;
@ManagedAttribute("current value of the counter")
public synchronized long getCounter() public synchronized long getCounter()
{ {
return _counter; return _counter;
} }
@ManagedOperation("increment the counter")
public synchronized void increment() public synchronized void increment()
{ {
_counter++; _counter++;

View File

@ -1,3 +0,0 @@
RequestCounter: Request counter
counter: current value of the counter
increment(): increment the counter