Package org.apache.tapestry.ioc.services

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


{

    @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

     * 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

{

    @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

     * 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

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

        if (_shutdownListenerSet)
        {
            shutdownHub.addRegistryShutdownListener(new RegistryShutdownListener()
            {
                public void registryDidShutdown()
                {
                    FileCleaner.exitWhenFinished();
                }
View Full Code Here

{

    @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

     * 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

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

        if (_needToAddShutdownListener.getAndSet(false))
        {
            shutdownHub.addRegistryShutdownListener(new RegistryShutdownListener()
            {
                public void registryDidShutdown()
                {
                    FileCleaner.exitWhenFinished();
                }
View Full Code Here

        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

TOP

Related Classes of org.apache.tapestry.ioc.services.RegistryShutdownListener

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.