Examples of LogHandler


Examples of org.jolokia.util.LogHandler

        replay(config, servletContext, bundleContext);

        servlet.init(config);
        assertNull(JolokiaServlet.getCurrentBundleContext());

        LogHandler handler = servlet.createLogHandler(config, true);
        handler.debug("Debug");
        handler.info("Info");
        handler.error("Error",new Exception());
        destroyServlet();
    }
View Full Code Here

Examples of org.jolokia.util.LogHandler

        MBeanServer mockServer = createMock(MBeanServer.class);
        expect(mockServer.queryNames(new ObjectName("amx:type=domain-root,*"),null)).andReturn(Collections.<ObjectName>emptySet()).anyTimes();
        ObjectName bootAmxName = new ObjectName("amx-support:type=boot-amx");
        expect(mockServer.isRegistered(bootAmxName)).andStubReturn(true);
        expect(mockServer.invoke(bootAmxName, "bootAMX", null, null)).andThrow(exp);
        LogHandler log = createMock(LogHandler.class);
        log.error(matches(regexp),isA(exp.getClass()));
        replay(mockServer,log);
        MBeanServerExecutor servers = getMBeanServerManager(mockServer);
        handle.postDetect(servers,new Configuration(),log);
        handle.preDispatch(servers,null);
        verify(mockServer);
View Full Code Here

Examples of org.jolokia.util.LogHandler

    // ===================================================================================================

    private void init() throws MalformedObjectNameException {
        TestDetector.reset();
        Configuration config = new Configuration(ConfigKey.MBEAN_QUALIFIER,"qualifier=test");
        handler = new MBeanServerHandler(config, new LogHandler() {
            public void debug(String message) {
            }

            public void info(String message) {
            }
View Full Code Here

Examples of org.jolokia.util.LogHandler

        assertNull(config);
    }

    @Test
    public void detectOptionsFail() {
        LogHandler handler = EasyMock.createMock(LogHandler.class);
        handler.error(matches("^.*parse options.*"),isA(Exception.class));
        replay(handler);

        Configuration opts = new Configuration(ConfigKey.DETECTOR_OPTIONS,"blub: bla");
        JSONObject config = serverHandle.getDetectorOptions(opts,handler);
        assertNull(config);
View Full Code Here

Examples of org.jolokia.util.LogHandler

    // ===================================================================================================


    private LogHandler getEmptyLogHandler() {
        return new LogHandler() {
            public void debug(String message) {
            }

            public void info(String message) {
            }
View Full Code Here

Examples of org.jolokia.util.LogHandler

    }

    // ======================================================================================================

    private LogHandler createDummyLogHandler() {
        return new LogHandler() {
                public void debug(String message) {
                }

                public void info(String message) {
                }
View Full Code Here

Examples of org.jolokia.util.LogHandler

public class Dispatcher {
  private final HttpRequestHandler handler;

  public Dispatcher() {
    final LogHandler h = new LogHandler() {
      public void debug(String message) {
      }

      public void info(String message) {
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.