You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by se...@apache.org on 2016/05/11 12:27:11 UTC
svn commit: r1743346 - in
/directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api:
SearchCursorImpl.java exception/LdapConnectionTimeOutException.java
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 <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+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 );
+ }
+}