Package org.apache.geronimo.network.protocol

Examples of org.apache.geronimo.network.protocol.ServerSocketAcceptor


        nodeInfo = aNodeInfo;
        ioContext = anIOContext;
        selectorManager = aSelectorManager;
        clockPool = aClockPool;
       
        serverSocketAcceptor = new ServerSocketAcceptor();
        serverSocketAcceptor.setSelectorManager(selectorManager);
    }
View Full Code Here


            pf.setMaxAge(Long.MAX_VALUE);
            pf.setMaxInactivity(1 * 60 * 60 * 1000);
            pf.setReclaimPeriod(10 * 1000);
            pf.setTemplate(templateStack);

            ssa = new ServerSocketAcceptor();
            ssa.setSelectorManager(sm);
            ssa.setTimeOut(5 * 1000);
            ssa.setUri(new URI("async://localhost:0/?tcp.nodelay=true&tcp.backlog=5#"));
            ssa.setAcceptorListener(pf);
            ssa.startup();
View Full Code Here

        pf.setMaxAge(Long.MAX_VALUE);
        pf.setMaxInactivity(1 * 60 * 60 * 1000);
        pf.setReclaimPeriod(10 * 1000);
        pf.setTemplate(templateStack);

        ServerSocketAcceptor ssa = new ServerSocketAcceptor();
        ssa.setSelectorManager(sm);
        ssa.setTimeOut(5 * 1000);
        ssa.setUri(new URI("async://localhost:0/?tcp.nodelay=true&tcp.backlog=5#"));
        ssa.setAcceptorListener(pf);
        ssa.startup();

        ControlClientProtocolStack clientStack = new ControlClientProtocolStack();
        clientStack.setClassLoader(Thread.currentThread().getContextClassLoader());
        clientStack.setThreadPool(tp);
        clientStack.setClockPool(cp);
        clientStack.setSelectorManager(sm);

        SocketProtocol sp = new SocketProtocol();
        sp.setTimeout(15 * 1000);
        sp.setInterface(new InetSocketAddress(ssa.getConnectURI().getHost(), 0));
        sp.setAddress(new InetSocketAddress(ssa.getConnectURI().getHost(), ssa.getConnectURI().getPort()));
        sp.setSelectorManager(sm);

        clientStack.push(sp);

        ControlClientProtocol ccp = new ControlClientProtocol();
        ccp.setTimeout(15 * 1000);

        clientStack.push(ccp);

        clientStack.setup();

        for (int i = 0; i < COUNT; i++) {
            clientStack.sendDown(getDatagramPacket());
        }

        if (!completed.attempt(60 * 1000)) {
            throw new IllegalStateException("TIMEOUT");
        }

        clientStack.drain();

        ssa.drain();

        pf.drain();

        sm.doStop();

View Full Code Here

        pf.setMaxAge(Long.MAX_VALUE);
        pf.setMaxInactivity(1 * 60 * 60 * 1000);
        pf.setReclaimPeriod(10 * 1000);
        pf.setTemplate(templateStack);

        ServerSocketAcceptor ssa = new ServerSocketAcceptor();
        ssa.setSelectorManager(sm);
        ssa.setTimeOut(5 * 1000);
        ssa.setUri(new URI("async://localhost:0/?tcp.nodelay=true&tcp.backlog=5#"));
        ssa.setAcceptorListener(pf);
        ssa.startup();

        ControlClientProtocolStack clientStack = new ControlClientProtocolStack();
        clientStack.setClassLoader(Thread.currentThread().getContextClassLoader());
        clientStack.setThreadPool(tp);
        clientStack.setClockPool(cp);
        clientStack.setSelectorManager(sm);

        SocketProtocol sp = new SocketProtocol();
        sp.setTimeout(15 * 1000);
        sp.setInterface(new InetSocketAddress(ssa.getConnectURI().getHost(), 0));
        sp.setAddress(new InetSocketAddress(ssa.getConnectURI().getHost(), ssa.getConnectURI().getPort()));
        sp.setSelectorManager(sm);

        clientStack.push(sp);

        ControlClientProtocol ccp = new ControlClientProtocol();
        ccp.setTimeout(15 * 1000);

        clientStack.push(ccp);

        clientStack.setup();

        clientStack.sendDown(getDatagramPacket());
        clientStack.sendDown(getDatagramPacket());
        clientStack.sendDown(getDatagramPacket());

        Thread.sleep(5 * 1000);

        clientStack.drain();

        Thread.sleep(5 * 1000);

        ssa.drain();

        pf.drain();

        sm.doStop();

