Package org.weakref.jmx

Examples of org.weakref.jmx.SimpleObject


            protected void configure()
            {
                binder().requireExplicitBindings();
                binder().disableCircularProxies();

                bind(SimpleObject.class).annotatedWith(named("hello")).toInstance(new SimpleObject());
                bind(MBeanServer.class).toInstance(ManagementFactory.getPlatformMBeanServer());
                ExportBinder.newExporter(binder()).export(SimpleObject.class).annotatedWith(named("hello")).withGeneratedName();
            }
        });
View Full Code Here


            protected void configure()
            {
                binder().requireExplicitBindings();
                binder().disableCircularProxies();

                bind(SimpleObject.class).annotatedWith(TestAnnotation.class).toInstance(new SimpleObject());
                bind(MBeanServer.class).toInstance(ManagementFactory.getPlatformMBeanServer());
                ExportBinder.newExporter(binder()).export(SimpleObject.class).annotatedWith(TestAnnotation.class).as(objectName.getCanonicalName());
            }
        });
View Full Code Here

            protected void configure()
            {
                binder().requireExplicitBindings();
                binder().disableCircularProxies();

                bind(SimpleObject.class).annotatedWith(Names.named("1")).toInstance(new SimpleObject());
                bind(SimpleObject.class).annotatedWith(Names.named("2")).toInstance(new SimpleObject());
                bind(MBeanServer.class).toInstance(ManagementFactory.getPlatformMBeanServer());

                ExportBinder exporter = ExportBinder.newExporter(binder());
                exporter.export(SimpleObject.class).annotatedWith(Names.named("1")).as(objectName1.getCanonicalName());
                exporter.export(SimpleObject.class).annotatedWith(Names.named("2")).as(objectName2.getCanonicalName());
View Full Code Here

            {
                binder().requireExplicitBindings();
                binder().disableCircularProxies();

                bind(MBeanServer.class).toInstance(ManagementFactory.getPlatformMBeanServer());
                bind(SimpleObject.class).toInstance(new SimpleObject());
                bind(SimpleObject.class).annotatedWith(Names.named("1")).toInstance(new SimpleObject());

                ExportBinder exporter = ExportBinder.newExporter(binder());
                exporter.export(Key.get(SimpleObject.class))
                        .as(objectName1.getCanonicalName());
                exporter.export(Key.get(SimpleObject.class, named("1")))
View Full Code Here

                binder().requireExplicitBindings();
                binder().disableCircularProxies();

                Multibinder<SimpleObject> multibinder = Multibinder.newSetBinder(binder(), SimpleObject.class);

                SimpleObject object1 = new SimpleObject();
                object1.setStringValue("blue");
                multibinder.addBinding().toInstance(object1);

                SimpleObject object2 = new SimpleObject();
                object2.setStringValue("red");
                multibinder.addBinding().toInstance(object2);

                bind(MBeanServer.class).toInstance(ManagementFactory.getPlatformMBeanServer());
                ExportBinder.newExporter(binder()).exportSet(SimpleObject.class).withGeneratedName(new NamingFunction<SimpleObject>()
                {
View Full Code Here

TOP

Related Classes of org.weakref.jmx.SimpleObject

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.