directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1393968 - /directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java
Date Thu, 04 Oct 2012 09:26:24 GMT
Author: elecharny
Date: Thu Oct  4 09:26:23 2012
New Revision: 1393968

URL: http://svn.apache.org/viewvc?rev=1393968&view=rev
Log:
Using only one IoProcessor for the connector. We don't need more.

Modified:
    directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java

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=1393968&r1=1393967&r2=1393968&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
Thu Oct  4 09:26:23 2012
@@ -355,7 +355,7 @@ public class LdapNetworkConnection exten
     {
         super();
         this.config = config;
-        
+
         if ( config.getBinaryAttributeDetector() == null )
         {
             config.setBinaryAttributeDetector( new DefaultConfigurableBinaryAttributeDetector()
);
@@ -498,7 +498,8 @@ public class LdapNetworkConnection exten
         // Create the connector if needed
         if ( connector == null )
         {
-            connector = new NioSocketConnector();
+            // Use only one thead inside the connector
+            connector = new NioSocketConnector( 1 );
 
             // Add the codec to the chain
             connector.getFilterChain().addLast( "ldapCodec", ldapProtocolFilter );
@@ -641,8 +642,9 @@ public class LdapNetworkConnection exten
 
         // Store the container into the session if we don't have one
         LdapMessageContainer<MessageDecorator<? extends Message>> container =
-            (LdapMessageContainer<MessageDecorator<? extends Message>>)ldapSession.getAttribute(
LdapDecoder.MESSAGE_CONTAINER_ATTR );
-        
+            ( LdapMessageContainer<MessageDecorator<? extends Message>> ) ldapSession
+                .getAttribute( LdapDecoder.MESSAGE_CONTAINER_ATTR );
+
         if ( container == null )
         {
             ldapSession.setAttribute( LdapDecoder.MESSAGE_CONTAINER_ATTR,
@@ -1134,6 +1136,8 @@ public class LdapNetworkConnection exten
     {
         return createBindRequest( name.getName(), credentials, null, ( Control[] ) null );
     }
+
+
     /**
      * {@inheritDoc}
      */
@@ -3231,6 +3235,8 @@ public class LdapNetworkConnection exten
     {
         loadSchema( new DefaultSchemaLoader( this ) );
     }
+
+
     /**
      * loads schema using the specified schema loader
      *
@@ -3253,7 +3259,7 @@ public class LdapNetworkConnection exten
             }
 
             schemaManager = tmp;
-            
+
             // Change the container's BinaryDetector
             ldapSession.setAttribute( LdapDecoder.MESSAGE_CONTAINER_ATTR,
                 new LdapMessageContainer<MessageDecorator<? extends Message>>(
codec,



Mime
View raw message