Package org.apache.bookkeeper.proto

Examples of org.apache.bookkeeper.proto.NIOServerFactory$Cnxn


    @Test
    public void testProblemProcessor() throws Exception {
        ServerConfiguration conf = new ServerConfiguration();
        conf.setBookiePort(22334);
        NIOServerFactory factory = new NIOServerFactory(conf, problemProcessor);
        Socket s = new Socket("127.0.0.1", 22334);
        s.setSoTimeout(5000);
        try {
            s.getOutputStream().write("\0\0\0\4\0\0\0\1".getBytes());
            s.getOutputStream().write("\0\0\0\4\0\0\0\2".getBytes());
            s.getInputStream().read();
        } finally {
            s.close();
            factory.shutdown();
        }
    }
View Full Code Here


    public void testProblemProcessor() throws Exception {
        ServerConfiguration conf = new ServerConfiguration();
        conf.setAllowLoopback(true);
        int port = PortManager.nextFreePort();
        conf.setBookiePort(port);
        NIOServerFactory factory = new NIOServerFactory(conf, problemProcessor);
        factory.start();
        Socket s = new Socket("127.0.0.1", port);
        s.setSoTimeout(5000);
        try {
            s.getOutputStream().write("\0\0\0\4\0\0\0\1".getBytes());
            s.getOutputStream().write("\0\0\0\4\0\0\0\2".getBytes());
            s.getInputStream().read();
        } finally {
            s.close();
            factory.shutdown();
        }
    }
View Full Code Here

        }
       
    };
    @Test
    public void testProblemProcessor() throws Exception {
        NIOServerFactory factory = new NIOServerFactory(22334, problemProcessor);
        Socket s = new Socket("127.0.0.1", 22334);
        s.setSoTimeout(5000);
        try {
            s.getOutputStream().write("\0\0\0\4\0\0\0\1".getBytes());
            s.getOutputStream().write("\0\0\0\4\0\0\0\2".getBytes());
            s.getInputStream().read();
        } finally {
            s.close();
            factory.shutdown();
        }
    }
View Full Code Here

    };

    @Test
    public void testProblemProcessor() throws Exception {
        NIOServerFactory factory = new NIOServerFactory(22334, problemProcessor);
        Socket s = new Socket("127.0.0.1", 22334);
        s.setSoTimeout(5000);
        try {
            s.getOutputStream().write("\0\0\0\4\0\0\0\1".getBytes());
            s.getOutputStream().write("\0\0\0\4\0\0\0\2".getBytes());
            s.getInputStream().read();
        } finally {
            s.close();
            factory.shutdown();
        }
    }
View Full Code Here

    @Test
    public void testProblemProcessor() throws Exception {
        ServerConfiguration conf = new ServerConfiguration();
        conf.setBookiePort(22334);
        NIOServerFactory factory = new NIOServerFactory(conf, problemProcessor);
        factory.start();
        Socket s = new Socket("127.0.0.1", 22334);
        s.setSoTimeout(5000);
        try {
            s.getOutputStream().write("\0\0\0\4\0\0\0\1".getBytes());
            s.getOutputStream().write("\0\0\0\4\0\0\0\2".getBytes());
            s.getInputStream().read();
        } finally {
            s.close();
            factory.shutdown();
        }
    }
View Full Code Here

    @Test(timeout=60000)
    public void testProblemProcessor() throws Exception {
        ServerConfiguration conf = new ServerConfiguration();
        int port = PortManager.nextFreePort();
        conf.setBookiePort(port);
        NIOServerFactory factory = new NIOServerFactory(conf, problemProcessor);
        factory.start();
        Socket s = new Socket("127.0.0.1", port);
        s.setSoTimeout(5000);
        try {
            s.getOutputStream().write("\0\0\0\4\0\0\0\1".getBytes());
            s.getOutputStream().write("\0\0\0\4\0\0\0\2".getBytes());
            s.getInputStream().read();
        } finally {
            s.close();
            factory.shutdown();
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.bookkeeper.proto.NIOServerFactory$Cnxn

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.