javax.management.MBean Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jsr255 Show documentation
Show all versions of jsr255 Show documentation
JSR 255 - Java™ Management Extensions (JMX™) API Specification 2.0 EARLY DRAFT REVIEW (December 2007)
The newest version!
/*-
* $Id: 84f8a0b9842192276e9316ce2739c02c31a1977f $
*/
package javax.management;
import static java.lang.annotation.ElementType.TYPE;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
/**
*Indicates that the annotated class is a Standard MBean. A Standard
* MBean class can be defined as in this example:
*
* @MBean
* public class Configuration {
* {@link ManagedAttribute @ManagedAttribute}
* public int getCacheSize() {...}
* @ManagedAttribute
* public void setCacheSize(int size);
*
* @ManagedAttribute
* public long getLastChangedTime();
*
* {@link ManagedOperation @ManagedOperation}
* public 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 {@link MXBean @MXBean} annotation must be used instead of
* @MBean
.
*/
@Retention(value = RUNTIME)
@Target(value = TYPE)
@Inherited
public @interface MBean {
// empty
}