Package streamer

Examples of streamer.Pipeline


            e.printStackTrace(System.err);
        }
    }

    protected static void assemblePipeline(Element main) {
        Pipeline pipeline = new PipelineImpl("Client");
        pipeline.add(socket, main);
        pipeline.link("socket", main.getId(), "socket");

        pipeline.validate();
    }
View Full Code Here


        MockSource source = new MockSource("source", ByteBuffer.convertByteArraysToByteBuffers(new byte[] {1, 2, 3}));
        Element ntlmssp_negotiate = new ClientNtlmsspNegotiate("ntlmssp_negotiate", state);
        Element sink = new MockSink("sink", ByteBuffer.convertByteArraysToByteBuffers(packet));
        Element mainSink = new MockSink("mainSink", ByteBuffer.convertByteArraysToByteBuffers(new byte[] {1, 2, 3}));

        Pipeline pipeline = new PipelineImpl("test");
        pipeline.add(source, ntlmssp_negotiate, sink, mainSink);
        pipeline.link("source", "ntlmssp_negotiate", "mainSink");
        pipeline.link("ntlmssp_negotiate >" + OTOUT, "sink");
        pipeline.runMainLoop("source", STDOUT, false, false);
    }
View Full Code Here

        ByteBuffer clipboardAdapterPacket = new ByteBuffer(0);
        clipboardAdapterPacket.putMetadata(AwtClipboardAdapter.CLIPBOARD_CONTENT, "hello world");
        Element sink = new MockSink("sink", new ByteBuffer[] {clipboardAdapterPacket});

        Pipeline pipeline = new PipelineImpl("test");
        pipeline.add(source, router, format_data_response, sink);
        pipeline.link("source", "router >format_data_response", "format_data_response >clipboard", "sink");
        pipeline.runMainLoop("source", STDOUT, false, false);

    }
View Full Code Here

                0x04, 0x00, 0x00, 0x00, // CLIPRDR_HEADER::dataLen = 4 bytes
                0x0d, 0x00, 0x00, 0x00, // CLIPRDR_FORMAT_DATA_REQUEST::requestedFormatId
                // = 0x0d
        }));

        Pipeline pipeline = new PipelineImpl("test");
        pipeline.add(source, router, format_list, sink);
        pipeline.link("source", "router >format_list", "format_list", "sink");
        pipeline.runMainLoop("source", STDOUT, false, false);

        // Check state
        if (!(state.serverClipboardDataFormats.containsKey(49475) && state.serverClipboardDataFormats.containsKey("Rich Text Format")))
            throw new RuntimeException("Server format list packet parsed incorrectly.");
View Full Code Here

        Element router = new ServerClipRdrChannelRouter("router");
        ClipboardState state = new ClipboardState();
        Element monitor_ready = new ServerMonitorReadyPDU("monitor_ready", state);
        Element sink = new MockSink("sink", new ByteBuffer[] {});

        Pipeline pipeline = new PipelineImpl("test");
        pipeline.add(source, router, monitor_ready, sink);
        pipeline.link("source", "router >monitor_ready", "monitor_ready", "sink");
        pipeline.runMainLoop("source", STDOUT, false, false);

        // Check state
        if (!state.serverReady)
            throw new RuntimeException("Server monitor ready packet parsed incorrectly.");
View Full Code Here

        Element router = new ServerClipRdrChannelRouter("router");
        ClipboardState state = new ClipboardState();
        Element clip_cap = new ServerClipboardCapabilitiesPDU("clip_cap", state);
        Element sink = new MockSink("sink", new ByteBuffer[] {});

        Pipeline pipeline = new PipelineImpl("test");
        pipeline.add(source, router, clip_cap, sink);
        pipeline.link("source", "router >clipboard_capabilities", "clip_cap", "sink");
        pipeline.runMainLoop("source", STDOUT, false, false);

        // Check state
        if (!state.serverUseLongFormatNames || !state.serverStreamFileClipEnabled || !state.serverFileClipNoFilePaths || state.serverCanLockClipdata)
            throw new RuntimeException("Server clipboard capabilities packet parsed incorrectly.");
View Full Code Here

        NtlmState state = new NtlmState();
        Element ntlmssp_challenge = new ServerNtlmsspChallenge("ntlmssp_challenge", state);
        Element sink = new MockSink("sink", ByteBuffer.convertByteArraysToByteBuffers());
        Element mainSink = new MockSink("mainSink", ByteBuffer.convertByteArraysToByteBuffers(new byte[] {1, 2, 3}));

        Pipeline pipeline = new PipelineImpl("test");
        pipeline.add(source, ntlmssp_challenge, sink, mainSink);
        pipeline.link("source", "ntlmssp_challenge", "mainSink");
        pipeline.link("ntlmssp_challenge >" + OTOUT, "sink");
        pipeline.runMainLoop("source", STDOUT, false, false);

        // Check state challenge
        byte[] challenge = new byte[] {0x52, (byte)0xbe, (byte)0x83, (byte)0xd1, (byte)0xf8, (byte)0x80, 0x16, 0x6a};
        if (state.serverChallenge == null)
            throw new RuntimeException("Challenge was not extracted from server NTLMSSP Challenge packet.");
View Full Code Here

        Element desktopSizeChangeSink = new MockSink("desktop_size", emptyBuf);
        Element pixelsSink = new MockSink("pixels",
                ByteBuffer.convertByteArraysToByteBuffers(new byte[] {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,}));
        Element copyRectSink = new MockSink("copy_rect", emptyBuf);

        Pipeline pipeline = new PipelineImpl("test");
        pipeline.addAndLink(source, handler);
        pipeline.add(fburSink, bellSink, clipboardSink, desktopSizeChangeSink, pixelsSink, copyRectSink);

        pipeline.link("handler >" + FRAME_BUFFER_UPDATE_REQUEST_ADAPTER_PAD, "fbur");
        pipeline.link("handler >" + SERVER_BELL_ADAPTER_PAD, "bell");
        pipeline.link("handler >" + SERVER_CLIPBOARD_ADAPTER_PAD, "clipboard");
        pipeline.link("handler >" + PIXEL_ADAPTER_PAD, "pixels");

        pipeline.runMainLoop("source", STDOUT, false, false);

    }
View Full Code Here

        };
        ByteBuffer[] emptyBuf = ByteBuffer.convertByteArraysToByteBuffers(new byte[] {});
        Element encodingsSink = new MockSink("encodings", emptyBuf);
        Element pixelFormatSink = new MockSink("pixel_format", emptyBuf);

        Pipeline pipeline = new PipelineImpl("test");
        pipeline.addAndLink(source, init, mainSink);
        pipeline.add(encodingsSink, pixelFormatSink, initSink);
        pipeline.link("init >otout", "initSink");
        pipeline.link("init >" + CLIENT_SUPPORTED_ENCODINGS_ADAPTER_PAD, "encodings");
        pipeline.link("init >" + CLIENT_PIXEL_FORMAT_ADAPTER_PAD, "pixel_format");

        pipeline.runMainLoop("source", STDOUT, false, false);

        if (!screen.isRGB888_32_LE())
            System.err.println("Screen description was read incorrectly: " + screen + ".");
        if (!desktopName.equals(screen.getDesktopName()))
            System.err.println("Screen desktop name was read incorrectly: \"" + screen.getDesktopName() + "\".");
View Full Code Here

        buf.putMetadata(WIDTH, 3);
        buf.putMetadata(HEIGHT, 4);

        Element source = new MockSource("source", new ByteBuffer[] {buf});

        Pipeline pipeline = new PipelineImpl("test");

        pipeline.addAndLink(source, adapter, sink);
        pipeline.runMainLoop("source", STDOUT, false, false);

    }
View Full Code Here

TOP

Related Classes of streamer.Pipeline

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.