You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ra...@apache.org on 2007/02/21 18:21:42 UTC
svn commit: r510107 - in
/incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client:
AMQQueueSessionAdaptor.java AMQSessionAdapter.java
AMQTopicSessionAdaptor.java handler/MessageTransferMethodHandler.java
Author: rajith
Date: Wed Feb 21 09:21:41 2007
New Revision: 510107
URL: http://svn.apache.org/viewvc?view=rev&rev=510107
Log:
Added the Session Adpater to the branch. It was taken from the trunk
Added:
incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/AMQSessionAdapter.java
Modified:
incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/AMQQueueSessionAdaptor.java
incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/AMQTopicSessionAdaptor.java
incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/handler/MessageTransferMethodHandler.java
Modified: incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/AMQQueueSessionAdaptor.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/AMQQueueSessionAdaptor.java?view=diff&rev=510107&r1=510106&r2=510107
==============================================================================
--- incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/AMQQueueSessionAdaptor.java (original)
+++ incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/AMQQueueSessionAdaptor.java Wed Feb 21 09:21:41 2007
@@ -28,7 +28,7 @@
* Need this adaptor class to conform to JMS spec and throw IllegalStateException
* from createDurableSubscriber, unsubscribe, createTopic & createTemporaryTopic
*/
-public class AMQQueueSessionAdaptor implements QueueSession
+public class AMQQueueSessionAdaptor implements QueueSession, AMQSessionAdapter
{
//holds a session for delegation
protected final AMQSession _session;
@@ -174,6 +174,11 @@
public void unsubscribe(String string) throws JMSException {
throw new IllegalStateException("Cannot call unsubscribe from QueueSession");
+ }
+
+ public AMQSession getSession()
+ {
+ return _session;
}
}
Added: incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/AMQSessionAdapter.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/AMQSessionAdapter.java?view=auto&rev=510107
==============================================================================
--- incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/AMQSessionAdapter.java (added)
+++ incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/AMQSessionAdapter.java Wed Feb 21 09:21:41 2007
@@ -0,0 +1,26 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.qpid.client;
+
+public interface AMQSessionAdapter
+{
+ public AMQSession getSession();
+}
\ No newline at end of file
Modified: incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/AMQTopicSessionAdaptor.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/AMQTopicSessionAdaptor.java?view=diff&rev=510107&r1=510106&r2=510107
==============================================================================
--- incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/AMQTopicSessionAdaptor.java (original)
+++ incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/AMQTopicSessionAdaptor.java Wed Feb 21 09:21:41 2007
@@ -24,7 +24,7 @@
import javax.jms.IllegalStateException;
import java.io.Serializable;
-public class AMQTopicSessionAdaptor implements TopicSession
+public class AMQTopicSessionAdaptor implements TopicSession, AMQSessionAdapter
{
protected final AMQSession _session;
@@ -197,6 +197,11 @@
public TemporaryQueue createTemporaryQueue() throws JMSException
{
throw new IllegalStateException("Cannot call createTemporaryQueue from TopicSession");
+ }
+
+ public AMQSession getSession()
+ {
+ return _session;
}
}
Modified: incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/handler/MessageTransferMethodHandler.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/handler/MessageTransferMethodHandler.java?view=diff&rev=510107&r1=510106&r2=510107
==============================================================================
--- incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/handler/MessageTransferMethodHandler.java (original)
+++ incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/handler/MessageTransferMethodHandler.java Wed Feb 21 09:21:41 2007
@@ -83,4 +83,3 @@
}
}
-