Package org.apache.hivemind

Examples of org.apache.hivemind.ShutdownCoordinator


        Object intercepted = addInterceptors(proxy);

        RegistryShutdownListener outerProxy = ProxyUtils
                .createOuterProxy(intercepted, servicePoint);

        ShutdownCoordinator coordinator = servicePoint.getShutdownCoordinator();

        coordinator.addRegistryShutdownListener(outerProxy);

        return outerProxy;
    }
View Full Code Here


    public synchronized void shutdown()
    {
        checkShutdown();
        // Allow service implementations and such to shutdown.

        ShutdownCoordinator coordinatorService =
            (ShutdownCoordinator) getService("hivemind.ShutdownCoordinator",
                ShutdownCoordinator.class);

        coordinatorService.shutdown();

        _shutdown = true;

        // Shutdown infrastructure items, such as proxies.
View Full Code Here

        {
            public Object constructCoreServiceImplementation(ImplementationConstructionContext context)
            {
                Object result;
                if (manual) {
                    ShutdownCoordinator coordinator = (ShutdownCoordinator) context.getService(ShutdownCoordinator.class);
                    result = new SimpleImpl(coordinator);
                } else {
                    result = new SimpleImpl();
                }
                return result;
View Full Code Here

        ServiceSerializationHelper.setServiceSerializationSupport(null);

        // Allow service implementations and such to shutdown.

        ShutdownCoordinator coordinatorService = (ShutdownCoordinator) getService(
                "hivemind.ShutdownCoordinator",
                ShutdownCoordinator.class,
                null);

         coordinatorService.shutdown();

        // TODO: Should this be moved earlier?

        _shutdown = true;
View Full Code Here

        Registry r = f.getRegistry();

        assertNotNull(r);

        ShutdownCoordinator coordinator = (ShutdownCoordinator) r
                .getService(ShutdownCoordinator.class);

        ShutdownListenerFixture l = new ShutdownListenerFixture();

        coordinator.addRegistryShutdownListener(l);

        MockControl requestControl = newControl(HttpServletRequest.class);
        HttpServletRequest request = (HttpServletRequest) requestControl.getMock();
        HttpServletResponse response = (HttpServletResponse) newMock(HttpServletResponse.class);
        FilterChain chain = new RebuildRegistryChainFixture();
View Full Code Here

     */
    protected void registerWithShutdownCoordinator(Object service)
    {
        if (service instanceof RegistryShutdownListener)
        {
            ShutdownCoordinator coordinator = ((ShutdownCoordinator) getServicePoint().getModule()
                    .getService(ShutdownCoordinator.class));

            RegistryShutdownListener asListener = (RegistryShutdownListener) service;
            coordinator.addRegistryShutdownListener(asListener);
        }
    }
View Full Code Here

        Registry r = f.getRegistry();

        assertNotNull(r);

        ShutdownCoordinator coordinator = (ShutdownCoordinator) r
                .getService(ShutdownCoordinator.class);

        ShutdownListenerFixture l = new ShutdownListenerFixture();

        coordinator.addRegistryShutdownListener(l);

        MockControl requestControl = newControl(HttpServletRequest.class);
        HttpServletRequest request = (HttpServletRequest) requestControl.getMock();
        HttpServletResponse response = (HttpServletResponse) newMock(HttpServletResponse.class);
        FilterChain chain = new RebuildRegistryChainFixture();
View Full Code Here

        Object intercepted = addInterceptors(proxy);

        RegistryShutdownListener outerProxy = ProxyUtils
                .createOuterProxy(intercepted, servicePoint);

        ShutdownCoordinator coordinator = servicePoint.getShutdownCoordinator();

        coordinator.addRegistryShutdownListener(outerProxy);

        return outerProxy;
    }
View Full Code Here

        Object intercepted = addInterceptors(proxy);

        RegistryShutdownListener outerProxy = ProxyUtils
                .createOuterProxy(intercepted, servicePoint);

        ShutdownCoordinator coordinator = servicePoint.getShutdownCoordinator();

        coordinator.addRegistryShutdownListener(outerProxy);

        return outerProxy;
    }
View Full Code Here

        ServiceSerializationHelper.setServiceSerializationSupport(null);

        // Allow service implementations and such to shutdown.

        ShutdownCoordinator coordinatorService = (ShutdownCoordinator) getService(
                "hivemind.ShutdownCoordinator",
                ShutdownCoordinator.class,
                null);

        coordinatorService.shutdown();

        // TODO: Shoudl this be moved earlier?

        _shutdown = true;
View Full Code Here

TOP

Related Classes of org.apache.hivemind.ShutdownCoordinator

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.