Example usage for com.rabbitmq.client.impl Frame getPayload

List of usage examples for com.rabbitmq.client.impl Frame getPayload

Introduction

In this page you can find the example usage for com.rabbitmq.client.impl Frame getPayload.

Prototype

public byte[] getPayload() 

Source Link

Document

Public API - retrieves the frame payload

Usage

From source file:de.htwk_leipzig.bis.connection.handshake.clientRewrite.CommandAssembler.java

License:Mozilla Public License

private void consumeBodyFrame(Frame f) {
    if (f.type == AMQP.FRAME_BODY) {
        byte[] fragment = f.getPayload();
        this.remainingBodyBytes -= fragment.length;
        updateContentBodyState();/*ww w.j ava 2s .  com*/
        if (this.remainingBodyBytes < 0) {
            throw new UnsupportedOperationException("%%%%%% FIXME unimplemented");
        }
        appendBodyFragment(fragment);
    } else {
        throw new UnexpectedFrameError(f, AMQP.FRAME_BODY);
    }
}