summaryrefslogtreecommitdiff
path: root/java/client
diff options
context:
space:
mode:
authorRobert Godfrey <rgodfrey@apache.org>2007-02-20 16:20:41 +0000
committerRobert Godfrey <rgodfrey@apache.org>2007-02-20 16:20:41 +0000
commitc46d62e6834205408502d89d99f73e47f3ca2eb8 (patch)
treea0cbe2baaaae2d6eab79e0a4491c7299a9bfedc8 /java/client
parentbc6a142a055071e5b7025cd1022485f26a0011f2 (diff)
downloadqpid-python-c46d62e6834205408502d89d99f73e47f3ca2eb8.tar.gz
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
Diffstat (limited to 'java/client')
-rw-r--r--java/client/src/main/java/org/apache/qpid/client/AMQSession.java35
1 files changed, 35 insertions, 0 deletions
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.
*