Package streamer.debug.MockServer

Examples of streamer.debug.MockServer.Packet


            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;
                    data = mockData;
                }
            }, new Packet("Client hello") {
                {
                    type = CLIENT;
                    data = mockData;
                }
            }, new Packet("Server hello") {
                {
                    type = SERVER;
                    data = mockData;
                }
            }, new Packet("Client hello") {
                {
                    type = CLIENT;
                    data = mockData;
                }
            }});
View Full Code Here


            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;
                    data = mockData;
                }
            }, new Packet("Client hello") {
                {
                    type = CLIENT;
                    data = mockData;
                }
            }, new Packet("Server hello") {
                {
                    type = SERVER;
                    data = mockData;
                }
            }, new Packet("Client hello") {
                {
                    type = CLIENT;
                    data = mockData;
                }
            }});
View Full Code Here

    public void testIsMockServerCanRespond() throws Exception {

        final byte[] mockClientData = new byte[] {0x01, 0x02, 0x03};
        final byte[] mockServerData = new byte[] {0x03, 0x02, 0x01};

        MockServer server = new MockServer(new Packet[] {new Packet("Client hello") {
            {
                type = CLIENT;
                data = mockClientData;
            }
        }, new Packet("Server hello") {
            {
                type = SERVER;
                data = mockServerData;
            }
        }});
View Full Code Here

        final byte[] mockServerData1 = new byte[] {0x03, 0x02, 0x01};

        final byte[] mockClientData2 = new byte[] {0x02, 0x04, 0x02, 0x03};
        final byte[] mockServerData2 = new byte[] {0x02, 0x02, 0x01, 0x04};

        MockServer server = new MockServer(new Packet[] {new Packet("Client hello") {
            {
                type = CLIENT;
                data = mockClientData1;
            }
        }, new Packet("Server hello") {
            {
                type = SERVER;
                data = mockServerData1;
            }
        }, new Packet("Upgrade connection to SSL") {
            {
                type = UPGRADE_TO_SSL;
            }
        }, new Packet("Client data over SSL") {
            {
                type = CLIENT;
                data = mockClientData2;
            }
        }, new Packet("Server data over SSL") {
            {
                type = SERVER;
                data = mockServerData2;
            }
        }});
View Full Code Here

    public void testIsMockServerCanRespond() throws Exception {

        final byte[] mockClientData = new byte[] {0x01, 0x02, 0x03};
        final byte[] mockServerData = new byte[] {0x03, 0x02, 0x01};

        MockServer server = new MockServer(new Packet[] {new Packet("Client hello") {
            {
                type = CLIENT;
                data = mockClientData;
            }
        }, new Packet("Server hello") {
            {
                type = SERVER;
                data = mockServerData;
            }
        }});
View Full Code Here

        final byte[] mockServerData1 = new byte[] {0x03, 0x02, 0x01};

        final byte[] mockClientData2 = new byte[] {0x02, 0x04, 0x02, 0x03};
        final byte[] mockServerData2 = new byte[] {0x02, 0x02, 0x01, 0x04};

        MockServer server = new MockServer(new Packet[] {new Packet("Client hello") {
            {
                type = CLIENT;
                data = mockClientData1;
            }
        }, new Packet("Server hello") {
            {
                type = SERVER;
                data = mockServerData1;
            }
        }, new Packet("Upgrade connection to SSL") {
            {
                type = UPGRADE_TO_SSL;
            }
        }, new Packet("Client data over SSL") {
            {
                type = CLIENT;
                data = mockClientData2;
            }
        }, new Packet("Server data over SSL") {
            {
                type = SERVER;
                data = mockServerData2;
            }
        }});
View Full Code Here

            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;
                    data = mockData;
                }
            }, new Packet("Client hello") {
                {
                    type = CLIENT;
                    data = mockData;
                }
            }, new Packet("Server hello") {
                {
                    type = SERVER;
                    data = mockData;
                }
            }, new Packet("Client hello") {
                {
                    type = CLIENT;
                    data = mockData;
                }
            }});
View Full Code Here

TOP

Related Classes of streamer.debug.MockServer.Packet

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.