Author: arnaudsimon
Date: Fri Jan 18 01:29:26 2008
New Revision: 613114

URL: http://svn.apache.org/viewvc?rev=613114&view=rev
Log:
Qpid 742

Added:
    
incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/jms/TopicSubscriber.java
      - copied, changed from r612820, 
incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQTopicSubscriber.java
Removed:
    
incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/log4j.xml
    
incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQTopicSubscriber.java
Modified:
    
incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/pubsub/Listener.java
    
incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/TopicSubscriberAdaptor.java
    
incubator/qpid/trunk/qpid/java/client/src/test/java/org/apache/qpid/testutil/QpidTestCase.java

Modified: 
incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/pubsub/Listener.java
URL: 
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/pubsub/Listener.java?rev=613114&r1=613113&r2=613114&view=diff
==============================================================================
--- 
incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/pubsub/Listener.java
 (original)
+++ 
incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/pubsub/Listener.java
 Fri Jan 18 01:29:26 2008
@@ -17,19 +17,18 @@
  */
 package org.apache.qpid.example.jmsexample.pubsub;
 
-import org.apache.qpid.client.AMQSession;
-import org.apache.qpid.client.BasicMessageConsumer;
-import org.apache.qpid.client.AMQDestination;
-import org.apache.qpid.client.AMQTopicSubscriber;
+import org.apache.qpid.jms.TopicSubscriber;
 
 import javax.jms.*;
+import javax.jms.Session;
+import javax.jms.Message;
 import javax.naming.Context;
 import javax.naming.InitialContext;
 import java.util.Properties;
 
 /**
- * The example creates a MessageConsumer on the specified
- * Topic and uses a MessageListener with this MessageConsumer
+ * The example creates a TopicSubscriber on the specified
+ * Topic and uses a MessageListener with this TopicSubscriber
  * in order to enable asynchronous delivery.
  */
 public class Listener
@@ -74,10 +73,10 @@
             ConnectionFactory conFac=(ConnectionFactory) 
ctx.lookup("qpidConnectionfactory");
             TopicConnection connection=(TopicConnection) 
conFac.createConnection();
 
-            // As this application is using a MessageConsumer we need to set 
an ExceptionListener on the connection
+            // As this application is using a TopicSubscriber we need to set 
an ExceptionListener on the connection
             // so that errors raised within the JMS client library can be 
