|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jsesoft.mmbi.samples.PureResource
public class PureResource
A JavaBean without any special JMX management support.
This resource demonstrates, that basic JMX management can be provided by MMBI without any effort by the resource's developer: simply by confirming to the JavaBeans conventions.
Field Summary |
---|
Fields inherited from interface org.jsesoft.mmbi.samples.ManagedResource |
---|
HIGH_WATER_MARK, LOW_WATER_MARK |
Constructor Summary | |
---|---|
PureResource()
An explicit constructor, better provide one. |
Method Summary | |
---|---|
void |
addChangeResourceEventListener(ChangeResourceEventListener listener)
Adds a resource listener. |
void |
decrementCount()
Decrements count by one. |
void |
fireChangeEvent()
Fires a resource change event. |
long |
getCount()
Reads count attribute. |
void |
incrementCount()
Increments count by one. |
void |
removeChangeResourceEventListener(ChangeResourceEventListener listener)
Removes a resource listener. |
void |
resetCount()
Resets count. |
void |
setCount(long count)
Writes count attribute. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PureResource()
Method Detail |
---|
public long getCount()
getCount
in interface ManagedResource
public void setCount(long count) throws java.lang.Exception
setCount
in interface ManagedResource
count
- the new value of the count attribute.
java.lang.Exception
- on failurepublic void incrementCount() throws java.lang.Exception
incrementCount
in interface ManagedResource
java.lang.Exception
- on failurepublic void decrementCount() throws java.lang.Exception
decrementCount
in interface ManagedResource
java.lang.Exception
- on failurepublic void resetCount() throws java.lang.Exception
resetCount
in interface ManagedResource
java.lang.Exception
- on failurepublic void addChangeResourceEventListener(ChangeResourceEventListener listener) throws java.util.TooManyListenersException
Note:
The JConsole disables operations with unserializable
parameters (such as ChangeResourceEventListener
) for
remote management.
listener
- the listener to add
java.util.TooManyListenersException
- on failurepublic void removeChangeResourceEventListener(ChangeResourceEventListener listener)
Note:
The JConsole disables operations with unserializable
parameters (such as ChangeResourceEventListener
) for
remote management.
listener
- the listener to removepublic void fireChangeEvent() throws java.lang.Exception
java.lang.Exception
- on failure
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |