Package streamer

Examples of streamer.Pipeline


        MockSource source = new MockSource("source", ByteBuffer.convertByteArraysToByteBuffers(packet, new byte[] {1, 2, 3}));
        Element atachUserConfirm = new ServerMCSAttachUserConfirmPDU("attach_user_confirm", rdpState);
        Element sink = new MockSink("sink");
        Element mainSink = new MockSink("mainSink", ByteBuffer.convertByteArraysToByteBuffers(new byte[] {1, 2, 3}));

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

        if (rdpState.serverUserChannelId != 1004)
            System.err.println("Incorrect user channel ID. Expected value: 1004, actual value: " + rdpState.serverUserChannelId + ".");
    }
View Full Code Here


        Element x224 = new ClientX224DataPDU("x224");
        Element tpkt = new ClientTpkt("tpkt");
        Element sink = new MockSink("sink", ByteBuffer.convertByteArraysToByteBuffers(clientRequestPacket));
        Element mainSink = new MockSink("mainSink", ByteBuffer.convertByteArraysToByteBuffers(new byte[] {1, 2, 3}));

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

        Element x224 = new ClientX224DataPDU("x224");
        Element tpkt = new ClientTpkt("tpkt");
        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, todo, x224, tpkt, sink, mainSink);
        pipeline.link("source", "TODO", "mainSink");
        pipeline.link("TODO >" + OTOUT, "x224", "tpkt", "sink");
        pipeline.runMainLoop("source", STDOUT, false, false);
    }
View Full Code Here

        Element x224 = new ClientX224DataPDU("x224");
        Element tpkt = new ClientTpkt("tpkt");
        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, client_info, x224, tpkt, sink, mainSink);
        pipeline.link("source", "client_info", "mainSink");
        pipeline.link("client_info >" + OTOUT, "x224", "tpkt", "sink");
        pipeline.runMainLoop("source", STDOUT, false, false);
    }
View Full Code Here

        MockSource source = new MockSource("source", ByteBuffer.convertByteArraysToByteBuffers(new byte[] {1, 2, 3}));
        Element pcb = new ClientPreConnectionBlob("pcb", "39418F90-6D03-468E-B796-91C60DD6653A");
        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, pcb, sink, mainSink);
        pipeline.link("source", "pcb", "mainSink");
        pipeline.link("pcb >" + OTOUT, "sink");
        pipeline.runMainLoop("source", STDOUT, false, false);
    }
View Full Code Here

        try {
            System.setProperty("streamer.Link.debug", "true");
            System.setProperty("streamer.Element.debug", "true");
            System.setProperty("rdpclient.MockServer.debug", "true");

            Pipeline pipeline = new PipelineImpl("echo client");

            AprSocketWrapperImpl socketWrapper = new AprSocketWrapperImpl("socket", null);

            pipeline.add(socketWrapper);
            pipeline.add(new BaseElement("echo"));
            pipeline.add(new Queue("queue")); // To decouple input and output

            pipeline.link("socket", "echo", "queue", "socket");

            final byte[] mockData = new byte[] {0x01, 0x02, 0x03};
            MockServer server = new MockServer(new Packet[] {new Packet("Server hello") {
                {
                    type = SERVER;
View Full Code Here

            }
        };

        Element sink = new AwtBellAdapter("sink");

        Pipeline pipeline = new PipelineImpl("test");
        pipeline.addAndLink(source, sink);
        pipeline.runMainLoop("source", STDOUT, false, false);
    }
View Full Code Here

        Element ntlmssp_auth = new ClientNtlmsspPubKeyAuth("ntlmssp_auth", ntlmState, sslState, "192.168.0.101", "workgroup", "apollo3", "Administrator",
                "R2Preview!");
        Element sink = new MockSink("sink", ByteBuffer.convertByteArraysToByteBuffers(clientNegotiatePacket, clientAuthPacket), (Dumper)ntlmssp_auth);
        Element mainSink = new MockSink("mainSink", ByteBuffer.convertByteArraysToByteBuffers(new byte[] {1, 2, 3}));

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

    }
View Full Code Here

        // System.setProperty("streamer.Element.debug", "true");
        // System.setProperty("streamer.Pipeline.debug", "true");
        ByteBuffer packet = new ByteBuffer(new byte[] {0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x00, 0x10, 0x00,
                0x01, 0x04, 0x0a, 0x00, 0x0c, (byte)0x84, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00});

        Pipeline pipeline = new PipelineImpl("test");

        Element bitmap = new ServerBitmapUpdate("bitmap");

        BufferedImageCanvas canvas = new BufferedImageCanvas(1024, 768);
        Element adapter = new AwtCanvasAdapter("test", canvas, null) {
            {
                verbose = true;
            }
        };
        pipeline.addAndLink(bitmap, adapter);

        bitmap.handleData(packet, null);

    }
View Full Code Here

            _worker = new Thread(new Runnable() {
                @Override
                public void run() {
                    _socket = new AprSocketWrapperImpl("socket", sslState);
                    Pipeline pipeline = new PipelineImpl("Client");
                    pipeline.add(_socket, _client);
                    pipeline.link("socket", _client.getId(), "socket");
                    pipeline.validate();

                    InetSocketAddress address = new InetSocketAddress(host, port);
                    ConsoleProxy.ensureRoute(host);

                    try {
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.