From ab7d7bf50dc758e77952cfb6c8498528a6c0f3e6 Mon Sep 17 00:00:00 2001 From: Robert Godfrey Date: Thu, 12 Apr 2007 16:05:50 +0000 Subject: Unbreaking trunk due to erroneous commit git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@528000 13f79535-47bb-0310-9956-ffa450edef68 --- .../qpid/framing/amqp_8_0/AMQMethodBody_8_0.java | 160 --------------------- .../framing/amqp_8_0/AMQMethodFactory_8_0.java | 117 --------------- 2 files changed, 277 deletions(-) delete mode 100644 java/common/src/main/java/org/apache/qpid/framing/amqp_8_0/AMQMethodBody_8_0.java delete mode 100644 java/common/src/main/java/org/apache/qpid/framing/amqp_8_0/AMQMethodFactory_8_0.java (limited to 'java/common/src') diff --git a/java/common/src/main/java/org/apache/qpid/framing/amqp_8_0/AMQMethodBody_8_0.java b/java/common/src/main/java/org/apache/qpid/framing/amqp_8_0/AMQMethodBody_8_0.java deleted file mode 100644 index 63d0f0e407..0000000000 --- a/java/common/src/main/java/org/apache/qpid/framing/amqp_8_0/AMQMethodBody_8_0.java +++ /dev/null @@ -1,160 +0,0 @@ -package org.apache.qpid.framing.amqp_8_0; - -import org.apache.qpid.framing.EncodingUtils; -import org.apache.qpid.framing.AMQFrameDecodingException; -import org.apache.qpid.framing.AMQShortString; -import org.apache.qpid.framing.FieldTable; - -import org.apache.mina.common.ByteBuffer; - -public abstract class AMQMethodBody_8_0 extends org.apache.qpid.framing.AMQMethodBodyImpl -{ - - public byte getMajor() - { - return 8; - } - - public byte getMinor() - { - return 0; - } - - public int getSize() - { - return 2 + 2 + getBodySize(); - } - - public void writePayload(ByteBuffer buffer) - { - EncodingUtils.writeUnsignedShort(buffer, getClazz()); - EncodingUtils.writeUnsignedShort(buffer, getMethod()); - writeMethodPayload(buffer); - } - - - protected byte readByte(ByteBuffer buffer) - { - return buffer.get(); - } - - protected AMQShortString readAMQShortString(ByteBuffer buffer) - { - return EncodingUtils.readAMQShortString(buffer); - } - - protected int getSizeOf(AMQShortString string) - { - return EncodingUtils.encodedShortStringLength(string); - } - - protected void writeByte(ByteBuffer buffer, byte b) - { - buffer.put(b); - } - - protected void writeAMQShortString(ByteBuffer buffer, AMQShortString string) - { - EncodingUtils.writeShortStringBytes(buffer, string); - } - - protected int readInt(ByteBuffer buffer) - { - return buffer.getInt(); - } - - protected void writeInt(ByteBuffer buffer, int i) - { - buffer.putInt(i); - } - - protected FieldTable readFieldTable(ByteBuffer buffer) throws AMQFrameDecodingException - { - return EncodingUtils.readFieldTable(buffer); - } - - protected int getSizeOf(FieldTable table) - { - return EncodingUtils.encodedFieldTableLength(table); //To change body of created methods use File | Settings | File Templates. - } - - protected void writeFieldTable(ByteBuffer buffer, FieldTable table) - { - EncodingUtils.writeFieldTableBytes(buffer, table); - } - - protected long readLong(ByteBuffer buffer) - { - return buffer.getLong(); - } - - protected void writeLong(ByteBuffer buffer, long l) - { - buffer.putLong(l); - } - - protected int getSizeOf(byte[] response) - { - return response == null ? 4 : response.length + 4; //To change body of created methods use File | Settings | File Templates. - } - - protected void writeBytes(ByteBuffer buffer, byte[] data) - { - EncodingUtils.writeLongstr(buffer,data); - } - - protected byte[] readBytes(ByteBuffer buffer) - { - return EncodingUtils.readLongstr(buffer); - } - - protected short readShort(ByteBuffer buffer) - { - return EncodingUtils.readShort(buffer); - } - - protected void writeShort(ByteBuffer buffer, short s) - { - EncodingUtils.writeShort(buffer, s); - } - - protected short readUnsignedByte(ByteBuffer buffer) - { - return buffer.getUnsigned(); - } - - protected void writeUnsignedByte(ByteBuffer buffer, short unsignedByte) - { - EncodingUtils.writeUnsignedByte(buffer, unsignedByte); - } - - protected byte readBitfield(ByteBuffer buffer) - { - return readByte(buffer); - } - - protected int readUnsignedShort(ByteBuffer buffer) - { - return buffer.getUnsignedShort(); - } - - protected void writeBitfield(ByteBuffer buffer, byte bitfield0) - { - buffer.put(bitfield0); - } - - protected void writeUnsignedShort(ByteBuffer buffer, int s) - { - EncodingUtils.writeUnsignedShort(buffer, s); - } - - protected long readUnsignedInteger(ByteBuffer buffer) - { - return buffer.getUnsignedInt(); - } - protected void writeUnsignedInteger(ByteBuffer buffer, long i) - { - EncodingUtils.writeUnsignedInteger(buffer, i); - } - -} diff --git a/java/common/src/main/java/org/apache/qpid/framing/amqp_8_0/AMQMethodFactory_8_0.java b/java/common/src/main/java/org/apache/qpid/framing/amqp_8_0/AMQMethodFactory_8_0.java deleted file mode 100644 index 188ed07a70..0000000000 --- a/java/common/src/main/java/org/apache/qpid/framing/amqp_8_0/AMQMethodFactory_8_0.java +++ /dev/null @@ -1,117 +0,0 @@ -package org.apache.qpid.framing.amqp_8_0; - -import org.apache.qpid.framing.*; -import org.apache.qpid.protocol.AMQConstant; - -import org.apache.mina.common.ByteBuffer; - - -public class AMQMethodFactory_8_0 implements AMQMethodFactory -{ - private static final AMQShortString CLIENT_INITIATED_CONNECTION_CLOSE = - new AMQShortString("Client initiated connection close"); - - public ConnectionCloseBody createConnectionClose() - { - return new ConnectionCloseBodyImpl(AMQConstant.REPLY_SUCCESS.getCode(), - CLIENT_INITIATED_CONNECTION_CLOSE, - 0, - 0); - } - - public AccessRequestBody createAccessRequest(boolean active, boolean exclusive, boolean passive, boolean read, AMQShortString realm, boolean write) - { - return new AccessRequestBodyImpl(realm,exclusive,passive,active,write,read); - } - - public TxSelectBody createTxSelect() - { - return new TxSelectBodyImpl(); - } - - public TxCommitBody createTxCommit() - { - return new TxCommitBodyImpl(); - } - - public TxRollbackBody createTxRollback() - { - return new TxRollbackBodyImpl(); - } - - public ChannelOpenBody createChannelOpen() - { - return new ChannelOpenBodyImpl((AMQShortString)null); - } - - public ChannelCloseBody createChannelClose(int replyCode, AMQShortString replyText) - { - return new ChannelCloseBodyImpl(replyCode, replyText, 0, 0); - } - - public ExchangeDeclareBody createExchangeDeclare(AMQShortString name, AMQShortString type, int ticket) - { - return new ExchangeDeclareBodyImpl(ticket,name,type,false,false,false,false,false,null); - } - - public ExchangeBoundBody createExchangeBound(AMQShortString exchangeName, AMQShortString queueName, AMQShortString routingKey) - { - return new ExchangeBoundBodyImpl(exchangeName,routingKey,queueName); - } - - public QueueDeclareBody createQueueDeclare(AMQShortString name, FieldTable arguments, boolean autoDelete, boolean durable, boolean exclusive, boolean passive, int ticket) - { - return new QueueDeclareBodyImpl(ticket,name,passive,durable,exclusive,autoDelete,false,arguments); - } - - public QueueBindBody createQueueBind(AMQShortString queueName, AMQShortString exchangeName, AMQShortString routingKey, FieldTable arguments, int ticket) - { - return new QueueBindBodyImpl(ticket,queueName,exchangeName,routingKey,false,arguments); - } - - public QueueDeleteBody createQueueDelete(AMQShortString queueName, boolean ifEmpty, boolean ifUnused, int ticket) - { - return new QueueDeleteBodyImpl(ticket,queueName,ifUnused,ifEmpty,false); - } - - public ChannelFlowBody createChannelFlow(boolean active) - { - return new ChannelFlowBodyImpl(active); - } - - - // In different versions of the protocol we change the class used for message transfer - // abstract this out so the appropriate methods are created - public AMQMethodBody createRecover(boolean requeue) - { - return new BasicRecoverBodyImpl(requeue); - } - - public AMQMethodBody createConsumer(AMQShortString tag, AMQShortString queueName, FieldTable arguments, boolean noAck, boolean exclusive, boolean noLocal, int ticket) - { - return new BasicConsumeBodyImpl(ticket,queueName,tag,noLocal,noAck,exclusive,false,arguments); - } - - public AMQMethodBody createConsumerCancel(AMQShortString consumerTag) - { - return new BasicCancelBodyImpl(consumerTag, false); - } - - public AMQMethodBody createAcknowledge(long deliveryTag, boolean multiple) - { - return new BasicAckBodyImpl(deliveryTag,multiple); - } - - public AMQMethodBody createRejectBody(long deliveryTag, boolean requeue) - { - return new BasicRejectBodyImpl(deliveryTag, requeue); - } - - public AMQMethodBody createMessageQos(int prefetchCount, int prefetchSize) - { - return new BasicQosBodyImpl(prefetchSize, prefetchCount, false); - } - - - -} -- cgit v1.2.1