directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1235326 [28/28] - in /directory/apacheds/trunk: jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/ jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/ jdbm-partitio...
Date Tue, 24 Jan 2012 16:15:29 GMT
Modified: directory/apacheds/trunk/protocol-ntp/src/test/java/org/apache/directory/server/ntp/NtpITest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ntp/src/test/java/org/apache/directory/server/ntp/NtpITest.java?rev=1235326&r1=1235325&r2=1235326&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ntp/src/test/java/org/apache/directory/server/ntp/NtpITest.java
(original)
+++ directory/apacheds/trunk/protocol-ntp/src/test/java/org/apache/directory/server/ntp/NtpITest.java
Tue Jan 24 16:15:05 2012
@@ -74,7 +74,8 @@ public class NtpITest
      * @throws Exception if there are errors
      */
     @Test
-    @Ignore // Fails with a timeout !!!
+    @Ignore
+    // Fails with a timeout !!!
     public void testNtp() throws Exception
     {
         InetAddress host = InetAddress.getByName( null );

Modified: directory/apacheds/trunk/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/AbstractProtocolService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/AbstractProtocolService.java?rev=1235326&r1=1235325&r2=1235326&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/AbstractProtocolService.java
(original)
+++ directory/apacheds/trunk/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/AbstractProtocolService.java
Tue Jan 24 16:15:05 2012
@@ -35,21 +35,21 @@ import org.apache.mina.transport.socket.
  */
 public abstract class AbstractProtocolService implements ProtocolService
 {
-    /** A flag set to indicate if the server is started or not */ 
+    /** A flag set to indicate if the server is started or not */
     private boolean started;
-    
+
     /** A flag set to tell if the server is enabled or not */
     private boolean enabled;
-    
+
     /** The server ID */
     private String serviceId;
-    
+
     /** The service name */
     private String serviceName;
-    
+
     /** The service transports. We may have more than one */
     protected Set<Transport> transports = new HashSet<Transport>();
-    
+
 
     /**
      * {@inheritDoc}
@@ -121,14 +121,15 @@ public abstract class AbstractProtocolSe
     {
         this.serviceName = name;
     }
-    
-    
+
+
     /**
      * @return the transport
      */
     public Transport[] getTransports()
     {
-        return transports.toArray( new Transport[]{} );
+        return transports.toArray( new Transport[]
+            {} );
     }
 
 
@@ -138,18 +139,18 @@ public abstract class AbstractProtocolSe
      */
     public void setTransports( Transport... transports )
     {
-        for ( Transport transport : transports ) 
+        for ( Transport transport : transports )
         {
             this.transports.add( transport );
-            
+
             if ( transport.getAcceptor() == null )
             {
                 transport.init();
             }
         }
     }
-    
-    
+
+
     /**
      * Add underlying transports
      * @param transports The transports
@@ -159,21 +160,21 @@ public abstract class AbstractProtocolSe
         for ( Transport transport : transports )
         {
             this.transports.add( transport );
-            
+
             if ( transport.getAcceptor() == null )
             {
                 transport.init();
             }
         }
     }
-    
-    
+
+
     /**
      * {@inheritDoc}
      */
     public DatagramAcceptor getDatagramAcceptor( Transport udpTransport )
     {
-        return (DatagramAcceptor)udpTransport.getAcceptor();
+        return ( DatagramAcceptor ) udpTransport.getAcceptor();
     }
 
 
@@ -182,6 +183,6 @@ public abstract class AbstractProtocolSe
      */
     public SocketAcceptor getSocketAcceptor( Transport tcpTransport )
     {
-        return (SocketAcceptor)tcpTransport.getAcceptor();
+        return ( SocketAcceptor ) tcpTransport.getAcceptor();
     }
 }

Modified: directory/apacheds/trunk/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/DirectoryBackedService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/DirectoryBackedService.java?rev=1235326&r1=1235325&r2=1235326&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/DirectoryBackedService.java
(original)
+++ directory/apacheds/trunk/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/DirectoryBackedService.java
Tue Jan 24 16:15:05 2012
@@ -19,6 +19,7 @@
  */
 package org.apache.directory.server.protocol.shared;
 
+
 import org.apache.directory.server.constants.ServerDNConstants;
 import org.apache.directory.server.core.api.DirectoryService;
 
@@ -37,10 +38,10 @@ public abstract class DirectoryBackedSer
      * search base as a single point of searching the DIT.
      */
     private String searchBaseDn = ServerDNConstants.USER_EXAMPLE_COM_DN;
-    
+
     /** determines if the search base is pointer to a catalog or a single entry point */
     private boolean catelogBased;
-    
+
     /** directory service core where protocol data is backed */
     private DirectoryService directoryService;
 

Modified: directory/apacheds/trunk/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/StandardThreadPool.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/StandardThreadPool.java?rev=1235326&r1=1235325&r2=1235326&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/StandardThreadPool.java
(original)
+++ directory/apacheds/trunk/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/StandardThreadPool.java
Tue Jan 24 16:15:05 2012
@@ -17,14 +17,15 @@
  * under the License.
  */
 
-
 package org.apache.directory.server.protocol.shared;
 
+
 import java.util.concurrent.Executor;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
 import java.util.concurrent.TimeUnit;
 
+
 /**
  * @todo : Missing Javadoc
  */
@@ -39,18 +40,20 @@ public class StandardThreadPool implemen
         delegate = Executors.newFixedThreadPool( maxThreads );
     }
 
