directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dran...@apache.org
Subject directory-kerby git commit: Removed a redundant class and clean up
Date Wed, 06 May 2015 03:47:25 GMT
Repository: directory-kerby
Updated Branches:
  refs/heads/master 3a267261c -> 27fba7ad0


Removed a redundant class and clean up


Project: http://git-wip-us.apache.org/repos/asf/directory-kerby/repo
Commit: http://git-wip-us.apache.org/repos/asf/directory-kerby/commit/27fba7ad
Tree: http://git-wip-us.apache.org/repos/asf/directory-kerby/tree/27fba7ad
Diff: http://git-wip-us.apache.org/repos/asf/directory-kerby/diff/27fba7ad

Branch: refs/heads/master
Commit: 27fba7ad082d2270f7fd6814ad6c837b006c6947
Parents: 3a26726
Author: Drankye <drankye@gmail.com>
Authored: Wed May 6 19:45:04 2015 +0800
Committer: Drankye <drankye@gmail.com>
Committed: Wed May 6 19:45:04 2015 +0800

----------------------------------------------------------------------
 .../kerby/kerberos/kerb/server/KdcServer.java   |  4 +-
 .../server/impl/DefaultInternalKdcServer.java   | 84 --------------------
 2 files changed, 2 insertions(+), 86 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/27fba7ad/kerby-kerb/kerb-server/src/main/java/org/apache/kerby/kerberos/kerb/server/KdcServer.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-server/src/main/java/org/apache/kerby/kerberos/kerb/server/KdcServer.java
b/kerby-kerb/kerb-server/src/main/java/org/apache/kerby/kerberos/kerb/server/KdcServer.java
index 96a8540..98d8f40 100644
--- a/kerby-kerb/kerb-server/src/main/java/org/apache/kerby/kerberos/kerb/server/KdcServer.java
+++ b/kerby-kerb/kerb-server/src/main/java/org/apache/kerby/kerberos/kerb/server/KdcServer.java
@@ -21,7 +21,7 @@ package org.apache.kerby.kerberos.kerb.server;
 
 import org.apache.kerby.KOptions;
 import org.apache.kerby.kerberos.kerb.identity.IdentityService;
-import org.apache.kerby.kerberos.kerb.server.impl.DefaultInternalKdcServer;
+import org.apache.kerby.kerberos.kerb.server.impl.DefaultInternalKdcServerImpl;
 import org.apache.kerby.kerberos.kerb.server.impl.event.EventBasedKdcServer;
 
 import java.io.File;
@@ -169,7 +169,7 @@ public class KdcServer {
         } else if (commonOptions.contains(KdcServerOption.USE_EVENT_MODEL)) {
             innerKdc = new EventBasedKdcServer();
         } else {
-            innerKdc = new DefaultInternalKdcServer();
+            innerKdc = new DefaultInternalKdcServerImpl();
         }
         innerKdc.init(commonOptions);
     }

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/27fba7ad/kerby-kerb/kerb-server/src/main/java/org/apache/kerby/kerberos/kerb/server/impl/DefaultInternalKdcServer.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-server/src/main/java/org/apache/kerby/kerberos/kerb/server/impl/DefaultInternalKdcServer.java
b/kerby-kerb/kerb-server/src/main/java/org/apache/kerby/kerberos/kerb/server/impl/DefaultInternalKdcServer.java
deleted file mode 100644
index 649a70e..0000000
--- a/kerby-kerb/kerb-server/src/main/java/org/apache/kerby/kerberos/kerb/server/impl/DefaultInternalKdcServer.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/**
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License. 
- *
- */
-package org.apache.kerby.kerberos.kerb.server.impl;
-
-import org.apache.kerby.kerberos.kerb.server.KdcContext;
-import org.apache.kerby.kerberos.kerb.server.preauth.PreauthHandler;
-import org.apache.kerby.kerberos.kerb.transport.KdcNetwork;
-import org.apache.kerby.kerberos.kerb.transport.KrbTransport;
-
-import java.net.InetSocketAddress;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-
-/**
- * A default KDC server implementation.
- */
-public class DefaultInternalKdcServer extends AbstractInternalKdcServer {
-    private ExecutorService executor;
-    private KdcContext kdcContext;
-    private KdcNetwork network;
-
-    @Override
-    protected void doStart() throws Exception {
-        super.doStart();
-
-        prepareHandler();
-
-        executor = Executors.newCachedThreadPool();
-
-        network = new KdcNetwork() {
-            @Override
-            protected void onNewTransport(KrbTransport transport) {
-                DefaultKdcHandler kdcHandler = new DefaultKdcHandler(kdcContext, transport);
-                executor.execute(kdcHandler);
-            }
-        };
-
-        network.init();
-
-        InetSocketAddress tcpAddress, udpAddress = null;
-        tcpAddress = new InetSocketAddress(getSetting().getKdcHost(),
-                getSetting().getKdcTcpPort());
-        if (getSetting().allowUdp()) {
-            udpAddress = new InetSocketAddress(getSetting().getKdcHost(),
-                    getSetting().getKdcUdpPort());
-        }
-        network.listen(tcpAddress, udpAddress);
-        network.start();
-    }
-
-    private void prepareHandler() {
-        kdcContext = new KdcContext(getSetting());
-        kdcContext.setIdentityService(getBackend());
-        PreauthHandler preauthHandler = new PreauthHandler();
-        preauthHandler.init();
-        kdcContext.setPreauthHandler(preauthHandler);
-    }
-
-    @Override
-    protected void doStop() throws Exception {
-        super.doStop();
-
-        network.stop();
-
-        executor.shutdownNow();
-    }
-}


Mime
View raw message