summaryrefslogtreecommitdiff
path: root/qpid/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
commit7b7e0445a11bb3962b417a8c939565c9866fbd79 (patch)
treeaf0711b9b146abca2613452f5f2c8b2df3062d9e /qpid/java/client
parentf1bf17e6e58ea09aa21d5e7ed6a7cc5e4a54702e (diff)
downloadqpid-python-7b7e0445a11bb3962b417a8c939565c9866fbd79.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@509628 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java/client')
-rw-r--r--qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession.java35
1 files changed, 35 insertions, 0 deletions
diff --git a/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession.java b/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession.java
index b08a97bc84..c1e5c8b555 100644
--- a/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession.java
+++ b/qpid/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.
*