Package org.apache.mina.common

Examples of org.apache.mina.common.ExecutorThreadModel


    public Class getObjectType() {
        return ExecutorThreadModel.class;
    }

    public Object getObject() throws Exception {
        ExecutorThreadModel model = ExecutorThreadModel
                .getInstance(serviceName);
        if (executor != null) {
            model.setExecutor(executor);
        }
        return model;
    }
View Full Code Here


        return ExecutorThreadModel.class;
    }

    public Object getObject() throws Exception
    {
        ExecutorThreadModel model = ExecutorThreadModel.getInstance( serviceName );
        if( executor != null )
        {
            model.setExecutor( executor );
        }
        return model;
    }
View Full Code Here

        Executor executor = new ThreadPoolExecutor( 1, 10, 3600, TimeUnit.SECONDS, new SynchronousQueue() );
        ExecutorThreadModelFactoryBean factory = new  ExecutorThreadModelFactoryBean();
        factory.setServiceName( "foo" );
        factory.setExecutor( executor );
        factory.afterPropertiesSet();
        ExecutorThreadModel threadModel = ( ExecutorThreadModel ) factory.getObject();
        assertSame( executor, threadModel.getExecutor() );
    }
View Full Code Here

    public void testSuccessfulCreationWithoutExecutor() throws Exception
    {
        ExecutorThreadModelFactoryBean factory = new  ExecutorThreadModelFactoryBean();
        factory.setServiceName( "foo" );
        factory.afterPropertiesSet();
        ExecutorThreadModel threadModel = ( ExecutorThreadModel ) factory.getObject();
        assertTrue( threadModel.getExecutor() instanceof ThreadPoolExecutor );
    }
View Full Code Here

                TimeUnit.SECONDS, new SynchronousQueue());
        ExecutorThreadModelFactoryBean factory = new ExecutorThreadModelFactoryBean();
        factory.setServiceName("foo");
        factory.setExecutor(executor);
        factory.afterPropertiesSet();
        ExecutorThreadModel threadModel = (ExecutorThreadModel) factory
                .getObject();
        assertSame(executor, threadModel.getExecutor());
    }
View Full Code Here

    public void testSuccessfulCreationWithoutExecutor() throws Exception {
        ExecutorThreadModelFactoryBean factory = new ExecutorThreadModelFactoryBean();
        factory.setServiceName("foo");
        factory.afterPropertiesSet();
        ExecutorThreadModel threadModel = (ExecutorThreadModel) factory
                .getObject();
        assertTrue(threadModel.getExecutor() instanceof ThreadPoolExecutor);
    }
View Full Code Here

                TimeUnit.SECONDS, new SynchronousQueue<Runnable>());
        ExecutorThreadModelFactoryBean factory = new ExecutorThreadModelFactoryBean();
        factory.setServiceName("foo");
        factory.setExecutor(executor);
        factory.afterPropertiesSet();
        ExecutorThreadModel threadModel = (ExecutorThreadModel) factory
                .getObject();
        assertSame(executor, threadModel.getExecutor());
    }
View Full Code Here

    public void testSuccessfulCreationWithoutExecutor() throws Exception {
        ExecutorThreadModelFactoryBean factory = new ExecutorThreadModelFactoryBean();
        factory.setServiceName("foo");
        factory.afterPropertiesSet();
        ExecutorThreadModel threadModel = (ExecutorThreadModel) factory
                .getObject();
        assertTrue(threadModel.getExecutor() instanceof ThreadPoolExecutor);
    }
View Full Code Here

    public Class getObjectType() {
        return ExecutorThreadModel.class;
    }

    public Object getObject() throws Exception {
        ExecutorThreadModel model = ExecutorThreadModel
                .getInstance(serviceName);
        if (executor != null) {
            model.setExecutor(executor);
        }
        return model;
    }
View Full Code Here

TOP

Related Classes of org.apache.mina.common.ExecutorThreadModel

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.