Package org.apache.mina.transport.nio

Examples of org.apache.mina.transport.nio.SelectorLoopPool


        server.unbind();
    }

    @Test
    public void generateAllKindOfServerEventOneSelector() throws IOException, InterruptedException {
        SelectorLoopPool selectorLoopPool = new FixedSelectorLoopPool("Server", 1);
        final NioTcpServer server = new NioTcpServer(selectorLoopPool.getSelectorLoop(), selectorLoopPool, null);
        server.setFilters();
        server.setIoHandler(new Handler());
        server.bind(0);

        // warm up
View Full Code Here


     * correctly process the sessionOpened, messageReceived, messageSent and sessionClosed events. We use only one
     * selector to process all the OP events.
     */
    @Test
    public void generateAllKindOfServerEventOneSelector() throws IOException, InterruptedException {
        SelectorLoopPool selectorLoopPool = new FixedSelectorLoopPool("Server", 1);
        final NioTcpServer server = new NioTcpServer(selectorLoopPool.getSelectorLoop(), selectorLoopPool, null);
        server.setFilters(new MyCodec(), new Handler());
        server.bind(0);
        // warm up
        Thread.sleep(100);

View Full Code Here

TOP

Related Classes of org.apache.mina.transport.nio.SelectorLoopPool

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.