diff options
author | Rajith Muditha Attapattu <rajith@apache.org> | 2009-11-03 14:55:30 +0000 |
---|---|---|
committer | Rajith Muditha Attapattu <rajith@apache.org> | 2009-11-03 14:55:30 +0000 |
commit | 7c79357e1b8eb9e71b8a99a76e27a3f7149a1dcc (patch) | |
tree | a745b80858808d9d0e0915730a393efb00014dc9 /qpid/java/common/src/main | |
parent | f4b8f3c379e8aa2347579ab25baf7e9c32d9b96b (diff) | |
download | qpid-python-7c79357e1b8eb9e71b8a99a76e27a3f7149a1dcc.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@832441 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java/common/src/main')
-rw-r--r-- | qpid/java/common/src/main/java/org/apache/qpid/transport/Connection.java | 3 | ||||
-rw-r--r-- | qpid/java/common/src/main/java/org/apache/qpid/transport/ProtocolViolationException.java | 35 |
2 files changed, 37 insertions, 1 deletions
diff --git a/qpid/java/common/src/main/java/org/apache/qpid/transport/Connection.java b/qpid/java/common/src/main/java/org/apache/qpid/transport/Connection.java index 3403b591f3..773746af79 100644 --- a/qpid/java/common/src/main/java/org/apache/qpid/transport/Connection.java +++ b/qpid/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/qpid/java/common/src/main/java/org/apache/qpid/transport/ProtocolViolationException.java b/qpid/java/common/src/main/java/org/apache/qpid/transport/ProtocolViolationException.java new file mode 100644 index 0000000000..6787157e8e --- /dev/null +++ b/qpid/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); + } +} |