@Override public void configureServlets() { bind (JolokiaConfig.class).toProvider(ConfigProvider.of(JolokiaConfig.class)); bind (HttpServlet.class).annotatedWith(JOLOKIA_SERVLET).toProvider(JolokiaServletProvider.class).in(Scopes.SINGLETON); serve("/jolokia/*").with(Key.get(HttpServlet.class, JOLOKIA_SERVLET)); configureRestrictor(); }
@Override protected void configure() { install (new InstrumentationModule()); install (new JolokiaModule()); install (new DatabaseMetricsModule()); install (new ArgumentFactoryModule()); install (new JerseyServletModule()); install (new NessJerseyServletModule(config, paths)); install (new NessJerseyExceptionMapperModule()); NessJerseyBinder.bindResourceFilterFactory(binder()).to(BodySizeLimitResourceFilterFactory.class); bind (NessJacksonJsonProvider.class); install (new SelftestModule()); install (new ServerInfoModule()); } }
/** * Override this method to implement access restrictions. */ protected void configureRestrictor() { bind(Restrictor.class).to(AllowAllRestrictor.class).in(Scopes.SINGLETON); }
@Override protected void configure() { binder().requireExplicitBindings(); binder().disableCircularProxies(); install(new JolokiaModule()); install(new JerseyServletModule()); install(new NessJerseyServletModule(config, paths)); install(new JmxStarterModule(config)); install(new InstrumentationModule()); install(new DatabaseMetricsModule()); install(new ArgumentFactoryModule()); install (new NessJerseyExceptionMapperModule()); install(new SelftestModule()); NessJerseyBinder.bindResourceFilterFactory(binder()).to(BodySizeLimitResourceFilterFactory.class); bind (NessJacksonJsonProvider.class); } }