directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From erodrig...@apache.org
Subject svn commit: r123626 - incubator/directory/kerberos/trunk/protocol/src/java/org/apache/kerberos/kdc/server/udp
Date Wed, 29 Dec 2004 11:20:48 GMT
Author: erodriguez
Date: Wed Dec 29 03:20:46 2004
New Revision: 123626

URL: http://svn.apache.org/viewcvs?view=rev&rev=123626
Log:
UDP frontend updates for Change Password protocol.
Modified:
   incubator/directory/kerberos/trunk/protocol/src/java/org/apache/kerberos/kdc/server/udp/Connection.java
   incubator/directory/kerberos/trunk/protocol/src/java/org/apache/kerberos/kdc/server/udp/Handler.java
   incubator/directory/kerberos/trunk/protocol/src/java/org/apache/kerberos/kdc/server/udp/Main.java

Modified: incubator/directory/kerberos/trunk/protocol/src/java/org/apache/kerberos/kdc/server/udp/Connection.java
Url: http://svn.apache.org/viewcvs/incubator/directory/kerberos/trunk/protocol/src/java/org/apache/kerberos/kdc/server/udp/Connection.java?view=diff&rev=123626&p1=incubator/directory/kerberos/trunk/protocol/src/java/org/apache/kerberos/kdc/server/udp/Connection.java&r1=123625&p2=incubator/directory/kerberos/trunk/protocol/src/java/org/apache/kerberos/kdc/server/udp/Connection.java&r2=123626
==============================================================================
--- incubator/directory/kerberos/trunk/protocol/src/java/org/apache/kerberos/kdc/server/udp/Connection.java
(original)
+++ incubator/directory/kerberos/trunk/protocol/src/java/org/apache/kerberos/kdc/server/udp/Connection.java
Wed Dec 29 03:20:46 2004
@@ -14,32 +14,37 @@
  *   limitations under the License.
  *
  */
-package org.apache.kerberos.kdc.server.udp;
+package org.apache.kerberos.changepw.server.udp;
 
-import org.apache.kerberos.kdc.*;
+import java.io.IOException;
+import java.net.DatagramPacket;
+import java.net.DatagramSocket;
 
-import java.io.*;
-import java.net.*;
+import org.apache.kerberos.changepw.ChangePasswordDispatcher;
 
