From c46d62e6834205408502d89d99f73e47f3ca2eb8 Mon Sep 17 00:00:00 2001 From: Robert Godfrey Date: Tue, 20 Feb 2007 16:20:41 +0000 Subject: QPID-325 : Persist durable exchange information in the store QPID-318 : Remove hardcoding of version numbers (as applies to store) git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@509628 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/qpid/client/AMQSession.java | 35 ++++++++++++++++++++++ 1 file changed, 35 insertions(+) (limited to 'java/client/src') diff --git a/java/client/src/main/java/org/apache/qpid/client/AMQSession.java b/java/client/src/main/java/org/apache/qpid/client/AMQSession.java index b08a97bc84..c1e5c8b555 100644 --- a/java/client/src/main/java/org/apache/qpid/client/AMQSession.java +++ b/java/client/src/main/java/org/apache/qpid/client/AMQSession.java @@ -1156,6 +1156,41 @@ public class AMQSession extends Closeable implements Session, QueueSession, Topi protocolHandler.syncWrite(exchangeDeclare, ExchangeDeclareOkBody.class); } + + public void createQueue(AMQShortString name, boolean autoDelete, boolean durable, boolean exclusive) throws AMQException + { + AMQFrame queueDeclare = QueueDeclareBody.createAMQFrame(_channelId, + getProtocolMajorVersion(), getProtocolMinorVersion(), // AMQP version (major, minor) + null, // arguments + autoDelete, // autoDelete + durable, // durable + exclusive, // exclusive + false, // nowait + false, // passive + name, // queue + getTicket()); // ticket + + getProtocolHandler().syncWrite(queueDeclare, QueueDeclareOkBody.class); + + } + + + public void bindQueue(AMQShortString queueName, AMQShortString routingKey, FieldTable arguments, AMQShortString exchangeName) throws AMQException + { + // TODO: Be aware of possible changes to parameter order as versions change. + AMQFrame queueBind = QueueBindBody.createAMQFrame(_channelId, + getProtocolMajorVersion(), getProtocolMinorVersion(), // AMQP version (major, minor) + arguments, // arguments + exchangeName, // exchange + false, // nowait + queueName, // queue + routingKey, // routingKey + getTicket()); // ticket + + + getProtocolHandler().syncWrite(queueBind, QueueBindOkBody.class); + } + /** * Declare the queue. * -- cgit v1.2.1