From 029c638fd23d3e53a58ca521209ae62057e59689 Mon Sep 17 00:00:00 2001 From: Rajith Muditha Attapattu Date: Thu, 2 Aug 2007 20:47:26 +0000 Subject: MessageReceiver is removed. It wasn't removed in yesterdays commit. Session - Added txSelect() method. ExceptionListener is added. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@562251 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/qpid/nclient/api/Connection.java | 7 ++ .../apache/qpid/nclient/api/ExceptionListener.java | 37 +++++++++ .../apache/qpid/nclient/api/MessageReceiver.java | 96 ---------------------- .../java/org/apache/qpid/nclient/api/Session.java | 16 +++- 4 files changed, 56 insertions(+), 100 deletions(-) create mode 100644 java/client/src/main/java/org/apache/qpid/nclient/api/ExceptionListener.java delete mode 100644 java/client/src/main/java/org/apache/qpid/nclient/api/MessageReceiver.java (limited to 'java') diff --git a/java/client/src/main/java/org/apache/qpid/nclient/api/Connection.java b/java/client/src/main/java/org/apache/qpid/nclient/api/Connection.java index a2609bc6ff..6d5f317feb 100644 --- a/java/client/src/main/java/org/apache/qpid/nclient/api/Connection.java +++ b/java/client/src/main/java/org/apache/qpid/nclient/api/Connection.java @@ -76,4 +76,11 @@ public interface Connection throws QpidException; + /** + * If the communication layer detects a serious problem with a connection, it + * informs the connection's ExceptionListener + * + * @param exceptionListner The execptionListener + */ + public void setExceptionListener(ExceptionListener exceptionListner); } diff --git a/java/client/src/main/java/org/apache/qpid/nclient/api/ExceptionListener.java b/java/client/src/main/java/org/apache/qpid/nclient/api/ExceptionListener.java new file mode 100644 index 0000000000..1818dbfd23 --- /dev/null +++ b/java/client/src/main/java/org/apache/qpid/nclient/api/ExceptionListener.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.nclient.api; + +import org.apache.qpidity.QpidException; + +/** + * If the communication layer detects a serious problem with a connection, it + * informs the connection's ExceptionListener + */ +public interface ExceptionListener +{ + /** + * If the communication layer detects a serious problem with a connection, it + * informs the connection's ExceptionListener + * + * @param exception The exception comming from the communication layer. + * @see org.apache.qpid.nclient.api.Connection + */ + public void onException(QpidException exception); +} \ No newline at end of file diff --git a/java/client/src/main/java/org/apache/qpid/nclient/api/MessageReceiver.java b/java/client/src/main/java/org/apache/qpid/nclient/api/MessageReceiver.java deleted file mode 100644 index 80477dc0a0..0000000000 --- a/java/client/src/main/java/org/apache/qpid/nclient/api/MessageReceiver.java +++ /dev/null @@ -1,96 +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.nclient.api; - -import java.util.Set; - -import org.apache.qpidity.Option; -import org.apache.qpidity.QpidException; -import org.apache.qpidity.api.Message; - -/** - * Used to receive messages from a queue - */ -public interface MessageReceiver -{ - /** - * Get this receiver options. - * - * @return This receiver set of options. - */ - - public Set