View Full Code Here

            pf.setMaxAge(Long.MAX_VALUE);
            pf.setMaxInactivity(1 * 60 * 60 * 1000);
            pf.setReclaimPeriod(10 * 1000);
            pf.setTemplate(templateStack);

            ssa = new ServerSocketAcceptor();
            ssa.setSelectorManager(sm);
            ssa.setTimeOut(5 * 1000);
            ssa.setUri(new URI("async://localhost:0/?tcp.nodelay=true&tcp.backlog=5#"));
            ssa.setAcceptorListener(pf);
            ssa.startup();
View Full Code Here

        nodeInfo = aNodeInfo;
        ioContext = anIOContext;
        selectorManager = aSelectorManager;
        clockPool = aClockPool;
       
        serverSocketAcceptor = new ServerSocketAcceptor();
        serverSocketAcceptor.setSelectorManager(selectorManager);
    }
View Full Code Here

        pf.setReclaimPeriod(10 * 1000);
        pf.setTemplate(spt);
//        pf.setTemplate(templateStack);
        pf.setAcceptedCallBack(createAcceptedCallBack());

        ssa = new ServerSocketAcceptor();
        ssa.setSelectorManager(sm);
        ssa.setTimeOut(5 * 1000);
        ssa.setUri(bindAddr);
        ssa.setAcceptorListener(pf);
    }
View Full Code Here

        pf.setReclaimPeriod(10 * 1000);
        pf.setTemplate(spt);
//        pf.setTemplate(templateStack);
        pf.setAcceptedCallBack(createAcceptedCallBack());

        ssa = new ServerSocketAcceptor();
        ssa.setSelectorManager(sm);
        ssa.setTimeOut(5 * 1000);
        ssa.setUri(bindAddr);
        ssa.setAcceptorListener(pf);
    }
View Full Code Here

            pf.setMaxAge(Long.MAX_VALUE);
            pf.setMaxInactivity(1 * 60 * 60 * 1000);
            pf.setReclaimPeriod(10 * 1000);
            pf.setTemplate(templateStack);

            ssa = new ServerSocketAcceptor();
            ssa.setSelectorManager(sm);
            ssa.setTimeOut(5 * 1000);
            ssa.setUri(new URI("async://localhost:0/?tcp.nodelay=true&tcp.backlog=5#"));
            ssa.setAcceptorListener(pf);
            ssa.startup();
View Full Code Here

        pf.setMaxAge(Long.MAX_VALUE);
        pf.setMaxInactivity(1 * 60 * 60 * 1000);
        pf.setReclaimPeriod(10 * 1000);
        pf.setTemplate(templateStack);

        ServerSocketAcceptor ssa = new ServerSocketAcceptor();
        ssa.setSelectorManager(sm);
        ssa.setTimeOut(5 * 1000);
        ssa.setUri(new URI("async://localhost:0/?tcp.nodelay=true&tcp.backlog=5#"));
        ssa.setAcceptorListener(pf);
        ssa.startup();

        ControlClientProtocolStack clientStack = new ControlClientProtocolStack();
        clientStack.setClassLoader(Thread.currentThread().getContextClassLoader());
        clientStack.setThreadPool(tp);
        clientStack.setClockPool(cp);
        clientStack.setSelectorManager(sm);

        SocketProtocol sp = new SocketProtocol();
        sp.setTimeout(15 * 1000);
        sp.setInterface(new InetSocketAddress(ssa.getConnectURI().getHost(), 0));
        sp.setAddress(new InetSocketAddress(ssa.getConnectURI().getHost(), ssa.getConnectURI().getPort()));
        sp.setSelectorManager(sm);

        clientStack.push(sp);

        ControlClientProtocol ccp = new ControlClientProtocol();
        ccp.setTimeout(15 * 1000);

        clientStack.push(ccp);

        clientStack.setup();

        clientStack.sendDown(getDatagramPacket());
        clientStack.sendDown(getDatagramPacket());
        clientStack.sendDown(getDatagramPacket());

        Thread.sleep(5 * 1000);

        clientStack.drain();

        Thread.sleep(5 * 1000);

        ssa.drain();

        pf.drain();

        sm.doStop();

View Full Code Here

TOP

Related Classes of org.apache.geronimo.network.protocol.ServerSocketAcceptor

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.