switch monitor test to annotations as well
This commit is contained in:
parent
129fb06f1f
commit
e1daf7bcbd
|
@ -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++;
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
RequestCounter: Request counter
|
|
||||||
counter: current value of the counter
|
|
||||||
increment(): increment the counter
|
|
Loading…
Reference in New Issue