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/07/27 16:39:01 UTC

svn commit: r560250 - in /incubator/qpid/trunk/qpid/java: client/src/main/java/org/apache/qpid/nclient/api/Session.java client/src/main/java/org/apache/qpid/nclient/exception/QpidException.java common/src/main/java/org/apache/qpidity/QpidException.java

Author: rajith
Date: Fri Jul 27 07:38:59 2007
New Revision: 560250

URL: http://svn.apache.org/viewvc?view=rev&rev=560250
Log:
moved the QpidException to common from client

Added:
    incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpidity/QpidException.java
Removed:
    incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/nclient/exception/QpidException.java
Modified:
    incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/nclient/api/Session.java

Modified: incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/nclient/api/Session.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/nclient/api/Session.java?view=diff&rev=560250&r1=560249&r2=560250
==============================================================================
--- incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/nclient/api/Session.java (original)
+++ incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/nclient/api/Session.java Fri Jul 27 07:38:59 2007
@@ -45,7 +45,7 @@
      * @throws QpidException If the communication layer fails to close this session or if an internal error happens
      *                       when closing this session resources. .
      */
-    public void close()
+    public void sessionClose()
             throws
             QpidException;
 
@@ -55,7 +55,7 @@
      *
      * @throws QpidException If the communication layer fails to suspend this session
      */
-    public void suspend()
+    public void sessionSuspend()
             throws
             QpidException;
 
@@ -66,7 +66,8 @@
      *
      * @throws QpidException If the communication layer fails to unsuspend this session
      */
-    public void unsuspend()
+    public void sessionUnsuspend()
+    
             throws
             QpidException;
 

Added: incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpidity/QpidException.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpidity/QpidException.java?view=auto&rev=560250
==============================================================================
--- incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpidity/QpidException.java (added)
+++ incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpidity/QpidException.java Fri Jul 27 07:38:59 2007
@@ -0,0 +1,59 @@
+/* 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.qpidity;
+
+/**
+ * Created by Arnaud Simon
+ * Date: 20-Jul-2007
+ * Time: 10:56:55
+ */
+public class QpidException extends Exception
+{
+    /**
+     * This exception error code.
+     * <p> This error code is used for internationalisation purpose.
+     * <p> This error code is set from the AMQP ones.
+     * <TODO> So we may want to use the AMQP error code directly.
+     */
+    private String _errorCode;
+
+    /**
+     * Constructor for a Qpid Exception.
+     * <p> This is the only provided constructor and the parameters have to be set to null when
+     * they are unknown.
+     * @param message    A description of the reason of this exception .
+     * @param errorCode  A string specifyin the error code of this exception.
+     * @param cause      The linked Execption.
+     */
+    public QpidException(String message, String errorCode, Throwable cause)
+    {
+        super(message, cause);
+        _errorCode = errorCode;
+    }
+
+    /**
+     * Get this execption error code.
+     *
+     * @return This exception error code.
+     */
+    public String getErrorCode()
+    {
+        return _errorCode;
+    }
+}
+