Package com.rabbitmq.client.impl

Examples of com.rabbitmq.client.impl.Frame


    public void testWrongClassInHeader() throws IOException {
        expectUnexpectedFrameError(new Confuser() {
            public Frame confuse(Frame frame) throws IOException {
                if (frame.type == AMQP.FRAME_HEADER) {
                    byte[] payload = frame.getPayload();
                    Frame confusedFrame = new Frame(AMQP.FRAME_HEADER,
                            frame.channel,
                            payload);
                    // First two bytes = class ID, must match class ID from
                    // method.
                    payload[0] = 12;
View Full Code Here


        @Override
        public void writeFrame(Frame frame) throws IOException {
            if (confusedOnce) {
                super.writeFrame(frame);
            } else {
                Frame confusedFrame = confuser.confuse(frame);
                if (confusedFrame != frame) confusedOnce = true;
                if (confusedFrame != null) {
                    super.writeFrame(confusedFrame);
                }
            }
View Full Code Here

        super.tearDown();
    }

    public void testNoMethod() throws Exception {
        List<Frame> frames = new ArrayList<Frame>();
        frames.add(new Frame(AMQP.FRAME_HEADER, 0));
        myFrameHandler.setFrames(frames.iterator());

        try {
            new AMQConnection(factory.params(Executors.newFixedThreadPool(1)), myFrameHandler).start();
        } catch (IOException e) {
View Full Code Here

                report(frame.channel, frame);
            }
        }

        private void doFrame() throws IOException {
            Frame frame = readFrame();

            if (frame != null) {
                if (this.silentMode) {
                    frame.writeTo(this.outStream);
                    return;
                }
                if (frame.type == AMQP.FRAME_HEARTBEAT) {
                    if (this.writeHeartBeats) {
                        frame.writeTo(this.outStream);
                        report(frame.channel, frame);
                    } else {
                        report(frame.channel, "(withheld) " + frame.toString());
                    }
                } else {
                    frame.writeTo(this.outStream);
                    if (this.noDecodeFrames) {
                        report(frame.channel, frame);
                    } else if (this.noAssembleFrames) {
                        reportFrame(frame);
                    } else {
View Full Code Here

TOP

Related Classes of com.rabbitmq.client.impl.Frame

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.