diff --git a/jetty-jmx/src/main/java/org/eclipse/jetty/jmx/MBeanContainer.java b/jetty-jmx/src/main/java/org/eclipse/jetty/jmx/MBeanContainer.java index df899623292..2c48aea4b83 100644 --- a/jetty-jmx/src/main/java/org/eclipse/jetty/jmx/MBeanContainer.java +++ b/jetty-jmx/src/main/java/org/eclipse/jetty/jmx/MBeanContainer.java @@ -30,6 +30,7 @@ import javax.management.MBeanRegistrationException; import javax.management.MBeanServer; import javax.management.ObjectName; +import org.eclipse.jetty.util.annotation.ManagedObject; import org.eclipse.jetty.util.component.Container; import org.eclipse.jetty.util.component.ContainerLifeCycle; import org.eclipse.jetty.util.component.Destroyable; @@ -40,6 +41,7 @@ import org.eclipse.jetty.util.log.Logger; /** * Container class for the MBean instances */ +@ManagedObject("The component that registers beans as MBeans") public class MBeanContainer implements Container.InheritedListener, Dumpable, Destroyable { private final static Logger LOG = Log.getLogger(MBeanContainer.class.getName()); diff --git a/jetty-util/src/main/java/org/eclipse/jetty/util/component/Destroyable.java b/jetty-util/src/main/java/org/eclipse/jetty/util/component/Destroyable.java index 8a7730f2f67..262411a183d 100644 --- a/jetty-util/src/main/java/org/eclipse/jetty/util/component/Destroyable.java +++ b/jetty-util/src/main/java/org/eclipse/jetty/util/component/Destroyable.java @@ -18,6 +18,8 @@ package org.eclipse.jetty.util.component; +import org.eclipse.jetty.util.annotation.ManagedObject; +import org.eclipse.jetty.util.annotation.ManagedOperation; /** *
A Destroyable is an object which can be destroyed.
@@ -25,7 +27,9 @@ package org.eclipse.jetty.util.component; * resources over multiple start/stop cycles. A call to destroy will release all * resources and will prevent any further start/stop cycles from being successful. */ +@ManagedObject public interface Destroyable { + @ManagedOperation(value = "Destroys this component", impact = "ACTION") void destroy(); }