summaryrefslogtreecommitdiff
path: root/java
diff options
context:
space:
mode:
authorRajith Muditha Attapattu <rajith@apache.org>2009-11-03 14:55:30 +0000
committerRajith Muditha Attapattu <rajith@apache.org>2009-11-03 14:55:30 +0000
commit5c08385e89afa9a51bfa60d2bf54e8bce87a8a5e (patch)
tree40795994d74e522d9d1d9e1cf2a7d1203c294afa /java
parent8e3202df7c4701d1effd19d0e0a9e332a8c3bc1c (diff)
downloadqpid-python-5c08385e89afa9a51bfa60d2bf54e8bce87a8a5e.tar.gz
This is for QPID-2176
Rob had already added the null check. I added a ProtocolViolationException, that will be thrown if we receive any frames for an already detached session. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@832441 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java')
-rw-r--r--java/common/src/main/java/org/apache/qpid/transport/Connection.java3
-rw-r--r--java/common/src/main/java/org/apache/qpid/transport/ProtocolViolationException.java35
2 files changed, 37 insertions, 1 deletions
diff --git a/java/common/src/main/java/org/apache/qpid/transport/Connection.java b/java/common/src/main/java/org/apache/qpid/transport/Connection.java
index 3403b591f3..773746af79 100644
--- a/java/common/src/main/java/org/apache/qpid/transport/Connection.java
+++ b/java/common/src/main/java/org/apache/qpid/transport/Connection.java
@@ -322,7 +322,8 @@ public class Connection extends ConnectionInvoker
}
else
{
- // TODO
+ throw new ProtocolViolationException(
+ "Received frames for an already dettached session", null);
}
}
diff --git a/java/common/src/main/java/org/apache/qpid/transport/ProtocolViolationException.java b/java/common/src/main/java/org/apache/qpid/transport/ProtocolViolationException.java
new file mode 100644
index 0000000000..6787157e8e
--- /dev/null
+++ b/java/common/src/main/java/org/apache/qpid/transport/ProtocolViolationException.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.transport;
+
+
+/**
+ * ProtocolViolationException
+ *
+ */
+
+public final class ProtocolViolationException extends ConnectionException
+{
+ public ProtocolViolationException(String msg,Throwable cause)
+ {
+ super(msg, cause);
+ }
+}