+
     public void execute( Runnable command )
     {
         delegate.execute( command );
     }
 
+
     /**
      * TODO wont this hang if some tasks are sufficiently badly behaved?
      */
     public void stop()
     {
         delegate.shutdown();
-        for ( ; ; )
+        for ( ;; )
         {
             try
             {

Modified: directory/apacheds/trunk/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/TransportProtocol.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/TransportProtocol.java?rev=1235326&r1=1235325&r2=1235326&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/TransportProtocol.java
(original)
+++ directory/apacheds/trunk/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/TransportProtocol.java
Tue Jan 24 16:15:05 2012
@@ -26,8 +26,7 @@ package org.apache.directory.server.prot
  */
 public enum TransportProtocol
 {
-    TCP( 0, "TCP" ), UDP( 1, "UDP" );
-
+    TCP(0, "TCP"), UDP(1, "UDP");
 
     private final int intValue;
     private final String stringValue;

Modified: directory/apacheds/trunk/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/catalog/GetCatalog.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/catalog/GetCatalog.java?rev=1235326&r1=1235325&r2=1235326&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/catalog/GetCatalog.java
(original)
+++ directory/apacheds/trunk/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/catalog/GetCatalog.java
Tue Jan 24 16:15:05 2012
@@ -50,37 +50,36 @@ public class GetCatalog implements Direc
     {
         String filter = "(objectClass=" + ApacheSchemaConstants.APACHE_CATALOG_ENTRY_OC +
")";
 
-        EntryFilteringCursor list = session.search( 
+        EntryFilteringCursor list = session.search(
             Dn.ROOT_DSE,
-            SearchScope.SUBTREE, 
-            FilterParser.parse(session.getDirectoryService().getSchemaManager(), filter),
+            SearchScope.SUBTREE,
+            FilterParser.parse( session.getDirectoryService().getSchemaManager(), filter
),
             AliasDerefMode.DEREF_ALWAYS,
             null );
 
         Map<String, String> catalog = new HashMap<String, String>();
 
         list.beforeFirst();
-        
+
         while ( list.next() )
         {
             Entry result = list.get();
 
             String name = null;
             Attribute attribute = result.get( ApacheSchemaConstants.APACHE_CATALOGUE_ENTRY_NAME_AT
);
-            
+
             if ( attribute != null )
             {
                 name = attribute.getString();
             }
-            
+
             String basedn = null;
             attribute = result.get( ApacheSchemaConstants.APACHE_CATALOGUE_ENTRY_BASE_DN_AT
);
-            
+
             if ( attribute != null )
             {
                 basedn = attribute.getString();
             }
-            
 
             catalog.put( name, basedn );
         }

Modified: directory/apacheds/trunk/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/store/LdifFileLoader.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/store/LdifFileLoader.java?rev=1235326&r1=1235325&r2=1235326&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/store/LdifFileLoader.java
(original)
+++ directory/apacheds/trunk/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/store/LdifFileLoader.java
Tue Jan 24 16:15:05 2012
@@ -107,7 +107,8 @@ public class LdifFileLoader
      * @param filters
      * @param loader
      */
-    public LdifFileLoader( CoreSession coreSession, File ldif, List<? extends LdifLoadFilter>
filters, ClassLoader loader )
+    public LdifFileLoader( CoreSession coreSession, File ldif, List<? extends LdifLoadFilter>
filters,
+        ClassLoader loader )
     {
         this.coreSession = coreSession;
         this.ldif = ldif;
@@ -116,7 +117,8 @@ public class LdifFileLoader
         if ( filters == null )
         {
             this.filters = Collections.emptyList();
-        } else
+        }
+        else
         {
             this.filters = Collections.unmodifiableList( filters );
         }
@@ -174,7 +176,7 @@ public class LdifFileLoader
         {
             in = getLdifStream();
 
-            for ( LdifEntry ldifEntry:new LdifReader( in ) )
+            for ( LdifEntry ldifEntry : new LdifReader( in ) )
             {
                 Dn dn = ldifEntry.getDn();
 
@@ -197,22 +199,23 @@ public class LdifFileLoader
                     {
                         try
                         {
-                            coreSession.add( 
+                            coreSession.add(
                                 new DefaultEntry(
-                                    coreSession.getDirectoryService().getSchemaManager(),
entry ) ); 
-                           count++;
+                                    coreSession.getDirectoryService().getSchemaManager(),
entry ) );
+                            count++;
                             log.info( "Created {}.", dn );
-                        } 
+                        }
                         catch ( LdapException e1 )
                         {
                             log.info( "Could not create entry " + entry, e1 );
                         }
                     }
-                } else
+                }
+                else
                 {
                     //modify
                     List<Modification> items = ldifEntry.getModifications();
-                    
+
                     try
                     {
                         coreSession.modify( dn, items );
@@ -265,7 +268,8 @@ public class LdifFileLoader
         if ( ldif.exists() )
         {
             in = new FileInputStream( ldif );
-        } else
+        }
+        else
         {
             if ( loader != null && ( in = loader.getResourceAsStream( ldif.getName()
) ) != null )
             {

Modified: directory/apacheds/trunk/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/transport/AbstractTransport.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/transport/AbstractTransport.java?rev=1235326&r1=1235325&r2=1235326&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/transport/AbstractTransport.java
(original)
+++ directory/apacheds/trunk/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/transport/AbstractTransport.java
Tue Jan 24 16:15:05 2012
@@ -21,35 +21,37 @@ package org.apache.directory.server.prot
 
 import org.apache.mina.core.service.IoAcceptor;
 
+
 public abstract class AbstractTransport implements Transport
 {
     /** The server address */
     private String address;
-    
+
     /** The service's port */
     private int port = -1;
-    
+
     /** A flag set if SSL is enabled */
     private boolean sslEnabled = false;
-    
+
     /** The number of threads to use for the IoAcceptor executor */
     private int nbThreads;
-    
+
     /** The backlog for the transport services */
     private int backlog;
-    
+
     /** The IoAcceptor used to accept requests */
     protected IoAcceptor acceptor;
-    
+
     /** The default backlog queue size */
     protected static final int DEFAULT_BACKLOG_NB = 50;
-    
+
     /** The default hostname */
     protected static final String LOCAL_HOST = "localhost";
-    
+
     /** The default number of threads */
     protected static final int DEFAULT_NB_THREADS = 3;
 
+
     /**
      * Creates an instance of an Abstract Transport class.
      */
@@ -60,8 +62,8 @@ public abstract class AbstractTransport 
         port = -1;
         backlog = DEFAULT_BACKLOG_NB;
     }
-    
-    
+
+
     /**
      * Creates an instance of an Abstract Transport class, using localhost
      * and port.
@@ -70,11 +72,11 @@ public abstract class AbstractTransport 
      */
     public AbstractTransport( int port )
     {
-       this.address = "localhost";
-       this.port = port;
+        this.address = "localhost";
+        this.port = port;
     }
-    
-    
+
+
     /**
      * Creates an instance of an Abstract Transport class, using localhost
      * and port.
@@ -84,12 +86,12 @@ public abstract class AbstractTransport 
      */
     public AbstractTransport( int port, int nbThreads )
     {
-       this.address = "localhost";
-       this.port = port;
-       this.nbThreads = nbThreads;
+        this.address = "localhost";
+        this.port = port;
+        this.nbThreads = nbThreads;
     }
-    
-    
+
+
     /**
      * Creates an instance of an Abstract Transport class, using the given address
      * and port.
@@ -99,11 +101,11 @@ public abstract class AbstractTransport 
      */
     public AbstractTransport( String address, int port )
     {
-       this.address = address;
-       this.port = port;
+        this.address = address;
+        this.port = port;
     }
-    
-    
+
+
     /**
      * Creates an instance of the AbstractTransport class on LocalHost
      * @param port The port
@@ -113,13 +115,13 @@ public abstract class AbstractTransport 
      */
     public AbstractTransport( int port, int nbThreads, int backLog )
     {
-        this.address ="localHost";
+        this.address = "localHost";
         this.port = port;
         this.nbThreads = nbThreads;
         this.backlog = backLog;
     }
-    
-    
+
+
     /**
      * Creates an instance of the AbstractTransport class 
      * @param address The address
@@ -135,14 +137,14 @@ public abstract class AbstractTransport 
         this.nbThreads = nbThreads;
         this.backlog = backLog;
     }
-    
-    
+
+
     /**
      * Initialize the Acceptor if needed
      */
     public abstract void init();
 
-    
+
     /**
      * {@inheritDoc}
      */
@@ -150,8 +152,8 @@ public abstract class AbstractTransport 
     {
         return port;
     }
-    
-    
+
+
     /**
      * {@inheritDoc}
      */
@@ -159,8 +161,8 @@ public abstract class AbstractTransport 
     {
         this.port = port;
     }
-    
-    
+
+
     /**
      * {@inheritDoc}
      */
@@ -168,8 +170,8 @@ public abstract class AbstractTransport 
     {
         return address;
     }
-    
-    
+
+
     /**
      * Stores the Address in this transport
      * 
@@ -179,23 +181,23 @@ public abstract class AbstractTransport 
     {
         this.address = address;
     }
-    
-    
+
+
     /**
      * {@inheritDoc}
      */
     public abstract IoAcceptor getAcceptor();
-    
-    
+
+
     /**
      * {@inheritDoc}
      */
-    public int getNbThreads() 
+    public int getNbThreads()
     {
         return nbThreads;
     }
-    
-    
+
+
     /**
      * {@inheritDoc}
      */
@@ -203,8 +205,8 @@ public abstract class AbstractTransport 
     {
         this.nbThreads = nbThreads;
     }
-    
-    
+
+
     /**
      * {@inheritDoc}
      */
@@ -212,8 +214,8 @@ public abstract class AbstractTransport 
     {
         return backlog;
     }
-    
-    
+
+
     /**
      * {@inheritDoc}
      */
@@ -221,8 +223,8 @@ public abstract class AbstractTransport 
     {
         this.backlog = backLog;
     }
-    
-    
+
+
     /**
      * Enable or disable SSL
      * @param sslEnabled if <code>true</code>, SSL is enabled.
@@ -231,8 +233,8 @@ public abstract class AbstractTransport 
     {
         this.sslEnabled = sslEnabled;
     }
-    
-    
+
+
     /**
      * Enable or disable SSL
      * @param sslEnabled if <code>true</code>, SSL is enabled.
@@ -241,8 +243,8 @@ public abstract class AbstractTransport 
     {
         this.sslEnabled = sslEnabled;
     }
-    
-    
+
+
     /**
      * @return <code>true</code> id SSL is enabled for this transport
      */
@@ -251,6 +253,7 @@ public abstract class AbstractTransport 
         return sslEnabled;
     }
 
+
     /**
      * @return  <code>true</code> id SSL is enabled for this transport
      */
@@ -258,8 +261,8 @@ public abstract class AbstractTransport 
     {
         return sslEnabled;
     }
-    
-    
+
+
     /**
      * @see Object#toString()
      */
@@ -269,14 +272,14 @@ public abstract class AbstractTransport 
         sb.append( "[<" ).append( address ).append( ':' ).append( port );
         sb.append( ">], backlog=" ).append( backlog );
         sb.append( ", nbThreads = " ).append( nbThreads );
-        
+
         if ( sslEnabled )
         {
             sb.append( ", SSL" );
         }
-        
+
         sb.append( ']' );
-        
-        return sb.toString() ;
+
+        return sb.toString();
     }
 }

Modified: directory/apacheds/trunk/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/transport/TcpTransport.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/transport/TcpTransport.java?rev=1235326&r1=1235325&r2=1235326&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/transport/TcpTransport.java
(original)
+++ directory/apacheds/trunk/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/transport/TcpTransport.java
Tue Jan 24 16:15:05 2012
@@ -18,6 +18,7 @@
  */
 package org.apache.directory.server.protocol.shared.transport;
 
+
 import java.net.InetSocketAddress;
 
 import org.apache.mina.core.service.IoAcceptor;
@@ -26,6 +27,7 @@ import org.apache.mina.transport.socket.
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+
 /**
  * @todo : missing javadoc
  * 
@@ -36,6 +38,7 @@ public class TcpTransport extends Abstra
     /** A logger for this class */
     private static final Logger LOG = LoggerFactory.getLogger( TcpTransport.class );
 
+
     /**
      * Creates an instance of the TcpTransport class 
      */
@@ -43,8 +46,8 @@ public class TcpTransport extends Abstra
     {
         super();
     }
-    
-    
+
+
     /**
      * Creates an instance of the TcpTransport class on localhost
      * @param tcpPort The port
@@ -52,13 +55,13 @@ public class TcpTransport extends Abstra
     public TcpTransport( int tcpPort )
     {
         super( null, tcpPort, DEFAULT_NB_THREADS, DEFAULT_BACKLOG_NB );
-        
+
         this.acceptor = createAcceptor( null, tcpPort, DEFAULT_NB_THREADS, DEFAULT_BACKLOG_NB
);
-        
+
         LOG.debug( "TCP Transport created : <*:{},>", tcpPort );
     }
-    
-    
+
+
     /**
      * Creates an instance of the TcpTransport class on localhost
      * @param tcpPort The port
@@ -67,13 +70,13 @@ public class TcpTransport extends Abstra
     public TcpTransport( int tcpPort, int nbThreads )
     {
         super( null, tcpPort, nbThreads, DEFAULT_BACKLOG_NB );
-        
+
         this.acceptor = createAcceptor( null, tcpPort, nbThreads, DEFAULT_BACKLOG_NB );
-        
+
         LOG.debug( "TCP Transport created : <*:{},>", tcpPort );
     }
-    
-    
+
+
     /**
      * Creates an instance of the TcpTransport class 
      * @param address The address
@@ -86,8 +89,8 @@ public class TcpTransport extends Abstra
 
         LOG.debug( "TCP Transport created : <{}:{}>", address, tcpPort );
     }
-    
-    
+
+
     /**
      * Creates an instance of the TcpTransport class on localhost
      * @param tcpPort The port
@@ -102,8 +105,8 @@ public class TcpTransport extends Abstra
 
         LOG.debug( "TCP Transport created : <*:{},>", tcpPort );
     }
-    
-    
+
+
     /**
      * Creates an instance of the TcpTransport class 
      * @param address The address
@@ -119,8 +122,8 @@ public class TcpTransport extends Abstra
 
         LOG.debug( "TCP Transport created : <{}:{},>", address, tcpPort );
     }
-    
-    
+
+
     /**
      * Initialize the Acceptor if needed
      */
@@ -128,8 +131,8 @@ public class TcpTransport extends Abstra
     {
         acceptor = createAcceptor( getAddress(), getPort(), getNbThreads(), getBackLog()
);
     }
-    
-    
+
+
     /**
      * Helper method to create an IoAcceptor
      */
@@ -138,9 +141,9 @@ public class TcpTransport extends Abstra
         NioSocketAcceptor acceptor = new NioSocketAcceptor( nbThreads );
         acceptor.setReuseAddress( true );
         acceptor.setBacklog( backLog );
-        
+
         InetSocketAddress socketAddress = null;
-        
+
         // The address can be null here, if one want to connect using the wildcard address
         if ( address == null )
         {
@@ -149,29 +152,29 @@ public class TcpTransport extends Abstra
         }
         else
         {
-             socketAddress = new InetSocketAddress( address, port );
+            socketAddress = new InetSocketAddress( address, port );
         }
-        
+
         acceptor.setDefaultLocalAddress( socketAddress );
-        
+
         return acceptor;
     }
-    
-    
+
+
     /**
      * @return The associated SocketAcceptor
      */
     public SocketAcceptor getAcceptor()
     {
-        if( ( acceptor != null ) && acceptor.isDisposed() )
+        if ( ( acceptor != null ) && acceptor.isDisposed() )
         {
             acceptor = createAcceptor( getAddress(), getPort(), getNbThreads(), getBackLog()
);
         }
 
-        return acceptor == null ? null : (SocketAcceptor)acceptor;
+        return acceptor == null ? null : ( SocketAcceptor ) acceptor;
     }
-    
-    
+
+
     /**
      * @see Object#toString()
      */

Modified: directory/apacheds/trunk/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/transport/Transport.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/transport/Transport.java?rev=1235326&r1=1235325&r2=1235326&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/transport/Transport.java
(original)
+++ directory/apacheds/trunk/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/transport/Transport.java
Tue Jan 24 16:15:05 2012
@@ -18,8 +18,10 @@
  */
 package org.apache.directory.server.protocol.shared.transport;
 
+
 import org.apache.mina.core.service.IoAcceptor;
 
+
 public interface Transport
 {
     /**
@@ -27,27 +29,28 @@ public interface Transport
      */
     void init();
 
+
     /**
      * @return The associated Address
      */
     String getAddress();
-    
-    
+
+
     /**
      * Set the InetAddress for this transport.
      * @param address The address to set
      */
     void setAddress( String address );
-    
-    
+
+
     /**
      * Gets the port for this service.
      *
      * @return the port for this service
      */
     int getPort();
-    
-    
+
+
     /**
      * Sets the port for this service.
      *
@@ -55,56 +58,56 @@ public interface Transport
      * @throws IllegalArgumentException if the port number is not within a valid range
      */
     void setPort( int port );
-    
-    
+
+
     /**
      * @return The associated IoAcceptor
      */
     IoAcceptor getAcceptor();
-    
-    
+
+
     /**
      * @return The number of processing threads for this acceptor
      */
-    int getNbThreads(); 
-    
-    
+    int getNbThreads();
+
+
     /**
      * Set the number of processing threads for the acceptor
      * @param nbThreads The number of threads to create in the acceptor
      */
     void setNbThreads( int nbThreads );
-    
-    
+
+
     /**
      * @return The number of messages stored into the backlog when the 
      * acceptor is being busy processing the current messages
      */
     int getBackLog();
-    
-    
+
+
     /**
      * Set the size of the messages queue waiting for the acceptor to
      * be ready.
      * @param backLog The queue size
      */
     void setBackLog( int backLog );
-    
-    
+
+
     /**
      * Enable or disable SSL
      * @param sslEnabled if <code>true</code>, SSL is enabled.
      */
     void setEnableSSL( boolean sslEnabled );
-    
-    
+
+
     /**
      * Enable or disable SSL
      * @param sslEnabled if <code>true</code>, SSL is enabled.
      */
     void enableSSL( boolean sslEnabled );
-    
-    
+
+
     /**
      * @return <code>true</code> id SSL is enabled for this transport
      */

Modified: directory/apacheds/trunk/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/transport/UdpTransport.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/transport/UdpTransport.java?rev=1235326&r1=1235325&r2=1235326&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/transport/UdpTransport.java
(original)
+++ directory/apacheds/trunk/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/transport/UdpTransport.java
Tue Jan 24 16:15:05 2012
@@ -18,6 +18,7 @@
  */
 package org.apache.directory.server.protocol.shared.transport;
 
+
 import java.net.InetSocketAddress;
 
 import org.apache.mina.core.service.IoAcceptor;
@@ -26,6 +27,7 @@ import org.apache.mina.transport.socket.
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+
 /**
  * @todo : Missing Javadoc
  * 
@@ -36,6 +38,7 @@ public class UdpTransport extends Abstra
     /** A logger for this class */
     private static final Logger LOG = LoggerFactory.getLogger( UdpTransport.class );
 
+
     /**
      * Creates an instance of the UdpTransport class 
      */
@@ -43,8 +46,8 @@ public class UdpTransport extends Abstra
     {
         super();
     }
-    
-    
+
+
     /**
      * Creates an instance of the UdpTransport class on localhost
      * @param udpPort The port
@@ -52,13 +55,13 @@ public class UdpTransport extends Abstra
     public UdpTransport( int udpPort )
     {
         super( udpPort );
-        
+
         this.acceptor = createAcceptor( null, udpPort );
-        
+
         LOG.debug( "UDP Transport created : <*:{},>", udpPort );
     }
-    
-    
+
+
     /**
      * Creates an instance of the UdpTransport class 
      * @param address The address
@@ -67,13 +70,13 @@ public class UdpTransport extends Abstra
     public UdpTransport( String address, int udpPort )
     {
         super( address, udpPort );
-        
+
         this.acceptor = createAcceptor( address, udpPort );
 
         LOG.debug( "UDP Transport created : <{}:{},>", address, udpPort );
     }
-    
-    
+
+
     /**
      * Initialize the Acceptor if needed
      */
@@ -83,30 +86,30 @@ public class UdpTransport extends Abstra
         LOG.debug( "UDP Transport created : <{}:{},>", getAddress(), getPort() );
     }
 
-    
+
     /**
      * @return The associated DatagramAcceptor
      */
     public DatagramAcceptor getAcceptor()
     {
-        if( ( acceptor != null ) && acceptor.isDisposed() )
+        if ( ( acceptor != null ) && acceptor.isDisposed() )
         {
             acceptor = createAcceptor( getAddress(), getPort() );
         }
-        
-        return acceptor == null ? null : (DatagramAcceptor)acceptor;
+
+        return acceptor == null ? null : ( DatagramAcceptor ) acceptor;
     }
-    
-    
+
+
     /**
      * Helper method to create an IoAcceptor
      */
     private IoAcceptor createAcceptor( String address, int port )
     {
         NioDatagramAcceptor acceptor = new NioDatagramAcceptor();
-        
-        InetSocketAddress socketAddress =  null;
-        
+
+        InetSocketAddress socketAddress = null;
+
         // The address can be null here, if one want to connect using the wildcard address
         if ( address == null )
         {
@@ -117,13 +120,13 @@ public class UdpTransport extends Abstra
         {
             socketAddress = new InetSocketAddress( address, port );
         }
-        
+
         acceptor.setDefaultLocalAddress( socketAddress );
-        
+
         return acceptor;
     }
-    
-    
+
+
     /**
      * @see Object#toString()
      */



Mime
View raw message