-public class Connection implements Runnable {
+public class Connection implements Runnable
+{
 	
-	private DatagramSocket _socket;
-	private DatagramPacket _packet;
-	private KdcDispatcher  _kdc;
+	private DatagramSocket           socket;
+	private DatagramPacket           packet;
+	private ChangePasswordDispatcher dispatcher;
 	
 	private static Handler handler = new Handler();
 	
-	public Connection(DatagramSocket socket, DatagramPacket packet, KdcDispatcher kdc) {
-		_socket = socket;
-		_packet = packet;
-		_kdc    = kdc;
+	public Connection(DatagramSocket socket, DatagramPacket packet, ChangePasswordDispatcher
dispatcher) {
+		this.socket     = socket;
+		this.packet     = packet;
+		this.dispatcher = dispatcher;
 	}
 
-	public void run() { 
-		try {
-			handler.process(_socket, _packet, _kdc);
+	public void run()
+	{ 
+		try
+		{
+			handler.process(socket, packet, dispatcher);
 		}
-		catch (IOException ioe) {
+		catch (IOException ioe)
+		{
 			System.err.println(ioe);
 		}
 	}

Modified: incubator/directory/kerberos/trunk/protocol/src/java/org/apache/kerberos/kdc/server/udp/Handler.java
Url: http://svn.apache.org/viewcvs/incubator/directory/kerberos/trunk/protocol/src/java/org/apache/kerberos/kdc/server/udp/Handler.java?view=diff&rev=123626&p1=incubator/directory/kerberos/trunk/protocol/src/java/org/apache/kerberos/kdc/server/udp/Handler.java&r1=123625&p2=incubator/directory/kerberos/trunk/protocol/src/java/org/apache/kerberos/kdc/server/udp/Handler.java&r2=123626
==============================================================================
--- incubator/directory/kerberos/trunk/protocol/src/java/org/apache/kerberos/kdc/server/udp/Handler.java
(original)
+++ incubator/directory/kerberos/trunk/protocol/src/java/org/apache/kerberos/kdc/server/udp/Handler.java
Wed Dec 29 03:20:46 2004
@@ -14,19 +14,21 @@
  *   limitations under the License.
  *
  */
-package org.apache.kerberos.kdc.server.udp;
+package org.apache.kerberos.changepw.server.udp;
  
-import org.apache.kerberos.kdc.*;
+import java.io.IOException;
+import java.net.DatagramPacket;
+import java.net.DatagramSocket;
+import java.net.InetAddress;
 
-import java.io.*;
-import java.net.*;
+import org.apache.kerberos.changepw.ChangePasswordDispatcher;
 
-public class Handler {
-	
-	public void process(DatagramSocket socket, DatagramPacket packet, KdcDispatcher kdc)
-			throws IOException {
-		
-		byte[] replyBytes = kdc.dispatch(packet.getData());
+public class Handler
+{
+	public void process(DatagramSocket socket, DatagramPacket packet, ChangePasswordDispatcher
dispatcher)
+			throws IOException
+	{
+		byte[] replyBytes = dispatcher.dispatch(packet.getData());
 
         InetAddress address = packet.getAddress();
         int port = packet.getPort();

Modified: incubator/directory/kerberos/trunk/protocol/src/java/org/apache/kerberos/kdc/server/udp/Main.java
Url: http://svn.apache.org/viewcvs/incubator/directory/kerberos/trunk/protocol/src/java/org/apache/kerberos/kdc/server/udp/Main.java?view=diff&rev=123626&p1=incubator/directory/kerberos/trunk/protocol/src/java/org/apache/kerberos/kdc/server/udp/Main.java&r1=123625&p2=incubator/directory/kerberos/trunk/protocol/src/java/org/apache/kerberos/kdc/server/udp/Main.java&r2=123626
==============================================================================
--- incubator/directory/kerberos/trunk/protocol/src/java/org/apache/kerberos/kdc/server/udp/Main.java
(original)
+++ incubator/directory/kerberos/trunk/protocol/src/java/org/apache/kerberos/kdc/server/udp/Main.java
Wed Dec 29 03:20:46 2004
@@ -14,26 +14,26 @@
  *   limitations under the License.
  *
  */
-package org.apache.kerberos.kdc.server.udp;
+package org.apache.kerberos.changepw.server.udp;
 
 
 import java.io.IOException;
 import java.net.DatagramPacket;
 import java.net.DatagramSocket;
 
+import org.apache.kerberos.changepw.ChangePasswordDispatcher;
+import org.apache.kerberos.changepw.store.LdapPasswordStore;
+import org.apache.kerberos.changepw.store.PasswordStore;
 import org.apache.kerberos.kdc.KdcConfiguration;
-import org.apache.kerberos.kdc.KdcDispatcher;
 import org.apache.kerberos.kdc.store.BootstrapStore;
-import org.apache.kerberos.kdc.store.LdapStore;
-import org.apache.kerberos.kdc.store.PrincipalStore;
 
 
 public class Main
 {
     private static final KdcConfiguration config = new KdcConfiguration();
     private static final BootstrapStore bootstrap = new BootstrapStore( config );
-    private static final PrincipalStore ldap = new LdapStore( config, bootstrap );
-    private static final KdcDispatcher kdc = new KdcDispatcher( config, bootstrap, ldap );
+    private static final PasswordStore ldap = new LdapPasswordStore( config, bootstrap );
+    private static final ChangePasswordDispatcher dispatcher = new ChangePasswordDispatcher(
config, bootstrap, ldap );
 
 
     public static void main( String[] args )
@@ -59,7 +59,7 @@
                 DatagramPacket packet = new DatagramPacket( requestBytes, requestBytes.length
);
                 socket.receive( packet );
 
-                Thread worker = new Thread( new Connection( socket, packet, kdc ) );
+                Thread worker = new Thread( new Connection( socket, packet, dispatcher )
);
                 worker.start();
             }
         }

Mime
View raw message