Package org.jboss.aerogear.io.netty.handler.codec.sockjs.protocol

Examples of org.jboss.aerogear.io.netty.handler.codec.sockjs.protocol.PreludeFrame


            final Frame frame = (Frame) msg;
            if (headerSent.compareAndSet(false, true)) {
                final HttpResponse response = createResponse(Transports.CONTENT_TYPE_JAVASCRIPT);
                ctx.writeAndFlush(response);

                final ByteBuf content = wrapWithLN(new PreludeFrame().content());
                final DefaultHttpContent preludeChunk = new DefaultHttpContent(content);
                ctx.writeAndFlush(preludeChunk);
            }

            ctx.writeAndFlush(new DefaultHttpContent(wrapWithLN(frame.content())), promise);
View Full Code Here


    public void copy() {
        assertCopy(new MessageFrame("testing copy"));
        assertCopy(new CloseFrame(100, "msg"));
        assertCopy(new HeartbeatFrame());
        assertCopy(new OpenFrame());
        assertCopy(new PreludeFrame());
    }
View Full Code Here

    public void duplicate() {
        assertDuplicate(new MessageFrame("testing duplicate"));
        assertDuplicate(new CloseFrame(101, "msg"));
        assertDuplicate(new HeartbeatFrame());
        assertDuplicate(new OpenFrame());
        assertDuplicate(new PreludeFrame());
    }
View Full Code Here

    public void retain() {
        assertRetain(new MessageFrame("testing retain"));
        assertRetain(new CloseFrame(102, "msg"));
        assertRetainImmutable(new HeartbeatFrame());
        assertRetainImmutable(new OpenFrame());
        assertRetainImmutable(new PreludeFrame());
    }
View Full Code Here

public class PreludeFrameTest {

    @Test
    public void content() {
        final PreludeFrame preludeFrame = new PreludeFrame();
        assertThat(preludeFrame.content().capacity(), is(PreludeFrame.CONTENT_SIZE));
        assertThat(getContent(preludeFrame), equalTo(expectedContent(PreludeFrame.CONTENT_SIZE)));
    }
View Full Code Here

            final Frame frame = (Frame) msg;
            if (headerSent.compareAndSet(false, true)) {
                final HttpResponse response = createResponse(Transports.CONTENT_TYPE_JAVASCRIPT);
                ctx.writeAndFlush(response);

                final ByteBuf content = wrapWithLN(new PreludeFrame().content());
                final DefaultHttpContent preludeChunk = new DefaultHttpContent(content);
                ctx.writeAndFlush(preludeChunk);
            }

            ctx.writeAndFlush(new DefaultHttpContent(wrapWithLN(frame.content())), promise);
View Full Code Here

TOP

Related Classes of org.jboss.aerogear.io.netty.handler.codec.sockjs.protocol.PreludeFrame

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.