Package streamer

Examples of streamer.Element


     * Example.
     */
    public static void main(String args[]) {
        System.setProperty("streamer.Element.debug", "true");

        Element source = new FakeSource("source") {
            {
                this.incommingBufLength = 0;
                this.delay = 1000;
                this.numBuffers = 3;
            }
        };

        Element sink = new AwtBellAdapter("sink");

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


       
    };
    /* @formatter:on */

        MockSource source = new MockSource("source", ByteBuffer.convertByteArraysToByteBuffers(new byte[] {1, 2, 3}));
        Element todo = new ClientMCSErectDomainRequest("TODO");
        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");
View Full Code Here

    /* @formatter:on */

        NtlmState state = new NtlmState();

        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");
View Full Code Here

        RdpState rdpState = new RdpState();
        ScreenDescription screenDescription = new ScreenDescription();

        MockSource source = new MockSource("source", ByteBuffer.convertByteArraysToByteBuffers(packet));
        Element demandActive = new ServerDemandActivePDU("demand_active", screenDescription, rdpState);
        Element sink = new FakeSink("sink");

        Pipeline pipeline = new PipelineImpl("test");
        pipeline.add(source, demandActive, sink);
        pipeline.link("source", "demand_active", "sink");
        pipeline.runMainLoop("source", STDOUT, false, false);
View Full Code Here

    /* @formatter:on */

        RdpState rdpState = new RdpState();
        rdpState.serverUserChannelId = 1004;
        MockSource source = new MockSource("source", ByteBuffer.convertByteArraysToByteBuffers(serverResponsePacket, new byte[] {1, 2, 3}));
        Element todo = new ClientMCSChannelJoinRequest_ServerMCSChannelConfirmPDUs("channels", new int[] {1007}, rdpState);
        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");
View Full Code Here

    };
    /* @formatter:on */

        MockSource source = new MockSource("source", ByteBuffer.convertByteArraysToByteBuffers(packet, new byte[] {1, 2, 3}));
        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");
View Full Code Here

        (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00,
    };
    /* @formatter:on */

        MockSource source = new MockSource("source", ByteBuffer.convertByteArraysToByteBuffers(new byte[] {1, 2, 3}));
        Element todo = new ClientMCSConnectInitial("ClientMCSConnectInitial");
        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", "ClientMCSConnectInitial", "mainSink");
        pipeline.link("ClientMCSConnectInitial >" + OTOUT, "x224", "tpkt", "sink");
View Full Code Here

                // Initiator: 1001+3 = 1004
                (byte)0x00, (byte)0x03,};

        RdpState rdpState = new RdpState();
        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");
View Full Code Here

        screenDescription.setFramebufferSize(1024, 768);

        rdpState.serverShareId = 0x000103ea;

        MockSource source = new MockSource("source", ByteBuffer.convertByteArraysToByteBuffers(new byte[] {}));
        Element confirm_active = new ClientConfirmActivePDU("confirm_active", screenDescription, rdpState);
        Element sink = new MockSink("sink", ByteBuffer.convertByteArraysToByteBuffers(packet));

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

                (byte)0x01, (byte)0x00, // Length if source descriptor: 1 (LE)
                (byte)0x00, // Source descriptor (should be set to 0): 0
        };

        MockSource source = new MockSource("source", ByteBuffer.convertByteArraysToByteBuffers(packet));
        Element mcs = new ServerMCSPDU("mcs") {
            {
                verbose = true;
            }
        };
        Element tpkt = new ServerTpkt("tpkt");
        Element x224 = new ServerX224DataPdu("x224");
        Element sink = new MockSink("sink", ByteBuffer.convertByteArraysToByteBuffers(new byte[] {
                // Deactivate all PDU
                (byte)0x0D, (byte)0x00, // Length: 13 bytes (LE)

                // - PDUType: 22 (0x16, LE)
                // Type: (............0110) TS_PDUTYPE_DEACTIVATEALLPDU
View Full Code Here

TOP

Related Classes of streamer.Element

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.