Examples of RegistryShutdownListener


Examples of org.apache.hivemind.events.RegistryShutdownListener

                "getServiceImplementationForCurrentThread",
                servicePoint);

        Object intercepted = addInterceptors(proxy);

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

        servicePoint.addRegistryShutdownListener(outerProxy);

        return outerProxy;
View Full Code Here

Examples of org.apache.hivemind.events.RegistryShutdownListener

        if (service instanceof RegistryShutdownListener)
        {
            ShutdownCoordinator coordinator = ((ShutdownCoordinator) getServicePoint().getModule()
                    .getService(ShutdownCoordinator.class));

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

Examples of org.apache.hivemind.events.RegistryShutdownListener

                "getServiceImplementationForCurrentThread",
                servicePoint);

        Object intercepted = addInterceptors(proxy);

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

        servicePoint.addRegistryShutdownListener(outerProxy);

        return outerProxy;
View Full Code Here

Examples of org.apache.hivemind.events.RegistryShutdownListener

    public void testShutdownFailure() throws Exception
    {
        ShutdownCoordinator c = new ShutdownCoordinatorImpl();

        c.addRegistryShutdownListener(new RegistryShutdownListener()
        {
            public void registryDidShutdown()
            {
                throw new ApplicationRuntimeException("I'm just not in the mood.");
            }
View Full Code Here

Examples of org.apache.tapestry.ioc.services.RegistryShutdownListener

        String serviceId = resources.getServiceId();
        Class serviceInterface = resources.getServiceInterface();

        String toString = format("<Proxy for %s(%s)>", serviceId, serviceInterface.getName());

        RegistryShutdownListener proxy = createProxyInstance(
                creator,
                serviceId,
                serviceInterface,
                eagerLoad,
                toString);
View Full Code Here

Examples of org.apache.tapestry.ioc.services.RegistryShutdownListener

{

    @Test
    public void add_and_notify()
    {
        RegistryShutdownListener l1 = mockListener();
        RegistryShutdownListener l2 = mockListener();
        Log log = mockLog();

        l1.registryDidShutdown();
        l2.registryDidShutdown();

        replay();

        RegistryShutdownHubImpl hub = new RegistryShutdownHubImpl(log);
View Full Code Here

Examples of org.apache.tapestry.ioc.services.RegistryShutdownListener

     * others from being notified.
     */
    @Test
    public void notification_error()
    {
        RegistryShutdownListener l1 = mockListener();
        RegistryShutdownListener l2 = mockListener();
        RegistryShutdownListener l3 = mockListener();

        Log log = mockLog();

        Throwable t = new RuntimeException("Shutdown failure.");

        l1.registryDidShutdown();
        l2.registryDidShutdown();
        setThrowable(t);

        log.error(contains("Shutdown failure."), same(t));

        l3.registryDidShutdown();

        replay();

        RegistryShutdownHubImpl hub = new RegistryShutdownHubImpl(log);

View Full Code Here

Examples of org.apache.tapestry.ioc.services.RegistryShutdownListener

{

    @Test
    public void add_and_notify()
    {
        RegistryShutdownListener l1 = mockListener();
        RegistryShutdownListener l2 = mockListener();
        Logger logger = mockLogger();

        l1.registryDidShutdown();
        l2.registryDidShutdown();

        replay();

        RegistryShutdownHubImpl hub = new RegistryShutdownHubImpl(logger);
View Full Code Here

Examples of org.apache.tapestry.ioc.services.RegistryShutdownListener

     * others from being notified.
     */
    @Test
    public void notification_error()
    {
        RegistryShutdownListener l1 = mockListener();
        RegistryShutdownListener l2 = mockListener();
        RegistryShutdownListener l3 = mockListener();

        Logger logger = mockLogger();

        Throwable t = new RuntimeException("Shutdown failure.");

        l1.registryDidShutdown();
        l2.registryDidShutdown();
        setThrowable(t);

        logger.error(contains("Shutdown failure."), same(t));

        l3.registryDidShutdown();

        replay();

        RegistryShutdownHubImpl hub = new RegistryShutdownHubImpl(logger);

View Full Code Here

Examples of org.apache.tapestry.ioc.services.RegistryShutdownListener

        // be safe.
        threadCleanupHub.addThreadCleanupListener(multipartDecoder);

        if (_shutdownListenerSet)
        {
            shutdownHub.addRegistryShutdownListener(new RegistryShutdownListener()
            {
                public void registryDidShutdown()
                {
                    FileCleaner.exitWhenFinished();
                }
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.