Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Exporting JMX mbeans made easy
tag: 1.2.3

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
src
.gitignore
README.md
jmxutils.iml
jmxutils.ipr
pom.xml

README.md

Example

class ManagedObject
{
    @Managed
    public int getValue()
    {
       ...
    }

    @Managed
    public void setValue(int value)
    {
       ...
    }

    @Managed(description="do the operation")
    public void operation()
    {
       ...
    }
}

...
MBeanExporter exporter = new MBeanExporter(ManagementFactory.getPlatformMBeanServer());
exporter.export("test:name=X", new ManagedObject());

Guice support

Injector injector = Guice.createInjector(
            new MBeanModule() {
                @Override
                protected void configureMBeans()
                {
                    export(ManagedObject.class).as("test:name=X");
                    export(ManagedObject.class).annotatedWith(SomeAnnotation.class).as("test:name=Y");
                }
            }, ...);

License

Licensed under the Apache License, Version 2.0 (the "License") You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Something went wrong with that request. Please try again.