Package org.apache.hivemind

Examples of org.apache.hivemind.Registry.shutdown()


        ObjectName objectName = objectNameBuilder.createObjectName(logger.getName(), "logger");

        ObjectInstance instance = mbeanServer.getObjectInstance(objectName);
        assertNotNull(instance);

        registry.shutdown();
    }
}
View Full Code Here


        verifyControls();

        assertTrue("start method has not been called", ((MBeanTestService) mBean1).isStartCalled());

        registry.shutdown();
    }

    /**
     * Tests the handling of a not compliant mbean
     */
 
View Full Code Here

        ObjectName objectName = objectNameBuilder.createObjectName(logger.getName(), "logger");

        ObjectInstance instance = mbeanServer.getObjectInstance(objectName);
        assertNotNull(instance);

        registry.shutdown();
    }
}
View Full Code Here

        List l = r.getConfiguration("hivemind.test.config.Simple");

        assertEquals(2, l.size());

        r.shutdown();

        try
        {
            l.size();
        }
View Full Code Here

        Registry registry = buildFrameworkRegistry("ShutdownListenerServices.xml");
        Simple simple = (Simple) registry.getService("hivemind.lib.test."
                + type + "Simple", Simple.class);
        final Counter counter = new Counter();
        simple.setCounter(counter);
        registry.shutdown();
        assertEquals(1, counter.getValue());
    }

    public void testPooledCalled() throws Exception
    {
View Full Code Here

    public static void main(String[] args)
    {
        Registry registry = RegistryBuilder.constructDefaultRegistry();

        registry.shutdown();
    }
}
View Full Code Here

        System.out.println("Add:      " + calculator.add(arg0, arg1));
        System.out.println("Subtract: " + calculator.subtract(arg0, arg1));
        System.out.println("Multiply: " + calculator.multiply(arg0, arg1));
        System.out.println("Divide:   " + calculator.divide(arg0, arg1));

        registry.shutdown();
    }
}
View Full Code Here

    {
        Registry registry = createRegistryWithSimpleService(serviceModel, manual);
        Simple simple = (Simple) registry.getService("hivemind.lib.test.Simple", Simple.class);
        final Counter counter = new Counter();
        simple.setCounter(counter);
        registry.shutdown();
        assertEquals(1, counter.getValue());
    }

    public void testPooledCalled() throws Exception
    {
View Full Code Here

        h.setValue("foo");

        assertLoggedMessage("Core implementation of service hivemind.test.services.StringHolder implements the RegistryCleanupListener interface, which is not supported by the threaded service model.");

        r.shutdown();

        assertEquals(false, _didShutdown);
    }

    /**
 
View Full Code Here

                "hivemind.test.services.Simple",
                SimpleService.class);

        assertEquals(11, s.add(4, 7));

        r.shutdown();

        try
        {
            s.add(9, 5);
            unreachable();
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.