From c5211e63139dcd0ddfb2061b8ada312e6ea3083c Mon Sep 17 00:00:00 2001 From: Martin Ritchie Date: Tue, 20 Feb 2007 09:16:59 +0000 Subject: Renamed AMQInvalidSelectorException to be AMQInvalidArgumentException to better fit the generic use of the argument table in the AMQP Queue.Bind spec. Adjusted AMQConstant to match the proposal for additional codes AMQP-39,40,41 (https://wiki.108.redhat.com/jira/browse/AMQP-39). git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@509478 13f79535-47bb-0310-9956-ffa450edef68 --- .../main/java/org/apache/qpid/AMQException.java | 6 ++--- .../apache/qpid/AMQInvalidArgumentException.java | 31 ++++++++++++++++++++++ .../apache/qpid/AMQInvalidRoutingKeyException.java | 2 +- .../apache/qpid/AMQInvalidSelectorException.java | 31 ---------------------- .../java/org/apache/qpid/protocol/AMQConstant.java | 10 +++---- 5 files changed, 38 insertions(+), 42 deletions(-) create mode 100644 java/common/src/main/java/org/apache/qpid/AMQInvalidArgumentException.java delete mode 100644 java/common/src/main/java/org/apache/qpid/AMQInvalidSelectorException.java (limited to 'java/common') diff --git a/java/common/src/main/java/org/apache/qpid/AMQException.java b/java/common/src/main/java/org/apache/qpid/AMQException.java index 5c11ec18ca..0222fd9b4e 100644 --- a/java/common/src/main/java/org/apache/qpid/AMQException.java +++ b/java/common/src/main/java/org/apache/qpid/AMQException.java @@ -23,9 +23,7 @@ package org.apache.qpid; import org.apache.log4j.Logger; import org.apache.qpid.protocol.AMQConstant; -/** - * Generic AMQ exception. - */ +/** Generic AMQ exception. */ public class AMQException extends Exception { private AMQConstant _errorCode; @@ -78,5 +76,5 @@ public class AMQException extends Exception { return _errorCode; } - + } diff --git a/java/common/src/main/java/org/apache/qpid/AMQInvalidArgumentException.java b/java/common/src/main/java/org/apache/qpid/AMQInvalidArgumentException.java new file mode 100644 index 0000000000..9406921d88 --- /dev/null +++ b/java/common/src/main/java/org/apache/qpid/AMQInvalidArgumentException.java @@ -0,0 +1,31 @@ +/* + * 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; + +import org.apache.qpid.protocol.AMQConstant; + +public class AMQInvalidArgumentException extends AMQException +{ + public AMQInvalidArgumentException(String message) + { + super(AMQConstant.INVALID_ARGUMENT, message); + } +} diff --git a/java/common/src/main/java/org/apache/qpid/AMQInvalidRoutingKeyException.java b/java/common/src/main/java/org/apache/qpid/AMQInvalidRoutingKeyException.java index 3293e2523d..caf8f3a572 100644 --- a/java/common/src/main/java/org/apache/qpid/AMQInvalidRoutingKeyException.java +++ b/java/common/src/main/java/org/apache/qpid/AMQInvalidRoutingKeyException.java @@ -26,6 +26,6 @@ public class AMQInvalidRoutingKeyException extends AMQException { public AMQInvalidRoutingKeyException(String message) { - super(AMQConstant.INVALID_ROUTING_KEY,message); + super(AMQConstant.INVALID_ROUTING_KEY, message); } } diff --git a/java/common/src/main/java/org/apache/qpid/AMQInvalidSelectorException.java b/java/common/src/main/java/org/apache/qpid/AMQInvalidSelectorException.java deleted file mode 100644 index 9d003514ad..0000000000 --- a/java/common/src/main/java/org/apache/qpid/AMQInvalidSelectorException.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * 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; - -import org.apache.qpid.protocol.AMQConstant; - -public class AMQInvalidSelectorException extends AMQException -{ - public AMQInvalidSelectorException(String message) - { - super(AMQConstant.INVALID_SELECTOR,message); - } -} diff --git a/java/common/src/main/java/org/apache/qpid/protocol/AMQConstant.java b/java/common/src/main/java/org/apache/qpid/protocol/AMQConstant.java index 0c4736a348..ed244396bf 100644 --- a/java/common/src/main/java/org/apache/qpid/protocol/AMQConstant.java +++ b/java/common/src/main/java/org/apache/qpid/protocol/AMQConstant.java @@ -74,12 +74,6 @@ public final class AMQConstant public static final AMQConstant CONTEXT_IN_USE = new AMQConstant(320, "context in use", true); - public static final AMQConstant CONTEXT_UNKNOWN = new AMQConstant(321, "context unknown", true); - - public static final AMQConstant INVALID_SELECTOR = new AMQConstant(322, "selector invalid", true); - - public static final AMQConstant INVALID_ROUTING_KEY = new AMQConstant(323, "routing key invalid", true); - public static final AMQConstant INVALID_PATH = new AMQConstant(402, "invalid path", true); public static final AMQConstant ACCESS_REFUSED = new AMQConstant(403, "access refused", true); @@ -90,8 +84,12 @@ public final class AMQConstant public static final AMQConstant IN_USE = new AMQConstant(406, "In use", true); + public static final AMQConstant INVALID_ROUTING_KEY = new AMQConstant(407, "routing key invalid", true); + public static final AMQConstant REQUEST_TIMEOUT = new AMQConstant(408, "Request Timeout", true); + public static final AMQConstant INVALID_ARGUMENT = new AMQConstant(409, "argument invalid", true); + public static final AMQConstant FRAME_ERROR = new AMQConstant(501, "frame error", true); public static final AMQConstant SYNTAX_ERROR = new AMQConstant(502, "syntax error", true); -- cgit v1.2.1