directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r723050 - in /directory/apacheds/branches/apacheds-mina2/protocol-kerberos/src: main/java/org/apache/directory/server/kerberos/kdc/ test/java/org/apache/directory/server/kerberos/protocol/
Date Wed, 03 Dec 2008 20:06:44 GMT
Author: elecharny
Date: Wed Dec  3 12:06:43 2008
New Revision: 723050

URL: http://svn.apache.org/viewvc?rev=723050&view=rev
Log:
Replaced tabs by 4 spaces.
Removed dead code and useless imports.

Modified:
    directory/apacheds/branches/apacheds-mina2/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/KdcServer.java
    directory/apacheds/branches/apacheds-mina2/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/protocol/AbstractAuthenticationServiceTest.java
    directory/apacheds/branches/apacheds-mina2/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/protocol/AbstractTicketGrantingServiceTest.java

Modified: directory/apacheds/branches/apacheds-mina2/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/KdcServer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-mina2/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/KdcServer.java?rev=723050&r1=723049&r2=723050&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-mina2/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/KdcServer.java
(original)
+++ directory/apacheds/branches/apacheds-mina2/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/KdcServer.java
Wed Dec  3 12:06:43 2008
@@ -443,73 +443,73 @@
         // Kerberos can use UDP or TCP
         if ( getUdpPort() != -1 )
         {
-        	// Actually, this is not used for Datagram. But it should !
-        	int nbUdpThreads = getNbUdpThreads();
-        	
-        	// Create the acceptor
-        	DatagramAcceptor udpAcceptor = new NioDatagramAcceptor();
-        	
-        	// Stores it
-        	setDatagramAcceptor( udpAcceptor );
-        	
-        	// Now, configure the acceptor
-        	// Inject the chain
+            // Actually, this is not used for Datagram. But it should !
+            int nbUdpThreads = getNbUdpThreads();
+            
+            // Create the acceptor
+            DatagramAcceptor udpAcceptor = new NioDatagramAcceptor();
+            
+            // Stores it
+            setDatagramAcceptor( udpAcceptor );
+            
+            // Now, configure the acceptor
+            // Inject the chain
             IoFilterChainBuilder udpChainBuilder = new DefaultIoFilterChainBuilder();
 
             ((DefaultIoFilterChainBuilder)udpChainBuilder).addFirst( "codec", 
-            		new ProtocolCodecFilter( 
-            				KerberosUdpProtocolCodecFactory.getInstance() ) );
+                    new ProtocolCodecFilter( 
+                            KerberosUdpProtocolCodecFactory.getInstance() ) );
 
-        	udpAcceptor.setFilterChainBuilder( udpChainBuilder );
-        	
-        	// Inject the protocol handler
-        	udpAcceptor.setHandler( new KerberosProtocolHandler( this, store ) );
-        	
-        	// Bind to the configured address
-        	udpAcceptor.bind( new InetSocketAddress( getUdpPort() ) );
+            udpAcceptor.setFilterChainBuilder( udpChainBuilder );
+            
+            // Inject the protocol handler
+            udpAcceptor.setHandler( new KerberosProtocolHandler( this, store ) );
+            
+            // Bind to the configured address
+            udpAcceptor.bind( new InetSocketAddress( getUdpPort() ) );
         }
 
         if ( getTcpPort() != -1 )
         {
-        	// First, create the acceptor with the configured number of threads (if defined)
-        	int nbTcpThreads = getNbTcpThreads();
-        	SocketAcceptor tcpAcceptor;
-        	
-        	if ( nbTcpThreads > 0 )
-        	{
-        		tcpAcceptor = new NioSocketAcceptor( nbTcpThreads );
-        	}
-        	else
-        	{
-        		tcpAcceptor = new NioSocketAcceptor();
-        	}
-        		
-        	setSocketAcceptor( tcpAcceptor );
-        	
-        	// Now, configure the acceptor
+            // First, create the acceptor with the configured number of threads (if defined)
+            int nbTcpThreads = getNbTcpThreads();
+            SocketAcceptor tcpAcceptor;
+            
+            if ( nbTcpThreads > 0 )
+            {
+                tcpAcceptor = new NioSocketAcceptor( nbTcpThreads );
+            }
+            else
+            {
+                tcpAcceptor = new NioSocketAcceptor();
+            }
+                
+            setSocketAcceptor( tcpAcceptor );
+            
+            // Now, configure the acceptor
             // Disable the disconnection of the clients on unbind
-        	tcpAcceptor.setCloseOnDeactivation( false );
-        	
-        	// No Nagle's algorithm
-        	tcpAcceptor.getSessionConfig().setTcpNoDelay( true );
-        	
-        	// Allow the port to be reused even if the socket is in TIME_WAIT state
-        	tcpAcceptor.setReuseAddress( true );
-        	
-        	// Inject the chain
+            tcpAcceptor.setCloseOnDeactivation( false );
+            
+            // No Nagle's algorithm
+            tcpAcceptor.getSessionConfig().setTcpNoDelay( true );
+            
+            // Allow the port to be reused even if the socket is in TIME_WAIT state
+            tcpAcceptor.setReuseAddress( true );
+            
+            // Inject the chain
             IoFilterChainBuilder tcpChainBuilder = new DefaultIoFilterChainBuilder();
 
             ((DefaultIoFilterChainBuilder)tcpChainBuilder).addFirst( "codec", 
-            		new ProtocolCodecFilter( 
-            				KerberosTcpProtocolCodecFactory.getInstance() ) );
+                    new ProtocolCodecFilter( 
+                            KerberosTcpProtocolCodecFactory.getInstance() ) );
 
