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

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

Introduction

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

Prototype

public DataInputStream getInputStream() 

Source Link

Document

Public API - retrieves a new DataInputStream streaming over the payload

Usage

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

License:Mozilla Public License

private void consumeMethodFrame(Frame f) throws IOException {
    if (f.type == AMQP.FRAME_METHOD) {
        this.method = AMQImpl.readMethodFrom(f.getInputStream());
        this.state = this.method.hasContent() ? CAState.EXPECTING_CONTENT_HEADER : CAState.COMPLETE;
    } else {//from w w  w .ja v a2 s. c om
        throw new UnexpectedFrameError(f, AMQP.FRAME_METHOD);
    }
}

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

License:Mozilla Public License

private void consumeHeaderFrame(Frame f) throws IOException {
    if (f.type == AMQP.FRAME_HEADER) {
        this.contentHeader = AMQImpl.readContentHeaderFrom(f.getInputStream());
        this.remainingBodyBytes = this.contentHeader.getBodySize();
        updateContentBodyState();//w ww .  j  a v  a2s. c o  m
    } else {
        throw new UnexpectedFrameError(f, AMQP.FRAME_HEADER);
    }
}