directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lucasthei...@apache.org
Subject svn commit: r1561324 - in /directory: apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/ shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/
Date Sat, 25 Jan 2014 15:31:24 GMT
Author: lucastheisen
Date: Sat Jan 25 15:31:23 2014
New Revision: 1561324

URL: http://svn.apache.org/r1561324
Log:
DIRAPI-167: Make LdapConnection extend java.io.Closeable

Modified:
    directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/LdapCoreSessionConnection.java
    directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapConnection.java
    directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java

Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/LdapCoreSessionConnection.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/LdapCoreSessionConnection.java?rev=1561324&r1=1561323&r2=1561324&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/LdapCoreSessionConnection.java
(original)
+++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/api/LdapCoreSessionConnection.java
Sat Jan 25 15:31:23 2014
@@ -134,7 +134,7 @@ public class LdapCoreSessionConnection e
     /**
      * {@inheritDoc}
      */
-    public boolean close() throws IOException
+    public void close() throws IOException
     {
         try
         {
@@ -146,8 +146,6 @@ public class LdapCoreSessionConnection e
             ioe.initCause( e );
             throw ioe;
         }
-
-        return true;
     }
 
 

Modified: directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapConnection.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapConnection.java?rev=1561324&r1=1561323&r2=1561324&view=diff
==============================================================================
--- directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapConnection.java
(original)
+++ directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapConnection.java
Sat Jan 25 15:31:23 2014
@@ -20,9 +20,11 @@
 package org.apache.directory.ldap.client.api;
 
 
+import java.io.Closeable;
 import java.io.IOException;
 import java.util.List;
 
+
 import org.apache.directory.api.asn1.util.Oid;
 import org.apache.directory.api.ldap.codec.api.BinaryAttributeDetector;
 import org.apache.directory.api.ldap.codec.api.LdapApiService;
@@ -69,7 +71,7 @@ import org.apache.directory.api.ldap.mod
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public interface LdapConnection
+public interface LdapConnection extends Closeable
 {
     /**
      * Check if we are connected.
@@ -99,10 +101,9 @@ public interface LdapConnection
     /**
      * Disconnect from the remote LDAP server.
      *
-     * @return <code>true</code> if the connection is closed, false otherwise
      * @throws IOException if some I/O error occurs
      */
-    boolean close() throws IOException;
+    void close() throws IOException;
 
 
     //------------------------ The LDAP operations ------------------------//

Modified: directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java?rev=1561324&r1=1561323&r2=1561324&view=diff
==============================================================================
--- directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java
(original)
+++ directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java
Sat Jan 25 15:31:23 2014
@@ -22,6 +22,7 @@ package org.apache.directory.ldap.client
 
 import static org.apache.directory.api.ldap.model.message.ResultCodeEnum.processResponse;
 
+
 import java.io.File;
 import java.io.FileWriter;
 import java.io.IOException;
@@ -41,6 +42,7 @@ import java.util.concurrent.TimeoutExcep
 import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.concurrent.locks.ReentrantLock;
 
+
 import javax.net.ssl.SSLContext;
 import javax.security.auth.Subject;
 import javax.security.auth.login.Configuration;
@@ -48,6 +50,7 @@ import javax.security.auth.login.LoginCo
 import javax.security.sasl.Sasl;
 import javax.security.sasl.SaslClient;
 
+
 import org.apache.directory.api.asn1.DecoderException;
 import org.apache.directory.api.asn1.util.Oid;
 import org.apache.directory.api.ldap.codec.api.BinaryAttributeDetector;
@@ -688,7 +691,7 @@ public class LdapNetworkConnection exten
     /**
      * {@inheritDoc}
      */
-    public boolean close() throws IOException
+    public void close() throws IOException
     {
         // Close the session
         if ( ( ldapSession != null ) && connected.get() )
@@ -716,8 +719,6 @@ public class LdapNetworkConnection exten
 
         // Reset the messageId
         messageId.set( 0 );
-
-        return true;
     }
 
 



Mime
View raw message