From commits-return-45882-apmail-directory-commits-archive=directory.apache.org@directory.apache.org Wed May 11 12:27:15 2016 Return-Path: X-Original-To: apmail-directory-commits-archive@www.apache.org Delivered-To: apmail-directory-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1A05418E2F for ; Wed, 11 May 2016 12:27:15 +0000 (UTC) Received: (qmail 59804 invoked by uid 500); 11 May 2016 12:27:15 -0000 Delivered-To: apmail-directory-commits-archive@directory.apache.org Received: (qmail 59759 invoked by uid 500); 11 May 2016 12:27:15 -0000 Mailing-List: contact commits-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@directory.apache.org Delivered-To: mailing list commits@directory.apache.org Received: (qmail 59750 invoked by uid 99); 11 May 2016 12:27:15 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 May 2016 12:27:15 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 98AE2C3408 for ; Wed, 11 May 2016 12:27:14 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.384 X-Spam-Level: X-Spam-Status: No, score=0.384 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-1.416] autolearn=disabled Received: from mx2-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id GJ311s98YFAu for ; Wed, 11 May 2016 12:27:13 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx2-lw-eu.apache.org (ASF Mail Server at mx2-lw-eu.apache.org) with ESMTP id 029D55F24C for ; Wed, 11 May 2016 12:27:13 +0000 (UTC) Received: from svn01-us-west.apache.org (svn.apache.org [10.41.0.6]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id F3C32E0178 for ; Wed, 11 May 2016 12:27:11 +0000 (UTC) Received: from svn01-us-west.apache.org (localhost [127.0.0.1]) by svn01-us-west.apache.org (ASF Mail Server at svn01-us-west.apache.org) with ESMTP id F259B3A0046 for ; Wed, 11 May 2016 12:27:11 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1743346 - in /directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api: SearchCursorImpl.java exception/LdapConnectionTimeOutException.java Date: Wed, 11 May 2016 12:27:11 -0000 To: commits@directory.apache.org From: semancik@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20160511122711.F259B3A0046@svn01-us-west.apache.org> Author: semancik Date: Wed May 11 12:27:11 2016 New Revision: 1743346 URL: http://svn.apache.org/viewvc?rev=1743346&view=rev Log: Adding timeout exception (thrown in SearchCursorImpl) Added: directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/exception/LdapConnectionTimeOutException.java Modified: directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/SearchCursorImpl.java Modified: directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/SearchCursorImpl.java URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/SearchCursorImpl.java?rev=1743346&r1=1743345&r2=1743346&view=diff ============================================================================== --- directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/SearchCursorImpl.java (original) +++ directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/SearchCursorImpl.java Wed May 11 12:27:11 2016 @@ -39,6 +39,7 @@ import org.apache.directory.api.ldap.mod import org.apache.directory.api.ldap.model.message.SearchResultDone; import org.apache.directory.api.ldap.model.message.SearchResultEntry; import org.apache.directory.api.ldap.model.message.SearchResultReference; +import org.apache.directory.ldap.client.api.exception.LdapConnectionTimeOutException; import org.apache.directory.ldap.client.api.future.SearchFuture; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -146,7 +147,7 @@ public class SearchCursorImpl extends Ab { future.cancel( true ); - throw new LdapException( LdapNetworkConnection.TIME_OUT_ERROR ); + throw new LdapConnectionTimeOutException( LdapNetworkConnection.TIME_OUT_ERROR ); } done = ( response instanceof SearchResultDone ); Added: directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/exception/LdapConnectionTimeOutException.java URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/exception/LdapConnectionTimeOutException.java?rev=1743346&view=auto ============================================================================== --- directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/exception/LdapConnectionTimeOutException.java (added) +++ directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/exception/LdapConnectionTimeOutException.java Wed May 11 12:27:11 2016 @@ -0,0 +1,67 @@ +/* + * 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.directory.ldap.client.api.exception; + + +import org.apache.directory.api.ldap.model.exception.LdapException; + + +/** + * A LdapConnectionTimeOutException is thrown if there is an connection time-out + * situation. + * @author Apache Directory Project + */ +public class LdapConnectionTimeOutException extends LdapException +{ + /** The serialVersionUID. */ + static final long serialVersionUID = 1L; + + + /** + * Instantiates a new connection timeout exception. + */ + public LdapConnectionTimeOutException() + { + super(); + } + + + /** + * Instantiates a new connection timeout exception. + * + * @param explanation the explanation + */ + public LdapConnectionTimeOutException( String explanation ) + { + super( explanation ); + } + + + /** + * Instantiates a new connection timeout exception. + * + * @param explanation the explanation + * @param cause The root cause for this exception + */ + public LdapConnectionTimeOutException( String explanation, Throwable cause ) + { + super( explanation, cause ); + } +}