reported to the application
             System.out.println(
-                    CLASS + ": Setting an ExceptionListener on the connection 
as sample uses a MessageConsumer");
+                    CLASS + ": Setting an ExceptionListener on the connection 
as sample uses a TopicSubscriber");
 
             connection.setExceptionListener(new ExceptionListener()
             {
@@ -99,11 +98,11 @@
             Topic topic=(Topic) ctx.lookup("usa");
             // Create a Message Subscriber
             System.out.println(CLASS + ": Creating a Message Subscriber for 
topic usa.#");
-            TopicSubscriber messageSubscriber=session.createSubscriber(topic);
+            javax.jms.TopicSubscriber 
messageSubscriber=session.createSubscriber(topic);
 
             // Bind each topic queue to the control queue so we know when to 
stop
             // Warning: this is  an AMQP specific code
-            ((AMQTopicSubscriber) messageSubscriber).addBindingKey( topic, 
"control");
+            ((TopicSubscriber) messageSubscriber).addBindingKey( topic, 
"control");
 
             // Set a message listener on the messageConsumer
             messageSubscriber.setMessageListener(new MyMessageListener("usa"));
@@ -116,7 +115,7 @@
 
             // Bind each topic queue to the control queue so we know when to 
stop
             // Warning: this is  an AMQP specific code
-            ((AMQTopicSubscriber) messageSubscriber).addBindingKey( topic, 
"control");
+            ((org.apache.qpid.jms.TopicSubscriber) 
messageSubscriber).addBindingKey( topic, "control");
 
             // Set a message listener on the messageConsumer
             messageSubscriber.setMessageListener(new 
MyMessageListener("europe"));
@@ -129,7 +128,7 @@
 
             // Bind each topic queue to the control queue so we know when to 
stop
             // Warning: this is  an AMQP specific code
-            ((AMQTopicSubscriber) messageSubscriber).addBindingKey( topic, 
"control");
+            ((org.apache.qpid.jms.TopicSubscriber) 
messageSubscriber).addBindingKey( topic, "control");
 
             // Set a message listener on the messageConsumer
             messageSubscriber.setMessageListener(new 
MyMessageListener("news"));
@@ -142,13 +141,13 @@
 
             // Bind each topic queue to the control queue so we know when to 
stop
             // Warning: this is  an AMQP specific code
-            ((AMQTopicSubscriber) messageSubscriber).addBindingKey( topic, 
"control");
+            ((org.apache.qpid.jms.TopicSubscriber) 
messageSubscriber).addBindingKey( topic, "control");
           
             // Set a message listener on the messageConsumer
             messageSubscriber.setMessageListener(new 
MyMessageListener("weather"));
 
             // Now the messageConsumer is set up we can start the connection
-            System.out.println(CLASS + ": Starting connection so 
MessageConsumer can receive messages");
+            System.out.println(CLASS + ": Starting connection so 
TopicSubscriber can receive messages");
             connection.start();
 
             // Wait for the messageConsumer to have received all the messages 
it needs

Modified: 
incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/TopicSubscriberAdaptor.java
URL: 
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/TopicSubscriberAdaptor.java?rev=613114&r1=613113&r2=613114&view=diff
==============================================================================
--- 
incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/TopicSubscriberAdaptor.java
 (original)
+++ 
incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/TopicSubscriberAdaptor.java
 Fri Jan 18 01:29:26 2008
@@ -21,18 +21,18 @@
 package org.apache.qpid.client;
 
 import org.apache.qpid.AMQException;
+import org.apache.qpid.jms.TopicSubscriber;
 
 import javax.jms.JMSException;
 import javax.jms.Message;
 import javax.jms.MessageListener;
 import javax.jms.Topic;
-import javax.jms.TopicSubscriber;
 
 /**
  * Wraps a MessageConsumer to fulfill the extended TopicSubscriber contract
  *
  */
-class TopicSubscriberAdaptor implements TopicSubscriber, AMQTopicSubscriber
+class TopicSubscriberAdaptor implements  org.apache.qpid.jms.TopicSubscriber
 {
     private final Topic _topic;
     private final BasicMessageConsumer _consumer;

Copied: 
incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/jms/TopicSubscriber.java
 (from r612820, 
incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQTopicSubscriber.java)
URL: 
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/jms/TopicSubscriber.java?p2=incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/jms/TopicSubscriber.java&p1=incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQTopicSubscriber.java&r1=612820&r2=613114&rev=613114&view=diff
==============================================================================
--- 
incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQTopicSubscriber.java
 (original)
+++ 
incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/jms/TopicSubscriber.java
 Fri Jan 18 01:29:26 2008
@@ -1,10 +1,10 @@
-package org.apache.qpid.client;
+package org.apache.qpid.jms;
 
 import org.apache.qpid.AMQException;
 
 import javax.jms.Topic;
 
-public interface AMQTopicSubscriber
+public interface TopicSubscriber extends javax.jms.TopicSubscriber
 {
 
     void addBindingKey(Topic topic, String bindingKey) throws AMQException;

Modified: 
incubator/qpid/trunk/qpid/java/client/src/test/java/org/apache/qpid/testutil/QpidTestCase.java
URL: 
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/client/src/test/java/org/apache/qpid/testutil/QpidTestCase.java?rev=613114&r1=613113&r2=613114&view=diff
==============================================================================
--- 
incubator/qpid/trunk/qpid/java/client/src/test/java/org/apache/qpid/testutil/QpidTestCase.java
 (original)
+++ 
incubator/qpid/trunk/qpid/java/client/src/test/java/org/apache/qpid/testutil/QpidTestCase.java
 Fri Jan 18 01:29:26 2008
@@ -253,4 +253,9 @@
         }
         return con;
     }
+
+    public void testfoo()
+    {
+        //do nothing, just to avoid maven to report an error  
+    }
 }


Reply via email to