Let's say we have some server that registers new users and greets them with some message. And we want to monitor this server and change some of it's parameters.
First, we need an interface with our monitoring and control methods
public interface UserCounterMBean {
long getSleepTime();
...