-        	tcpAcceptor.setFilterChainBuilder( tcpChainBuilder );
-        	
-        	// Inject the protocol handler
-        	tcpAcceptor.setHandler( new KerberosProtocolHandler( this, store ) );
-        	
-        	// Bind to the configured address
-        	tcpAcceptor.bind( new InetSocketAddress( getTcpPort() ) );
+            tcpAcceptor.setFilterChainBuilder( tcpChainBuilder );
+            
+            // Inject the protocol handler
+            tcpAcceptor.setHandler( new KerberosProtocolHandler( this, store ) );
+            
+            // Bind to the configured address
+            tcpAcceptor.bind( new InetSocketAddress( getTcpPort() ) );
         }
         
         LOG.info( "Kerberos service started." );

Modified: directory/apacheds/branches/apacheds-mina2/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/protocol/AbstractAuthenticationServiceTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-mina2/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/protocol/AbstractAuthenticationServiceTest.java?rev=723050&r1=723049&r2=723050&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-mina2/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/protocol/AbstractAuthenticationServiceTest.java
(original)
+++ directory/apacheds/branches/apacheds-mina2/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/protocol/AbstractAuthenticationServiceTest.java
Wed Dec  3 12:06:43 2008
@@ -39,15 +39,11 @@
 import org.apache.directory.server.kerberos.shared.messages.value.PrincipalName;
 import org.apache.directory.server.kerberos.shared.messages.value.types.PaDataType;
 import org.apache.directory.server.kerberos.shared.messages.value.types.PrincipalNameType;
-import org.apache.mina.core.filterchain.IoFilterChain;
 import org.apache.mina.core.future.WriteFuture;
 import org.apache.mina.core.service.IoHandler;
-import org.apache.mina.core.service.IoProcessor;
 import org.apache.mina.core.service.IoService;
-import org.apache.mina.core.service.TransportMetadata;
 import org.apache.mina.core.session.AbstractIoSession;
 import org.apache.mina.core.session.DummySession;
-import org.apache.mina.core.session.IoSession;
 import org.apache.mina.core.session.IoSessionConfig;
 
 
@@ -128,27 +124,27 @@
         
         public KrbDummySession() 
         {
-        	super();
+            super();
         }
         
         public KrbDummySession( IoService service )
         {
-        	try
-        	{
-	            ((AbstractIoSession) this).setAttributeMap(service
-	                    .getSessionDataStructureFactory().getAttributeMap(this));
-        	}
-        	catch( Exception e ) 
-        	{
-        		
-        	}
+            try
+            {
+                ((AbstractIoSession) this).setAttributeMap(service
+                        .getSessionDataStructureFactory().getAttributeMap(this));
+            }
+            catch( Exception e ) 
+            {
+                
+            }
         }
 
         public WriteFuture write( Object message )
         {
-        	this.message = message;
-        	
-        	return null;
+            this.message = message;
+            
+            return null;
         }
 
         protected Object getMessage()

Modified: directory/apacheds/branches/apacheds-mina2/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/protocol/AbstractTicketGrantingServiceTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-mina2/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/protocol/AbstractTicketGrantingServiceTest.java?rev=723050&r1=723049&r2=723050&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-mina2/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/protocol/AbstractTicketGrantingServiceTest.java
(original)
+++ directory/apacheds/branches/apacheds-mina2/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/protocol/AbstractTicketGrantingServiceTest.java
Wed Dec  3 12:06:43 2008
@@ -313,92 +313,4 @@
 
         return principalName;
     }
-
-    /*
-    protected static class DummySession extends AbstractIoSession
-    {
-        Object message;
-
-
-        public IoProcessor<IoSession> getProcessor()
-        {
-            return null;
-        }
-
-
-        protected Object getMessage()
-        {
-            return message;
-        }
-
-
-        protected void updateTrafficMask()
-        {
-            // Do nothing.
-        }
-
-
-        public IoService getService()
-        {
-            return null;
-        }
-
-
-        public IoHandler getHandler()
-        {
-            return null;
-        }
-
-
-        public IoFilterChain getFilterChain()
-        {
-            return null;
-        }
-
-
-        public TransportMetadata getTransportMetadata()
-        {
-            return null;
-        }
-
-
-        public SocketAddress getRemoteAddress()
-        {
-            return new InetSocketAddress( 10088 );
-        }
-
-
-        public SocketAddress getLocalAddress()
-        {
-            return null;
-        }
-
-
-        public IoSessionConfig getConfig()
-        {
-            return null;
-        }
-
-
-        public int getScheduledWriteRequests()
-        {
-            return 0;
-        }
-
-
-        public SocketAddress getServiceAddress()
-        {
-            return null;
-        }
-        
-        public DummySession() {
-	        try {
-	            IoSessionDataStructureFactory factory = new DefaultIoSessionDataStructureFactory();
-	            setAttributeMap(factory.getAttributeMap(this));
-	            setWriteRequestQueue(factory.getWriteRequestQueue(this));
-	        } catch (Exception e) {
-	            throw new InternalError();
-	        }
-        }
-    }*/
 }



Mime
View raw message