Author: arnaudsimon
Date: Wed Jun 27 07:08:50 2007
New Revision: 551167

URL: http://svn.apache.org/viewvc?view=rev&rev=551167
Log:
added public void declareAndBind(AMQDestination amqd)

Modified:
    
incubator/qpid/branches/M2/java/client/src/main/java/org/apache/qpid/client/AMQSession.java

Modified: 
incubator/qpid/branches/M2/java/client/src/main/java/org/apache/qpid/client/AMQSession.java
URL: 
http://svn.apache.org/viewvc/incubator/qpid/branches/M2/java/client/src/main/java/org/apache/qpid/client/AMQSession.java?view=diff&rev=551167&r1=551166&r2=551167
==============================================================================
--- 
incubator/qpid/branches/M2/java/client/src/main/java/org/apache/qpid/client/AMQSession.java
 (original)
+++ 
incubator/qpid/branches/M2/java/client/src/main/java/org/apache/qpid/client/AMQSession.java
 Wed Jun 27 07:08:50 2007
@@ -2307,6 +2307,16 @@
         }
     }
 
+    public void declareAndBind(AMQDestination amqd)
+            throws
+            AMQException
+    {
+        AMQProtocolHandler protocolHandler = getProtocolHandler();
+        declareExchange(amqd, protocolHandler, false);
+        AMQShortString queueName = declareQueue(amqd, protocolHandler);
+        bindQueue(queueName, amqd.getRoutingKey(), new FieldTable(), 
amqd.getExchangeName());
+    }
+
     /**
      * Callers must hold the failover mutex before calling this method.
      *


Reply via email to