|
Java™ Platform Standard Ed. 7 DRAFT ea-b76 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | |||||||||
@Retention(value=RUNTIME) @Target(value=TYPE) @Inherited public @interface MBean
Indicates that the annotated class is a Standard MBean. A Standard MBean class can be defined as in this example:
@MBeanpublic class Configuration {@ManagedAttributepublic int getCacheSize() {...}@ManagedAttributepublic void setCacheSize(int size);@ManagedAttributepublic long getLastChangedTime();@ManagedOperationpublic void save(); }
The class must be public. Public methods within the class can be
annotated with @ManagedOperation to indicate that they are
MBean operations. Public getter and setter methods within the class
can be annotated with @ManagedAttribute to indicate that they define
MBean attributes.
If the MBean is to be an MXBean rather than a Standard MBean, then
the @MXBean annotation must be used instead of
@MBean.
|
Java™ Platform Standard Ed. 7 DRAFT ea-b76 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | |||||||||
Copyright 2009 Sun Microsystems, Inc. All Rights Reserved. Use is subject to license terms.