Examples of RegistryShutdownListener


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

                RegistryShutdownHub.class,
                _registryShutdownHub);

        _lifecycles.put("singleton", new SingletonServiceLifecycle());

        _registryShutdownHub.addRegistryShutdownListener(new RegistryShutdownListener()
        {
            public void registryDidShutdown()
            {
                scoreboardAndTracker.shutdown();
            }
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

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

{

    @Test
    public void add_and_notify()
    {
        RegistryShutdownListener l1 = newListener();
        RegistryShutdownListener l2 = newListener();
        Log log = newLog();

        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 = newListener();
        RegistryShutdownListener l2 = newListener();
        RegistryShutdownListener l3 = newListener();

        Log log = newLog();

        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

        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

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

        if (_needToAddShutdownListener.getAndSet(false))
        {
            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.