Package ch.unifr.nio.framework.mockups

Examples of ch.unifr.nio.framework.mockups.BlockingSocketChannel


        SteppingDispatcher steppingDispatcher = new SteppingDispatcher();
        steppingDispatcher.start();
        TestTarget testTarget = new TestTarget(12345);
        testTarget.start();
        SocketChannel channel = testTarget.getSocketChannel();
        BlockingSocketChannel blockingChannel =
                new BlockingSocketChannel(channel);
        blockingChannel.configureBlocking(false);
        TestChannelHandler testChannelHandler = new TestChannelHandler();
        steppingDispatcher.registerChannel(blockingChannel, testChannelHandler);

        logger.finest("close input from target");
        testTarget.shutdownOutput();
View Full Code Here


        CacheStopDispatcher cacheStopDispatcher = new CacheStopDispatcher();
        cacheStopDispatcher.start();
        TestTarget testTarget = new TestTarget(12345);
        testTarget.start();
        SocketChannel channel = testTarget.getSocketChannel();
        BlockingSocketChannel blockingChannel = new BlockingSocketChannel(channel);
        blockingChannel.configureBlocking(false);
        final TestChannelHandler testChannelHandler = new TestChannelHandler();
        cacheStopDispatcher.registerChannel(blockingChannel, testChannelHandler);

        // trigger selection by writing some bytes from testTarget
        testTarget.write(testString.getBytes());
View Full Code Here

        SteppingDispatcher steppingDispatcher = new SteppingDispatcher();
        steppingDispatcher.start();
        TestTarget testTarget = new TestTarget(12345);
        testTarget.start();
        SocketChannel channel = testTarget.getSocketChannel();
        BlockingSocketChannel blockingChannel =
                new BlockingSocketChannel(channel);
        blockingChannel.configureBlocking(false);
        TestChannelHandler testChannelHandler = new TestChannelHandler();
        steppingDispatcher.registerChannel(blockingChannel, testChannelHandler);

        // trigger selection by writing some bytes from testTarget
        testTarget.write(testString.getBytes());
View Full Code Here

TOP

Related Classes of ch.unifr.nio.framework.mockups.BlockingSocketChannel

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.