Return-Path: Delivered-To: apmail-incubator-qpid-commits-archive@locus.apache.org Received: (qmail 93550 invoked from network); 2 Aug 2007 20:47:51 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 2 Aug 2007 20:47:51 -0000 Received: (qmail 33848 invoked by uid 500); 2 Aug 2007 20:47:51 -0000 Delivered-To: apmail-incubator-qpid-commits-archive@incubator.apache.org Received: (qmail 33837 invoked by uid 500); 2 Aug 2007 20:47:51 -0000 Mailing-List: contact qpid-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: qpid-dev@incubator.apache.org Delivered-To: mailing list qpid-commits@incubator.apache.org Received: (qmail 33828 invoked by uid 99); 2 Aug 2007 20:47:51 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Aug 2007 13:47:51 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Aug 2007 20:47:29 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id D697B1A981A; Thu, 2 Aug 2007 13:47:27 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r562251 - in /incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/nclient/api: Connection.java ExceptionListener.java MessageReceiver.java Session.java Date: Thu, 02 Aug 2007 20:47:27 -0000 To: qpid-commits@incubator.apache.org From: rajith@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20070802204727.D697B1A981A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: rajith Date: Thu Aug 2 13:47:26 2007 New Revision: 562251 URL: http://svn.apache.org/viewvc?view=rev&rev=562251 Log: MessageReceiver is removed. It wasn't removed in yesterdays commit. Session - Added txSelect() method. ExceptionListener is added. Added: incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/nclient/api/ExceptionListener.java Removed: incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/nclient/api/MessageReceiver.java Modified: incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/nclient/api/Connection.java incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/nclient/api/Session.java Modified: incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/nclient/api/Connection.java URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/nclient/api/Connection.java?view=diff&rev=562251&r1=562250&r2=562251 ============================================================================== --- incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/nclient/api/Connection.java (original) +++ incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/nclient/api/Connection.java Thu Aug 2 13:47:26 2007 @@ -76,4 +76,11 @@ 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); } Added: incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/nclient/api/ExceptionListener.java URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/nclient/api/ExceptionListener.java?view=auto&rev=562251 ============================================================================== --- incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/nclient/api/ExceptionListener.java (added) +++ incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/nclient/api/ExceptionListener.java Thu Aug 2 13:47:26 2007 @@ -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 Modified: incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/nclient/api/Session.java URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/nclient/api/Session.java?view=diff&rev=562251&r1=562250&r2=562251 ============================================================================== --- incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/nclient/api/Session.java (original) +++ incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/nclient/api/Session.java Thu Aug 2 13:47:26 2007 @@ -88,7 +88,7 @@ * @return msg The Message to be sent * @throws QpidException If the session fails to send the message due to some error */ - public void messageTransfer(String destination,Message msg)throws QpidException; + public void messageTransfer(String destination,Message msg,Option... options)throws QpidException; /** * Transfer the given message. @@ -211,6 +211,7 @@ */ public void messageSubscribe(String queue, String destination, Map filter, Option ... _options) throws QpidException; + public void messageSubscribe(String queue, String destination, Map filter,StreamingMessageListener listener,Option ... _options) throws QpidException; /** * Cancels a subscription @@ -225,7 +226,7 @@ * @param destination * @param listener */ - public void addMessageListener(String destination,StreamingMessageListener listener); + public void setMessageListener(String destination,StreamingMessageListener listener); /** * We currently allow one listerner per destination @@ -233,7 +234,7 @@ * @param destination * @param listener */ - public void addMessageListener(String destination,MessageListener listener); + public void setMessageListener(String destination,MessageListener listener); // ----------------------------------------------- @@ -255,7 +256,14 @@ * @throws IllegalStateException If this session is not transacted. */ public void txRollback() throws QpidException, IllegalStateException; - + + + /** + * Selects the session for transactions + * + * @throws QpidException + */ + public void txSelect() throws QpidException; //--------------------------------------------- // Queue methods