From 3b5d4734b777b54b52ce2710f404143aca8c5c6e Mon Sep 17 00:00:00 2001 From: Rupert Smith Date: Fri, 1 Jun 2007 14:33:07 +0000 Subject: QPID-402: FailoverException falling through to client. All blocking operations now wrapped in failover support wrappers. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/branches/M2@543496 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/qpid/AMQConnectionClosedException.java | 9 ++++++--- .../java/org/apache/qpid/AMQPInvalidClassException.java | 15 ++++++++++++--- .../java/org/apache/qpid/protocol/AMQMethodListener.java | 4 +--- .../java/org/apache/qpid/util/PrettyPrintingUtils.java | 2 ++ 4 files changed, 21 insertions(+), 9 deletions(-) (limited to 'java/common') diff --git a/java/common/src/main/java/org/apache/qpid/AMQConnectionClosedException.java b/java/common/src/main/java/org/apache/qpid/AMQConnectionClosedException.java index 931c6cd87a..eb736d437f 100644 --- a/java/common/src/main/java/org/apache/qpid/AMQConnectionClosedException.java +++ b/java/common/src/main/java/org/apache/qpid/AMQConnectionClosedException.java @@ -23,14 +23,17 @@ package org.apache.qpid; import org.apache.qpid.protocol.AMQConstant; /** - * AMQConnectionClosedException indicates that an operation cannot be performed becauase a connection has been closed. + * AMQConnectionClosedException indicates that a connection has been closed. + * + *

This exception is really used as an event, in order that the method handler that raises it creates an event + * which is propagated to the io handler, in order to notify it of the connection closure. * *

*
CRC Card
Responsibilities Collaborations - *
Represents a failed operation on a closed conneciton. + *
Represents a the closure of a connection. *
* - * @todo Does this duplicate AMQConnectionException? + * @todo Should review where exceptions-as-events */ public class AMQConnectionClosedException extends AMQException { diff --git a/java/common/src/main/java/org/apache/qpid/AMQPInvalidClassException.java b/java/common/src/main/java/org/apache/qpid/AMQPInvalidClassException.java index 883e13e5e6..a0574efa72 100644 --- a/java/common/src/main/java/org/apache/qpid/AMQPInvalidClassException.java +++ b/java/common/src/main/java/org/apache/qpid/AMQPInvalidClassException.java @@ -14,13 +14,22 @@ * "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. + * under the License. + * * - * */ package org.apache.qpid; - +/** + * AMQPInvalidClassException indicates an error when trying to store an illegally typed argument in a field table. + * + *

+ *
CRC Card
Responsibilities Collaborations + *
Represents illegal argument type for field table values. + *
+ * + * @todo Could just re-use an exising exception like IllegalArgumentException or ClassCastException. + */ public class AMQPInvalidClassException extends RuntimeException { public AMQPInvalidClassException(String s) diff --git a/java/common/src/main/java/org/apache/qpid/protocol/AMQMethodListener.java b/java/common/src/main/java/org/apache/qpid/protocol/AMQMethodListener.java index 808272e9ec..2fbeeda1d4 100644 --- a/java/common/src/main/java/org/apache/qpid/protocol/AMQMethodListener.java +++ b/java/common/src/main/java/org/apache/qpid/protocol/AMQMethodListener.java @@ -28,7 +28,7 @@ import org.apache.qpid.framing.AMQMethodBody; * *

An event listener may be associated with a particular context, usually an AMQP channel, and in addition to * receiving method events will be notified of errors on that context. This enables listeners to perform any clean - * up that they need to do before the context is closed. + * up that they need to do before the context is closed or retried. * *

*
CRC Card
Responsibilities @@ -64,8 +64,6 @@ public interface AMQMethodListener * any necessary clean-up for the context. * * @param e The underlying exception that is the source of the error. - * - * @todo Consider narrowing the exception, or wrapping it. */ void error(Exception e); } diff --git a/java/common/src/main/java/org/apache/qpid/util/PrettyPrintingUtils.java b/java/common/src/main/java/org/apache/qpid/util/PrettyPrintingUtils.java index faeb9d7167..10f6a27293 100644 --- a/java/common/src/main/java/org/apache/qpid/util/PrettyPrintingUtils.java +++ b/java/common/src/main/java/org/apache/qpid/util/PrettyPrintingUtils.java @@ -26,6 +26,8 @@ package org.apache.qpid.util; *

*
CRC Card
Responsibilities Collaborations *
+ * + * @todo Drop this. There are already array pretty printing methods it java.utils.Arrays. */ public class PrettyPrintingUtils { -- cgit v1.2.1