Package org.apache.qpid.framing

Examples of org.apache.qpid.framing.AMQFrame.writePayload()


    {
        AMQFrame deliverFrame = BasicDeliverBody.createAMQFrame(channel.getChannelId(), consumerTag,
                                                                deliveryTag, false, exchange,
                                                                routingKey);
        ByteBuffer buf = ByteBuffer.allocate((int) deliverFrame.getSize()); // XXX: Could cast be a problem?
        deliverFrame.writePayload(buf);
        buf.flip();
        return buf;
    }
}
View Full Code Here


        random.nextBytes(payload);
        final AMQBody body = new ContentBody(payload);
        AMQFrame frame = new AMQFrame(1, body);
        byte[] outputBuf = new byte[4096];
        BytesDataOutput dataOutput = new BytesDataOutput(outputBuf);
        frame.writePayload(dataOutput);
        for(int i = 0 ; i < dataOutput.length(); i++)
        {
            _decoder.decodeBuffer(ByteBuffer.wrap(outputBuf, i, 1));

        }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.