summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRajith Muditha Attapattu <rajith@apache.org>2012-06-10 23:38:53 +0000
committerRajith Muditha Attapattu <rajith@apache.org>2012-06-10 23:38:53 +0000
commitf361c40dce7eafee6683f0a09e849416ea376897 (patch)
treec73f8e88f24da6f35e37ff516ad8089a2ed0205f
parent7cdce1d68b1a796ba7abe93ae27b9683d301d266 (diff)
downloadqpid-python-f361c40dce7eafee6683f0a09e849416ea376897.tar.gz
QPID-4027 Added the various exception classes for the messaging API.
The structure here closely follows the C++ model. The next step is to incoporate these exceptions into the API classes. More classes may need to be added. git-svn-id: https://svn.apache.org/repos/asf/qpid/branches/address-refactor2@1348684 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--qpid/java/client-api/src/main/java/org/apache/qpid/messaging/AddressAssertionFailedException.java38
-rw-r--r--qpid/java/client-api/src/main/java/org/apache/qpid/messaging/AddressException.java35
-rw-r--r--qpid/java/client-api/src/main/java/org/apache/qpid/messaging/AddressNotFoundException.java38
-rw-r--r--qpid/java/client-api/src/main/java/org/apache/qpid/messaging/AddressResolutionException.java38
-rw-r--r--qpid/java/client-api/src/main/java/org/apache/qpid/messaging/ConnectionException.java36
-rw-r--r--qpid/java/client-api/src/main/java/org/apache/qpid/messaging/FetchException.java33
-rw-r--r--qpid/java/client-api/src/main/java/org/apache/qpid/messaging/InvalidOptionStringException.java37
-rw-r--r--qpid/java/client-api/src/main/java/org/apache/qpid/messaging/KeyException.java38
-rw-r--r--qpid/java/client-api/src/main/java/org/apache/qpid/messaging/LinkException.java36
-rw-r--r--qpid/java/client-api/src/main/java/org/apache/qpid/messaging/MalformedAddressException.java37
-rw-r--r--qpid/java/client-api/src/main/java/org/apache/qpid/messaging/MessagingException.java36
-rw-r--r--qpid/java/client-api/src/main/java/org/apache/qpid/messaging/NoMessageAvailableException.java37
-rw-r--r--qpid/java/client-api/src/main/java/org/apache/qpid/messaging/ReceiverException.java36
-rw-r--r--qpid/java/client-api/src/main/java/org/apache/qpid/messaging/SendException.java36
-rw-r--r--qpid/java/client-api/src/main/java/org/apache/qpid/messaging/SenderException.java36
-rw-r--r--qpid/java/client-api/src/main/java/org/apache/qpid/messaging/SessionException.java36
-rw-r--r--qpid/java/client-api/src/main/java/org/apache/qpid/messaging/TargetCapacityExceededException.java36
-rw-r--r--qpid/java/client-api/src/main/java/org/apache/qpid/messaging/TransactionAbortedException.java33
-rw-r--r--qpid/java/client-api/src/main/java/org/apache/qpid/messaging/TransactionException.java36
-rw-r--r--qpid/java/client-api/src/main/java/org/apache/qpid/messaging/TransportFailureException.java40
-rw-r--r--qpid/java/client-api/src/main/java/org/apache/qpid/messaging/UnauthorizedAccessException.java36
21 files changed, 764 insertions, 0 deletions
diff --git a/qpid/java/client-api/src/main/java/org/apache/qpid/messaging/AddressAssertionFailedException.java b/qpid/java/client-api/src/main/java/org/apache/qpid/messaging/AddressAssertionFailedException.java
new file mode 100644
index 0000000000..1fe00e3941
--- /dev/null
+++ b/qpid/java/client-api/src/main/java/org/apache/qpid/messaging/AddressAssertionFailedException.java
@@ -0,0 +1,38 @@
+/* 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.messaging;
+
+/**
+ * Thrown when creating a sender or receiver for an address for which
+ * some asserted property of the node is not matched.
+ */
+public class AddressAssertionFailedException extends AddressException
+{
+
+ public AddressAssertionFailedException(String addr, String message,
+ Throwable cause)
+ {
+ super(addr, message, cause);
+ }
+
+ public AddressAssertionFailedException(String addr, String message)
+ {
+ super(addr, message);
+ }
+
+}
diff --git a/qpid/java/client-api/src/main/java/org/apache/qpid/messaging/AddressException.java b/qpid/java/client-api/src/main/java/org/apache/qpid/messaging/AddressException.java
new file mode 100644
index 0000000000..98a2cfb3b4
--- /dev/null
+++ b/qpid/java/client-api/src/main/java/org/apache/qpid/messaging/AddressException.java
@@ -0,0 +1,35 @@
+/* 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.messaging;
+
+/**
+ * Base class for all address related exceptions thrown by the Messaging API.
+ */
+public class AddressException extends MessagingException
+{
+
+ public AddressException(String addr,String message, Throwable cause)
+ {
+ super(message, cause);
+ }
+
+ public AddressException(String addr,String message)
+ {
+ super(message);
+ }
+}
diff --git a/qpid/java/client-api/src/main/java/org/apache/qpid/messaging/AddressNotFoundException.java b/qpid/java/client-api/src/main/java/org/apache/qpid/messaging/AddressNotFoundException.java
new file mode 100644
index 0000000000..bd27bdd11f
--- /dev/null
+++ b/qpid/java/client-api/src/main/java/org/apache/qpid/messaging/AddressNotFoundException.java
@@ -0,0 +1,38 @@
+/* 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.messaging;
+
+/**
+ * Thrown on attempts to create a sender or receiver to a non-existent
+ * node.
+ */
+public class AddressNotFoundException extends AddressException
+{
+
+ public AddressNotFoundException(String addr, String message,
+ Throwable cause)
+ {
+ super(addr, message, cause);
+ }
+
+ public AddressNotFoundException(String addr, String message)
+ {
+ super(addr, message);
+ }
+
+}
diff --git a/qpid/java/client-api/src/main/java/org/apache/qpid/messaging/AddressResolutionException.java b/qpid/java/client-api/src/main/java/org/apache/qpid/messaging/AddressResolutionException.java
new file mode 100644
index 0000000000..cf5f4acd28
--- /dev/null
+++ b/qpid/java/client-api/src/main/java/org/apache/qpid/messaging/AddressResolutionException.java
@@ -0,0 +1,38 @@
+/* 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.messaging;
+
+/**
+ * Thrown when a syntactically correct address cannot be resolved or
+ * used.
+ */
+public class AddressResolutionException extends AddressException
+{
+
+ public AddressResolutionException(String addr, String message,
+ Throwable cause)
+ {
+ super(addr, message, cause);
+ }
+
+ public AddressResolutionException(String addr, String message)
+ {
+ super(addr, message);
+ }
+
+}
diff --git a/qpid/java/client-api/src/main/java/org/apache/qpid/messaging/ConnectionException.java b/qpid/java/client-api/src/main/java/org/apache/qpid/messaging/ConnectionException.java
new file mode 100644
index 0000000000..68aae08e7e
--- /dev/null
+++ b/qpid/java/client-api/src/main/java/org/apache/qpid/messaging/ConnectionException.java
@@ -0,0 +1,36 @@
+/* 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.messaging;
+
+/**
+ * Base class for all Connection related exceptions thrown by the Messaging API.
+ */
+public class ConnectionException extends MessagingException
+{
+
+ public ConnectionException(String message, Throwable cause)
+ {
+ super(message, cause);
+ }
+
+ public ConnectionException(String message)
+ {
+ super(message);
+ }
+
+}
diff --git a/qpid/java/client-api/src/main/java/org/apache/qpid/messaging/FetchException.java b/qpid/java/client-api/src/main/java/org/apache/qpid/messaging/FetchException.java
new file mode 100644
index 0000000000..7c5cd00cea
--- /dev/null
+++ b/qpid/java/client-api/src/main/java/org/apache/qpid/messaging/FetchException.java
@@ -0,0 +1,33 @@
+/* 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.messaging;
+
+public class FetchException extends ReceiverException
+{
+
+ public FetchException(String message, Throwable cause)
+ {
+ super(message, cause);
+ }
+
+ public FetchException(String message)
+ {
+ super(message);
+ }
+
+}
diff --git a/qpid/java/client-api/src/main/java/org/apache/qpid/messaging/InvalidOptionStringException.java b/qpid/java/client-api/src/main/java/org/apache/qpid/messaging/InvalidOptionStringException.java
new file mode 100644
index 0000000000..fa0cfa7e28
--- /dev/null
+++ b/qpid/java/client-api/src/main/java/org/apache/qpid/messaging/InvalidOptionStringException.java
@@ -0,0 +1,37 @@
+/* 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.messaging;
+
+/**
+ * Thrown when the syntax of the option string used to configure a
+ * connection in not valid
+ */
+public class InvalidOptionStringException extends MessagingException
+{
+
+ public InvalidOptionStringException(String message, Throwable cause)
+ {
+ super(message, cause);
+ }
+
+ public InvalidOptionStringException(String message)
+ {
+ super(message);
+ }
+
+}
diff --git a/qpid/java/client-api/src/main/java/org/apache/qpid/messaging/KeyException.java b/qpid/java/client-api/src/main/java/org/apache/qpid/messaging/KeyException.java
new file mode 100644
index 0000000000..807e3a4477
--- /dev/null
+++ b/qpid/java/client-api/src/main/java/org/apache/qpid/messaging/KeyException.java
@@ -0,0 +1,38 @@
+/* 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.messaging;
+
+/**
+ * Thrown to indicate a failed lookup of some local object. For
+ * example when attempting to retrieve a session, sender or receiver
+ * by name.
+ */
+public class KeyException extends MessagingException
+{
+
+ public KeyException(String message, Throwable cause)
+ {
+ super(message, cause);
+ }
+
+ public KeyException(String message)
+ {
+ super(message);
+ }
+
+}
diff --git a/qpid/java/client-api/src/main/java/org/apache/qpid/messaging/LinkException.java b/qpid/java/client-api/src/main/java/org/apache/qpid/messaging/LinkException.java
new file mode 100644
index 0000000000..5c7d0b0af1
--- /dev/null
+++ b/qpid/java/client-api/src/main/java/org/apache/qpid/messaging/LinkException.java
@@ -0,0 +1,36 @@
+/* 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.messaging;
+
+/**
+ * Base class for all link related exceptions thrown by the Messaging API.
+ */
+public class LinkException extends MessagingException
+{
+
+ public LinkException(String message, Throwable cause)
+ {
+ super(message, cause);
+ }
+
+ public LinkException(String message)
+ {
+ super(message);
+ }
+
+}
diff --git a/qpid/java/client-api/src/main/java/org/apache/qpid/messaging/MalformedAddressException.java b/qpid/java/client-api/src/main/java/org/apache/qpid/messaging/MalformedAddressException.java
new file mode 100644
index 0000000000..00c076d1c0
--- /dev/null
+++ b/qpid/java/client-api/src/main/java/org/apache/qpid/messaging/MalformedAddressException.java
@@ -0,0 +1,37 @@
+/* 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.messaging;
+
+/**
+ * Thrown when an address string with invalid syntax is used.
+ */
+public class MalformedAddressException extends AddressException
+{
+
+ public MalformedAddressException(String addr, String message,
+ Throwable cause)
+ {
+ super(addr, message, cause);
+ }
+
+ public MalformedAddressException(String addr, String message)
+ {
+ super(addr, message);
+ }
+
+}
diff --git a/qpid/java/client-api/src/main/java/org/apache/qpid/messaging/MessagingException.java b/qpid/java/client-api/src/main/java/org/apache/qpid/messaging/MessagingException.java
new file mode 100644
index 0000000000..d5cab4149c
--- /dev/null
+++ b/qpid/java/client-api/src/main/java/org/apache/qpid/messaging/MessagingException.java
@@ -0,0 +1,36 @@
+/* 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.messaging;
+
+/**
+ * Base class for all checked exceptions thrown by the Messaging API.
+ */
+public class MessagingException extends Exception
+{
+
+ public MessagingException(String message, Throwable cause)
+ {
+ super(message, cause);
+ }
+
+ public MessagingException(String message)
+ {
+ super(message);
+ }
+
+}
diff --git a/qpid/java/client-api/src/main/java/org/apache/qpid/messaging/NoMessageAvailableException.java b/qpid/java/client-api/src/main/java/org/apache/qpid/messaging/NoMessageAvailableException.java
new file mode 100644
index 0000000000..a4fc731d08
--- /dev/null
+++ b/qpid/java/client-api/src/main/java/org/apache/qpid/messaging/NoMessageAvailableException.java
@@ -0,0 +1,37 @@
+/* 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.messaging;
+
+/**
+ * Thrown by Receiver::fetch(), Receiver::get() to indicate that,
+ * there are no messages available before the timeout specified.
+ */
+public class NoMessageAvailableException extends ReceiverException
+{
+
+ public NoMessageAvailableException(String message, Throwable cause)
+ {
+ super(message, cause);
+ }
+
+ public NoMessageAvailableException(String message)
+ {
+ super(message);
+ }
+
+}
diff --git a/qpid/java/client-api/src/main/java/org/apache/qpid/messaging/ReceiverException.java b/qpid/java/client-api/src/main/java/org/apache/qpid/messaging/ReceiverException.java
new file mode 100644
index 0000000000..2ded9f2367
--- /dev/null
+++ b/qpid/java/client-api/src/main/java/org/apache/qpid/messaging/ReceiverException.java
@@ -0,0 +1,36 @@
+/* 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.messaging;
+
+/**
+ * Base class for all Receiver related exceptions thrown by the Messaging API.
+ */
+public class ReceiverException extends MessagingException
+{
+
+ public ReceiverException(String message, Throwable cause)
+ {
+ super(message, cause);
+ }
+
+ public ReceiverException(String message)
+ {
+ super(message);
+ }
+
+}
diff --git a/qpid/java/client-api/src/main/java/org/apache/qpid/messaging/SendException.java b/qpid/java/client-api/src/main/java/org/apache/qpid/messaging/SendException.java
new file mode 100644
index 0000000000..eb20100d03
--- /dev/null
+++ b/qpid/java/client-api/src/main/java/org/apache/qpid/messaging/SendException.java
@@ -0,0 +1,36 @@
+/* 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.messaging;
+
+/**
+ * Base class for all Session related exceptions thrown by the Messaging API.
+ */
+public class SendException extends SenderException
+{
+
+ public SendException(String message, Throwable cause)
+ {
+ super(message, cause);
+ }
+
+ public SendException(String message)
+ {
+ super(message);
+ }
+
+}
diff --git a/qpid/java/client-api/src/main/java/org/apache/qpid/messaging/SenderException.java b/qpid/java/client-api/src/main/java/org/apache/qpid/messaging/SenderException.java
new file mode 100644
index 0000000000..cf787ff8b0
--- /dev/null
+++ b/qpid/java/client-api/src/main/java/org/apache/qpid/messaging/SenderException.java
@@ -0,0 +1,36 @@
+/* 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.messaging;
+
+/**
+ * Base class for all Sender related exceptions thrown by the Messaging API.
+ */
+public class SenderException extends MessagingException
+{
+
+ public SenderException(String message, Throwable cause)
+ {
+ super(message, cause);
+ }
+
+ public SenderException(String message)
+ {
+ super(message);
+ }
+
+}
diff --git a/qpid/java/client-api/src/main/java/org/apache/qpid/messaging/SessionException.java b/qpid/java/client-api/src/main/java/org/apache/qpid/messaging/SessionException.java
new file mode 100644
index 0000000000..bbe0bb2c1d
--- /dev/null
+++ b/qpid/java/client-api/src/main/java/org/apache/qpid/messaging/SessionException.java
@@ -0,0 +1,36 @@
+/* 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.messaging;
+
+/**
+ * Base class for all Sender related exceptions thrown by the Messaging API.
+ */
+public class SessionException extends MessagingException
+{
+
+ public SessionException(String message, Throwable cause)
+ {
+ super(message, cause);
+ }
+
+ public SessionException(String message)
+ {
+ super(message);
+ }
+
+}
diff --git a/qpid/java/client-api/src/main/java/org/apache/qpid/messaging/TargetCapacityExceededException.java b/qpid/java/client-api/src/main/java/org/apache/qpid/messaging/TargetCapacityExceededException.java
new file mode 100644
index 0000000000..48fb75d970
--- /dev/null
+++ b/qpid/java/client-api/src/main/java/org/apache/qpid/messaging/TargetCapacityExceededException.java
@@ -0,0 +1,36 @@
+/* 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.messaging;
+
+/**
+ * Base class for all Sender related exceptions thrown by the Messaging API.
+ */
+public class TargetCapacityExceededException extends SenderException
+{
+
+ public TargetCapacityExceededException(String message, Throwable cause)
+ {
+ super(message, cause);
+ }
+
+ public TargetCapacityExceededException(String message)
+ {
+ super(message);
+ }
+
+}
diff --git a/qpid/java/client-api/src/main/java/org/apache/qpid/messaging/TransactionAbortedException.java b/qpid/java/client-api/src/main/java/org/apache/qpid/messaging/TransactionAbortedException.java
new file mode 100644
index 0000000000..8c31934d7f
--- /dev/null
+++ b/qpid/java/client-api/src/main/java/org/apache/qpid/messaging/TransactionAbortedException.java
@@ -0,0 +1,33 @@
+/* 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.messaging;
+
+public class TransactionAbortedException extends SessionException
+{
+
+ public TransactionAbortedException(String message, Throwable cause)
+ {
+ super(message, cause);
+ }
+
+ public TransactionAbortedException(String message)
+ {
+ super(message);
+ }
+
+}
diff --git a/qpid/java/client-api/src/main/java/org/apache/qpid/messaging/TransactionException.java b/qpid/java/client-api/src/main/java/org/apache/qpid/messaging/TransactionException.java
new file mode 100644
index 0000000000..ec92dc5845
--- /dev/null
+++ b/qpid/java/client-api/src/main/java/org/apache/qpid/messaging/TransactionException.java
@@ -0,0 +1,36 @@
+/* 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.messaging;
+
+/**
+ * Base class for all transaction related exceptions thrown by the Messaging API.
+ */
+public class TransactionException extends SessionException
+{
+
+ public TransactionException(String message, Throwable cause)
+ {
+ super(message, cause);
+ }
+
+ public TransactionException(String message)
+ {
+ super(message);
+ }
+
+}
diff --git a/qpid/java/client-api/src/main/java/org/apache/qpid/messaging/TransportFailureException.java b/qpid/java/client-api/src/main/java/org/apache/qpid/messaging/TransportFailureException.java
new file mode 100644
index 0000000000..63873126af
--- /dev/null
+++ b/qpid/java/client-api/src/main/java/org/apache/qpid/messaging/TransportFailureException.java
@@ -0,0 +1,40 @@
+/* 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.messaging;
+
+/**
+ * Thrown to indicate loss of underlying connection. When
+ * auto-reconnect is used this will be caught by the library and used
+ * to trigger reconnection attempts. If reconnection fails (according
+ * to whatever settings have been configured), then an instance of
+ * this class will be thrown to signal that.
+ */
+public class TransportFailureException extends ConnectionException
+{
+
+ public TransportFailureException(String message, Throwable cause)
+ {
+ super(message, cause);
+ }
+
+ public TransportFailureException(String message)
+ {
+ super(message);
+ }
+
+}
diff --git a/qpid/java/client-api/src/main/java/org/apache/qpid/messaging/UnauthorizedAccessException.java b/qpid/java/client-api/src/main/java/org/apache/qpid/messaging/UnauthorizedAccessException.java
new file mode 100644
index 0000000000..954579b0ca
--- /dev/null
+++ b/qpid/java/client-api/src/main/java/org/apache/qpid/messaging/UnauthorizedAccessException.java
@@ -0,0 +1,36 @@
+/* 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.messaging;
+
+/**
+ * Access to a resource within the "peer" was denied due to insufficient privileges.
+ */
+public class UnauthorizedAccessException extends SessionException
+{
+
+ public UnauthorizedAccessException(String message, Throwable cause)
+ {
+ super(message, cause);
+ }
+
+ public UnauthorizedAccessException(String message)
+ {
+ super(message);
+ }
+
+}