Search in sources :

Example 1 with FastPipedOutputStream

use of hudson.remoting.FastPipedOutputStream in project hudson-2.x by hudson.

the class ChannelTestCase method setUp.

@Override
protected void setUp() throws Exception {
    super.setUp();
    final FastPipedInputStream p1i = new FastPipedInputStream();
    final FastPipedInputStream p2i = new FastPipedInputStream();
    final FastPipedOutputStream p1o = new FastPipedOutputStream(p1i);
    final FastPipedOutputStream p2o = new FastPipedOutputStream(p2i);
    Future<Channel> f1 = executors.submit(new Callable<Channel>() {

        public Channel call() throws Exception {
            return new Channel("This side of the channel", executors, p1i, p2o);
        }
    });
    Future<Channel> f2 = executors.submit(new Callable<Channel>() {

        public Channel call() throws Exception {
            return new Channel("The other side of the channel", executors, p2i, p1o);
        }
    });
    french = f1.get();
    british = f2.get();
}
Also used : Channel(hudson.remoting.Channel) FastPipedOutputStream(hudson.remoting.FastPipedOutputStream) IOException(java.io.IOException) FastPipedInputStream(hudson.remoting.FastPipedInputStream)

Aggregations

Channel (hudson.remoting.Channel)1 FastPipedInputStream (hudson.remoting.FastPipedInputStream)1 FastPipedOutputStream (hudson.remoting.FastPipedOutputStream)1 IOException (java.io.IOException)1