directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dran...@apache.org
Subject [12/50] [abbrv] directory-kerberos git commit: Many changes with newname
Date Thu, 22 Jan 2015 00:56:36 GMT
http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/7d9261af/lib/haox-config/src/test/java/org/apache/haox/config/IniConfigTest.java
----------------------------------------------------------------------
diff --git a/lib/haox-config/src/test/java/org/apache/haox/config/IniConfigTest.java b/lib/haox-config/src/test/java/org/apache/haox/config/IniConfigTest.java
deleted file mode 100644
index bd2f93b..0000000
--- a/lib/haox-config/src/test/java/org/apache/haox/config/IniConfigTest.java
+++ /dev/null
@@ -1,76 +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.haox.config;
-
-import org.junit.Assert;
-import org.junit.Test;
-
-import java.io.File;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.io.PrintWriter;
-
-public class IniConfigTest {
-
-    private final static String TEST_DIR = new File(System.getProperty(
-            "test.build.data", "/tmp")).getAbsolutePath();
-    private final static File TEST_FILE = new File(TEST_DIR, "test-ini-config");
-
-    /**
-     * Build a INI format configuration file.
-     */
-    private void buildFile() throws IOException {
-        PrintWriter out = new PrintWriter(new FileWriter(TEST_FILE));
-        out.println("#note = notenote");
-        out.println("default = FILE:/var/log/krb5libs.log");
-        out.println("kdc = FILE:/var/log/krb5kdc.log");
-        out.println("admin_server = FILE:/var/log/kadmind.log");
-        out.println("[libdefaults]");
-        out.println("default_realm = EXAMPLE.COM");
-        out.println("dns_lookup_realm = false");
-        out.println("dns_lookup_kdc = false");
-        out.println("ticket_lifetime = 24h");
-        out.println("renew_lifetime = 7d");
-        out.println("forwardable = true");
-        out.println("[lib1]");
-        out.println("default_realm = EXAMPLE.COM1");
-        out.println("dns_lookup_realm = true");
-        out.close();
-    }
-
-    @Test
-    public void testIniConfig() throws IOException {
-        buildFile();
-
-        Conf conf = new Conf();
-        conf.addIniConfig(TEST_FILE);
-
-        Assert.assertEquals(conf.getString("default"), "FILE:/var/log/krb5libs.log");
-        Assert.assertEquals(conf.getString("#note"), null);//Comments should be ignored when loading.
-
-        Config config = conf.getConfig("libdefaults");
-        Assert.assertFalse(config.getBoolean("dns_lookup_realm"));
-        Assert.assertTrue(config.getBoolean("forwardable"));
-
-        Config config1 = conf.getConfig("lib1");
-        Assert.assertTrue(config1.getBoolean("dns_lookup_realm"));
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/7d9261af/lib/haox-event/README
----------------------------------------------------------------------
diff --git a/lib/haox-event/README b/lib/haox-event/README
deleted file mode 100644
index cb3b88a..0000000
--- a/lib/haox-event/README
+++ /dev/null
@@ -1 +0,0 @@
-An event driven application framework with mixed (TCP, UDP) x (connector, acceptor) supported.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/7d9261af/lib/haox-event/pom.xml
----------------------------------------------------------------------
diff --git a/lib/haox-event/pom.xml b/lib/haox-event/pom.xml
deleted file mode 100644
index d0ec9f4..0000000
--- a/lib/haox-event/pom.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Licensed 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. See accompanying LICENSE file.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-
-    <parent>
-        <artifactId>lib</artifactId>
-        <groupId>org.haox</groupId>
-        <version>1.0-SNAPSHOT</version>
-    </parent>
-
-    <artifactId>haox-event</artifactId>
-
-    <name>Haox Event</name>
-    <description>Haox Event and Transport facilities for both client and server</description>
-
-    <dependencies>
-    </dependencies>
-</project>

http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/7d9261af/lib/haox-event/src/main/java/org/apache/haox/event/AbstractEventHandler.java
----------------------------------------------------------------------
diff --git a/lib/haox-event/src/main/java/org/apache/haox/event/AbstractEventHandler.java b/lib/haox-event/src/main/java/org/apache/haox/event/AbstractEventHandler.java
deleted file mode 100644
index 517b585..0000000
--- a/lib/haox-event/src/main/java/org/apache/haox/event/AbstractEventHandler.java
+++ /dev/null
@@ -1,55 +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.haox.event;
-
-public abstract class AbstractEventHandler implements EventHandler {
-
-    private Dispatcher dispatcher;
-
-    public AbstractEventHandler() {
-
-    }
-
-    protected void dispatch(Event event) {
-        dispatcher.dispatch(event);
-    }
-
-    @Override
-    public Dispatcher getDispatcher() {
-        return dispatcher;
-    }
-
-    @Override
-    public void setDispatcher(Dispatcher dispatcher) {
-        this.dispatcher = dispatcher;
-    }
-
-    @Override
-    public void handle(Event event) {
-        try {
-            doHandle(event);
-        } catch (Exception e) {
-            throw new RuntimeException(event.toString(), e);
-        }
-    }
-
-    protected abstract void doHandle(Event event) throws Exception;
-}
-

http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/7d9261af/lib/haox-event/src/main/java/org/apache/haox/event/AbstractInternalEventHandler.java
----------------------------------------------------------------------
diff --git a/lib/haox-event/src/main/java/org/apache/haox/event/AbstractInternalEventHandler.java b/lib/haox-event/src/main/java/org/apache/haox/event/AbstractInternalEventHandler.java
deleted file mode 100644
index f0bc944..0000000
--- a/lib/haox-event/src/main/java/org/apache/haox/event/AbstractInternalEventHandler.java
+++ /dev/null
@@ -1,66 +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.haox.event;
-
-import java.util.concurrent.atomic.AtomicInteger;
-
-public abstract class AbstractInternalEventHandler extends AbstractEventHandler
-        implements InternalEventHandler {
-
-    private int id = -1;
-    protected EventHandler handler;
-
-    private static AtomicInteger idGen = new AtomicInteger(1);
-
-    public AbstractInternalEventHandler() {
-        super();
-
-        this.id = idGen.getAndIncrement();
-
-        init();
-    }
-
-    public AbstractInternalEventHandler(EventHandler handler) {
-        this();
-
-        this.handler = handler;
-    }
-
-    protected void setEventHandler(EventHandler handler) {
-        this.handler = handler;
-    }
-
-    @Override
-    public int id() {
-        return id;
-    }
-
-    public abstract void init();
-
-    protected void process(Event event) {
-        handler.handle(event);
-    }
-
-    @Override
-    public EventType[] getInterestedEvents() {
-        return handler.getInterestedEvents();
-    }
-}
-

http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/7d9261af/lib/haox-event/src/main/java/org/apache/haox/event/BufferedEventHandler.java
----------------------------------------------------------------------
diff --git a/lib/haox-event/src/main/java/org/apache/haox/event/BufferedEventHandler.java b/lib/haox-event/src/main/java/org/apache/haox/event/BufferedEventHandler.java
deleted file mode 100644
index 6d9da9c..0000000
--- a/lib/haox-event/src/main/java/org/apache/haox/event/BufferedEventHandler.java
+++ /dev/null
@@ -1,53 +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.haox.event;
-
-import java.util.concurrent.ArrayBlockingQueue;
-import java.util.concurrent.BlockingQueue;
-
-/**
- * An EventHandler wrapper buffering events and processing them later
- */
-public abstract class BufferedEventHandler extends AbstractInternalEventHandler {
-
-    protected BlockingQueue<Event> eventQueue;
-
-    public BufferedEventHandler(EventHandler handler) {
-        super(handler);
-    }
-
-    public BufferedEventHandler() {
-        super();
-    }
-
-    @Override
-    public void init() {
-        this.eventQueue = new ArrayBlockingQueue<Event>(2);
-    }
-
-    @Override
-    protected void doHandle(Event event) throws Exception {
-        try {
-            eventQueue.put(event);
-        } catch (InterruptedException e) {
-            throw new RuntimeException(e);
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/7d9261af/lib/haox-event/src/main/java/org/apache/haox/event/Dispatcher.java
----------------------------------------------------------------------
diff --git a/lib/haox-event/src/main/java/org/apache/haox/event/Dispatcher.java b/lib/haox-event/src/main/java/org/apache/haox/event/Dispatcher.java
deleted file mode 100644
index e3387c5..0000000
--- a/lib/haox-event/src/main/java/org/apache/haox/event/Dispatcher.java
+++ /dev/null
@@ -1,29 +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.haox.event;
-
-public interface Dispatcher {
-
-    public void dispatch(Event event);
-
-    public void register(EventHandler handler);
-
-    public void register(InternalEventHandler internalHandler);
-}

http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/7d9261af/lib/haox-event/src/main/java/org/apache/haox/event/Event.java
----------------------------------------------------------------------
diff --git a/lib/haox-event/src/main/java/org/apache/haox/event/Event.java b/lib/haox-event/src/main/java/org/apache/haox/event/Event.java
deleted file mode 100644
index 19d405c..0000000
--- a/lib/haox-event/src/main/java/org/apache/haox/event/Event.java
+++ /dev/null
@@ -1,43 +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.haox.event;
-
-public class Event {
-
-    private EventType eventType;
-    private Object eventData;
-
-    public Event(EventType eventType) {
-        this.eventType = eventType;
-    }
-
-    public Event(EventType eventType, Object eventData) {
-        this.eventType = eventType;
-        this.eventData = eventData;
-    }
-
-    public EventType getEventType() {
-        return eventType;
-    }
-
-    public Object getEventData() {
-        return eventData;
-    }
-}

http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/7d9261af/lib/haox-event/src/main/java/org/apache/haox/event/EventHandler.java
----------------------------------------------------------------------
diff --git a/lib/haox-event/src/main/java/org/apache/haox/event/EventHandler.java b/lib/haox-event/src/main/java/org/apache/haox/event/EventHandler.java
deleted file mode 100644
index d84ead9..0000000
--- a/lib/haox-event/src/main/java/org/apache/haox/event/EventHandler.java
+++ /dev/null
@@ -1,31 +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.haox.event;
-
-public interface EventHandler {
-
-    public void handle(Event event);
-
-    public EventType[] getInterestedEvents();
-
-    public Dispatcher getDispatcher();
-
-    public void setDispatcher(Dispatcher dispatcher);
-}

http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/7d9261af/lib/haox-event/src/main/java/org/apache/haox/event/EventHub.java
----------------------------------------------------------------------
diff --git a/lib/haox-event/src/main/java/org/apache/haox/event/EventHub.java b/lib/haox-event/src/main/java/org/apache/haox/event/EventHub.java
deleted file mode 100644
index 6a4d989..0000000
--- a/lib/haox-event/src/main/java/org/apache/haox/event/EventHub.java
+++ /dev/null
@@ -1,192 +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.haox.event;
-
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.TimeoutException;
-
-public class EventHub implements Dispatcher {
-
-    private enum BuiltInEventType implements EventType {
-        STOP,
-        ALL
-    }
-
-    private boolean started = false;
-
-    private Map<Integer, InternalEventHandler> handlers =
-            new ConcurrentHashMap<Integer, InternalEventHandler>();
-
-    private Map<EventType, Set<Integer>> eventHandlersMap =
-        new ConcurrentHashMap<EventType, Set<Integer>>();
-
-    private InternalEventHandler builtInHandler;
-
-    class BuiltInEventHandler extends AbstractEventHandler {
-        public BuiltInEventHandler() {
-            super();
-        }
-
-        @Override
-        protected void doHandle(Event event) {
-
-        }
-
-        @Override
-        public EventType[] getInterestedEvents() {
-            return BuiltInEventType.values();
-        }
-    }
-
-    public EventHub() {
-        init();
-    }
-
-    private void init() {
-        EventHandler eh = new BuiltInEventHandler();
-        builtInHandler = new ExecutedEventHandler(eh);
-        register(builtInHandler);
-    }
-
-    @Override
-    public void dispatch(Event event) {
-        process(event);
-    }
-
-    @Override
-    public void register(EventHandler handler) {
-        handler.setDispatcher(this);
-        InternalEventHandler ieh = new ExecutedEventHandler(handler);
-        register(ieh);
-    }
-
-    @Override
-    public void register(InternalEventHandler handler) {
-        handler.setDispatcher(this);
-        handler.init();
-        handlers.put(handler.id(), handler);
-
-        if (started) {
-            handler.start();
-        }
-
-        EventType[] interestedEvents = handler.getInterestedEvents();
-        Set<Integer> tmpHandlers;
-        for (EventType eventType : interestedEvents) {
-            if (eventHandlersMap.containsKey(eventType)) {
-                tmpHandlers = eventHandlersMap.get(eventType);
-            } else {
-                tmpHandlers = new HashSet<Integer>();
-                eventHandlersMap.put(eventType, tmpHandlers);
-            }
-            tmpHandlers.add(handler.id());
-        }
-    }
-
-    public EventWaiter waitEvent(final EventType event) {
-        return waitEvent(new EventType[] { event } );
-    }
-
-    public EventWaiter waitEvent(final EventType... events) {
-        EventHandler handler = new AbstractEventHandler() {
-            @Override
-            protected void doHandle(Event event) throws Exception {
-                // no op;
-            }
-
-            @Override
-            public EventType[] getInterestedEvents() {
-                return events;
-            }
-        };
-
-        handler.setDispatcher(this);
-        final WaitEventHandler waitEventHandler = new WaitEventHandler(handler);
-        register(waitEventHandler);
-        EventWaiter waiter = new EventWaiter() {
-            @Override
-            public Event waitEvent(EventType event) {
-                return waitEventHandler.waitEvent(event);
-            }
-
-            @Override
-            public Event waitEvent() {
-                return waitEventHandler.waitEvent();
-            }
-
-            @Override
-            public Event waitEvent(EventType event, long timeout,
-                                   TimeUnit timeUnit) throws TimeoutException {
-                return waitEventHandler.waitEvent(event, timeout, timeUnit);
-            }
-
-            @Override
-            public Event waitEvent(long timeout, TimeUnit timeUnit) throws TimeoutException {
-                return waitEventHandler.waitEvent(timeout, timeUnit);
-            }
-        };
-
-        return waiter;
-    }
-
-    private void process(Event event) {
-        EventType eventType = event.getEventType();
-        InternalEventHandler handler;
-        Set<Integer> handlerIds;
-
-        if (eventHandlersMap.containsKey(eventType)) {
-            handlerIds = eventHandlersMap.get(eventType);
-            for (Integer hid : handlerIds) {
-                handler = handlers.get(hid);
-                handler.handle(event);
-            }
-        }
-
-        if (eventHandlersMap.containsKey(BuiltInEventType.ALL)) {
-            handlerIds = eventHandlersMap.get(BuiltInEventType.ALL);
-            for (Integer hid : handlerIds) {
-                handler = handlers.get(hid);
-                handler.handle(event);
-            }
-        }
-    }
-
-    public void start() {
-        if (!started) {
-            for (InternalEventHandler handler : handlers.values()) {
-                handler.start();
-            }
-            started = true;
-        }
-    }
-
-    public void stop() {
-        if (started) {
-            for (InternalEventHandler handler : handlers.values()) {
-                handler.stop();
-            }
-            started = false;
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/7d9261af/lib/haox-event/src/main/java/org/apache/haox/event/EventType.java
----------------------------------------------------------------------
diff --git a/lib/haox-event/src/main/java/org/apache/haox/event/EventType.java b/lib/haox-event/src/main/java/org/apache/haox/event/EventType.java
deleted file mode 100644
index 49b35bc..0000000
--- a/lib/haox-event/src/main/java/org/apache/haox/event/EventType.java
+++ /dev/null
@@ -1,24 +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.haox.event;
-
-public interface EventType {
-    // no op
-}

http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/7d9261af/lib/haox-event/src/main/java/org/apache/haox/event/EventWaiter.java
----------------------------------------------------------------------
diff --git a/lib/haox-event/src/main/java/org/apache/haox/event/EventWaiter.java b/lib/haox-event/src/main/java/org/apache/haox/event/EventWaiter.java
deleted file mode 100644
index dc8cf22..0000000
--- a/lib/haox-event/src/main/java/org/apache/haox/event/EventWaiter.java
+++ /dev/null
@@ -1,35 +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.haox.event;
-
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.TimeoutException;
-
-public interface EventWaiter {
-
-    public abstract Event waitEvent(EventType event);
-
-    public abstract Event waitEvent();
-
-    public abstract Event waitEvent(EventType event, long timeout, TimeUnit timeUnit) throws TimeoutException;
-
-    public abstract Event waitEvent(long timeout, TimeUnit timeUnit) throws TimeoutException;
-
-}

http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/7d9261af/lib/haox-event/src/main/java/org/apache/haox/event/ExecutedEventHandler.java
----------------------------------------------------------------------
diff --git a/lib/haox-event/src/main/java/org/apache/haox/event/ExecutedEventHandler.java b/lib/haox-event/src/main/java/org/apache/haox/event/ExecutedEventHandler.java
deleted file mode 100644
index c707648..0000000
--- a/lib/haox-event/src/main/java/org/apache/haox/event/ExecutedEventHandler.java
+++ /dev/null
@@ -1,76 +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.haox.event;
-
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-
-/**
- * An EventHandler wrapper processing events using an ExecutorService
- */
-public class ExecutedEventHandler extends AbstractInternalEventHandler {
-
-    private ExecutorService executorService;
-
-    public ExecutedEventHandler(EventHandler handler) {
-        super(handler);
-    }
-
-    @Override
-    protected void doHandle(final Event event) throws Exception {
-        if (executorService.isTerminated()) {
-            return;
-        }
-
-        executorService.execute(new Runnable() {
-            @Override
-            public void run() {
-                try {
-                    process(event);
-                } catch (Exception e) {
-                    throw new RuntimeException(e);
-                }
-            }
-        });
-    }
-
-    @Override
-    public void start() {
-        executorService = Executors.newFixedThreadPool(2);
-    }
-
-    @Override
-    public void stop() {
-        if (executorService.isShutdown()) {
-            return;
-        }
-        executorService.shutdownNow();
-    }
-
-    @Override
-    public boolean isStopped() {
-        return executorService.isShutdown();
-    }
-
-    @Override
-    public void init() {
-
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/7d9261af/lib/haox-event/src/main/java/org/apache/haox/event/InternalEventHandler.java
----------------------------------------------------------------------
diff --git a/lib/haox-event/src/main/java/org/apache/haox/event/InternalEventHandler.java b/lib/haox-event/src/main/java/org/apache/haox/event/InternalEventHandler.java
deleted file mode 100644
index 799d712..0000000
--- a/lib/haox-event/src/main/java/org/apache/haox/event/InternalEventHandler.java
+++ /dev/null
@@ -1,34 +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.haox.event;
-
-public interface InternalEventHandler extends EventHandler {
-
-    public int id();
-
-    public void init();
-
-    public void start();
-
-    public void stop();
-
-    public boolean isStopped();
-}
-

http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/7d9261af/lib/haox-event/src/main/java/org/apache/haox/event/LongRunningEventHandler.java
----------------------------------------------------------------------
diff --git a/lib/haox-event/src/main/java/org/apache/haox/event/LongRunningEventHandler.java b/lib/haox-event/src/main/java/org/apache/haox/event/LongRunningEventHandler.java
deleted file mode 100644
index dc71498..0000000
--- a/lib/haox-event/src/main/java/org/apache/haox/event/LongRunningEventHandler.java
+++ /dev/null
@@ -1,77 +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.haox.event;
-
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-
-public abstract class LongRunningEventHandler extends BufferedEventHandler {
-
-    private ExecutorService executorService;
-
-    public LongRunningEventHandler(EventHandler handler) {
-        super(handler);
-    }
-
-    public LongRunningEventHandler() {
-        super();
-    }
-
-    protected abstract void loopOnce();
-
-    @Override
-    public void start() {
-        executorService = Executors.newFixedThreadPool(1);
-        executorService.execute(new Runnable() {
-            @Override
-            public void run() {
-                while (true) {
-
-                    processEvents();
-
-                    loopOnce();
-                }
-            }
-        });
-    }
-
-    @Override
-    public void stop() {
-        if (executorService.isShutdown()) {
-            return;
-        }
-        executorService.shutdownNow();
-    }
-
-    @Override
-    public boolean isStopped() {
-        return executorService.isShutdown();
-    }
-
-    protected void processEvents() {
-        while (! eventQueue.isEmpty()) {
-            try {
-                process(eventQueue.take());
-            } catch (InterruptedException e) {
-                throw new RuntimeException(e);
-            }
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/7d9261af/lib/haox-event/src/main/java/org/apache/haox/event/WaitEventHandler.java
----------------------------------------------------------------------
diff --git a/lib/haox-event/src/main/java/org/apache/haox/event/WaitEventHandler.java b/lib/haox-event/src/main/java/org/apache/haox/event/WaitEventHandler.java
deleted file mode 100644
index c6d287e..0000000
--- a/lib/haox-event/src/main/java/org/apache/haox/event/WaitEventHandler.java
+++ /dev/null
@@ -1,128 +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.haox.event;
-
-import java.util.concurrent.*;
-
-public class WaitEventHandler extends BufferedEventHandler {
-
-    private ExecutorService executorService;
-
-    public WaitEventHandler(EventHandler handler) {
-        super(handler);
-    }
-
-    public Event waitEvent() {
-        return waitEvent(null);
-    }
-
-    public Event waitEvent(final EventType eventType) {
-        Future<Event> future = doWaitEvent(eventType);
-
-        try {
-            return future.get();
-        } catch (InterruptedException e) {
-            throw new RuntimeException(e);
-        } catch (ExecutionException e) {
-            throw new RuntimeException(e);
-        }
-    }
-
-    public Event waitEvent(final EventType eventType,
-                           long timeout, TimeUnit timeUnit) throws TimeoutException {
-        Future<Event> future = doWaitEvent(eventType);
-
-        try {
-            return future.get(timeout, timeUnit);
-        } catch (InterruptedException e) {
-            throw new RuntimeException(e);
-        } catch (ExecutionException e) {
-            throw new RuntimeException(e);
-        }
-    }
-
-    public Event waitEvent(long timeout, TimeUnit timeUnit) throws TimeoutException {
-        Future<Event> future = doWaitEvent(null);
-
-        try {
-            return future.get(timeout, timeUnit);
-        } catch (InterruptedException e) {
-            throw new RuntimeException(e);
-        } catch (ExecutionException e) {
-            throw new RuntimeException(e);
-        }
-    }
-
-    private Future<Event> doWaitEvent(final EventType eventType) {
-        Future<Event> future = executorService.submit(new Callable<Event>() {
-            @Override
-            public Event call() throws Exception {
-                if (eventType != null) {
-                    return checkEvent(eventType);
-                } else {
-                    return checkEvent();
-                }
-            }
-        });
-
-        return future;
-    }
-
-    private Event checkEvent() throws Exception {
-        return eventQueue.take();
-    }
-
-    private Event checkEvent(EventType eventType) throws Exception {
-        Event event = null;
-
-        while (true) {
-            if (eventQueue.size() == 1) {
-                if (eventQueue.peek().getEventType() == eventType) {
-                    return eventQueue.take();
-                }
-            } else {
-                event = eventQueue.take();
-                if (event.getEventType() == eventType) {
-                    return event;
-                } else {
-                    eventQueue.put(event); // put back since not wanted
-                }
-            }
-        }
-    }
-
-    @Override
-    public void start() {
-        executorService = Executors.newFixedThreadPool(2);
-    }
-
-    @Override
-    public void stop() {
-        if (executorService.isShutdown()) {
-            return;
-        }
-        executorService.shutdown();
-    }
-
-    @Override
-    public boolean isStopped() {
-        return executorService.isShutdown();
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/7d9261af/lib/haox-event/src/main/java/org/apache/haox/transport/Acceptor.java
----------------------------------------------------------------------
diff --git a/lib/haox-event/src/main/java/org/apache/haox/transport/Acceptor.java b/lib/haox-event/src/main/java/org/apache/haox/transport/Acceptor.java
deleted file mode 100644
index 540fe30..0000000
--- a/lib/haox-event/src/main/java/org/apache/haox/transport/Acceptor.java
+++ /dev/null
@@ -1,36 +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.haox.transport;
-
-import java.net.InetSocketAddress;
-
-public abstract class Acceptor extends TransportSelector {
-
-    public Acceptor(TransportHandler transportHandler) {
-        super(transportHandler);
-    }
-
-    public void listen(String address, short listenPort) {
-        InetSocketAddress socketAddress = new InetSocketAddress(address, listenPort);
-        doListen(socketAddress);
-    }
-
-    protected abstract void doListen(InetSocketAddress socketAddress);
-}

http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/7d9261af/lib/haox-event/src/main/java/org/apache/haox/transport/Connector.java
----------------------------------------------------------------------
diff --git a/lib/haox-event/src/main/java/org/apache/haox/transport/Connector.java b/lib/haox-event/src/main/java/org/apache/haox/transport/Connector.java
deleted file mode 100644
index a021689..0000000
--- a/lib/haox-event/src/main/java/org/apache/haox/transport/Connector.java
+++ /dev/null
@@ -1,36 +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.haox.transport;
-
-import java.net.InetSocketAddress;
-
-public abstract class Connector extends TransportSelector {
-
-    public Connector(TransportHandler transportHandler) {
-        super(transportHandler);
-    }
-
-    public void connect(String serverAddress, short serverPort) {
-        InetSocketAddress sa = new InetSocketAddress(serverAddress, serverPort);
-        doConnect(sa);
-    }
-
-    protected abstract void doConnect(InetSocketAddress sa);
-}

http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/7d9261af/lib/haox-event/src/main/java/org/apache/haox/transport/MessageHandler.java
----------------------------------------------------------------------
diff --git a/lib/haox-event/src/main/java/org/apache/haox/transport/MessageHandler.java b/lib/haox-event/src/main/java/org/apache/haox/transport/MessageHandler.java
deleted file mode 100644
index 1d3bb41..0000000
--- a/lib/haox-event/src/main/java/org/apache/haox/transport/MessageHandler.java
+++ /dev/null
@@ -1,42 +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.haox.transport;
-
-import org.apache.haox.event.AbstractEventHandler;
-import org.apache.haox.event.Event;
-import org.apache.haox.event.EventType;
-import org.apache.haox.transport.event.MessageEvent;
-import org.apache.haox.transport.event.TransportEventType;
-
-public abstract class MessageHandler extends AbstractEventHandler {
-
-    @Override
-    protected void doHandle(Event event) throws Exception {
-        handleMessage((MessageEvent) event);
-    }
-
-    protected abstract void handleMessage(MessageEvent event) throws Exception;
-
-    @Override
-    public EventType[] getInterestedEvents() {
-        return new EventType[] { TransportEventType.INBOUND_MESSAGE };
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/7d9261af/lib/haox-event/src/main/java/org/apache/haox/transport/Network.java
----------------------------------------------------------------------
diff --git a/lib/haox-event/src/main/java/org/apache/haox/transport/Network.java b/lib/haox-event/src/main/java/org/apache/haox/transport/Network.java
deleted file mode 100644
index a61925e..0000000
--- a/lib/haox-event/src/main/java/org/apache/haox/transport/Network.java
+++ /dev/null
@@ -1,297 +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.haox.transport;
-
-import org.apache.haox.event.AbstractEventHandler;
-import org.apache.haox.event.Event;
-import org.apache.haox.event.EventType;
-import org.apache.haox.event.LongRunningEventHandler;
-import org.apache.haox.transport.event.AddressEvent;
-import org.apache.haox.transport.event.TransportEvent;
-import org.apache.haox.transport.tcp.*;
-import org.apache.haox.transport.udp.UdpAddressEvent;
-import org.apache.haox.transport.udp.UdpEventType;
-import org.apache.haox.transport.udp.UdpTransport;
-import org.apache.haox.transport.udp.UdpTransportHandler;
-
-import java.io.IOException;
-import java.net.InetSocketAddress;
-import java.net.ServerSocket;
-import java.nio.channels.*;
-import java.util.Iterator;
-import java.util.Set;
-
-/**
- * A combined and mixed network facility handling UDP and TCP in both connect and accept sides
- */
-public class Network extends LongRunningEventHandler {
-
-    private Selector selector;
-    private StreamingDecoder streamingDecoder;
-    private UdpTransportHandler udpTransportHandler;
-    private TcpTransportHandler tcpTransportHandler;
-
-    class MyEventHandler extends AbstractEventHandler {
-        @Override
-        protected void doHandle(Event event) throws Exception {
-            if (event.getEventType() == UdpEventType.ADDRESS_CONNECT) {
-                doUdpConnect((AddressEvent) event);
-            } else if (event.getEventType() ==  UdpEventType.ADDRESS_BIND) {
-                doUdpBind((AddressEvent) event);
-            } else if (event.getEventType() ==  TcpEventType.ADDRESS_CONNECT) {
-                doTcpConnect((AddressEvent) event);
-            } else if (event.getEventType() ==  TcpEventType.ADDRESS_BIND) {
-                doTcpBind((AddressEvent) event);
-            }
-        }
-
-        @Override
-        public EventType[] getInterestedEvents() {
-            return new EventType[]{
-                    UdpEventType.ADDRESS_CONNECT,
-                    UdpEventType.ADDRESS_BIND,
-                    TcpEventType.ADDRESS_CONNECT,
-                    TcpEventType.ADDRESS_BIND
-            };
-        }
-    }
-
-    public Network() {
-        setEventHandler(new MyEventHandler());
-    }
-
-    @Override
-    public void init() {
-        super.init();
-
-        try {
-            selector = Selector.open();
-        } catch (IOException e) {
-            throw new RuntimeException(e);
-        }
-    }
-
-    /**
-     * TCP transport only, for decoding tcp streaming into messages
-     * @param streamingDecoder
-     */
-    public void setStreamingDecoder(StreamingDecoder streamingDecoder) {
-        this.streamingDecoder = streamingDecoder;
-    }
-
-    /**
-     * TCP only. Connect on the given server address. Can be called multiple times
-     * for multiple servers
-     * @param serverAddress
-     * @param serverPort
-     */
-    public void tcpConnect(String serverAddress, short serverPort) {
-        InetSocketAddress sa = new InetSocketAddress(serverAddress, serverPort);
-        checkTcpTransportHandler();
-        doTcpConnect(sa);
-    }
-
-    /**
-     * UDP only. Connect on the given server address. Can be called multiple times
-     * for multiple servers
-     * @param serverAddress
-     * @param serverPort
-     */
-    public void udpConnect(String serverAddress, short serverPort) {
-        InetSocketAddress sa = new InetSocketAddress(serverAddress, serverPort);
-        checkUdpTransportHandler();
-        doUdpConnect(sa);
-    }
-
-    /**
-     * TCP only. Listen and accept connections on the address. Can be called multiple
-     * times for multiple server addresses.
-     * @param serverAddress
-     * @param serverPort
-     */
-    public void tcpListen(String serverAddress, short serverPort) {
-        InetSocketAddress sa = new InetSocketAddress(serverAddress, serverPort);
-        checkTcpTransportHandler();
-        doTcpListen(sa);
-    }
-
-    /**
-     * UDP only. Listen and accept connections on the address. Can be called multiple
-     * times for multiple server addresses.
-     * @param serverAddress
-     * @param serverPort
-     */
-    public void udpListen(String serverAddress, short serverPort) {
-        InetSocketAddress sa = new InetSocketAddress(serverAddress, serverPort);
-        checkUdpTransportHandler();
-        doUdpListen(sa);
-    }
-
-    @Override
-    protected void loopOnce() {
-        try {
-            selectOnce();
-        } catch (IOException e) {
-            throw new RuntimeException(e);
-        }
-    }
-
-    protected void selectOnce() throws IOException {
-        if (selector.isOpen() && selector.select(2) > 0 && selector.isOpen()) {
-            Set<SelectionKey> selectionKeys = selector.selectedKeys();
-            Iterator<SelectionKey> iterator = selectionKeys.iterator();
-            while (iterator.hasNext()) {
-                SelectionKey selectionKey = iterator.next();
-                dealKey(selectionKey);
-                iterator.remove();
-            }
-            selectionKeys.clear();
-        }
-    }
-
-    private void checkTcpTransportHandler() {
-        if (tcpTransportHandler == null) {
-            if (streamingDecoder == null) {
-                throw new IllegalArgumentException("No streaming decoder set yet");
-            }
-            tcpTransportHandler = new TcpTransportHandler(streamingDecoder);
-            getDispatcher().register(tcpTransportHandler);
-        }
-    }
-
-    private void checkUdpTransportHandler() {
-        if (udpTransportHandler == null) {
-            udpTransportHandler = new UdpTransportHandler();
-            getDispatcher().register(udpTransportHandler);
-        }
-    }
-
-    private void dealKey(SelectionKey selectionKey) throws IOException {
-        if (selectionKey.isConnectable()) {
-            doTcpConnect(selectionKey);
-        } else if (selectionKey.isAcceptable()) {
-            doTcpAccept(selectionKey);
-        } else {
-            helpHandleSelectionKey(selectionKey);
-        }
-    }
-
-    private void helpHandleSelectionKey(SelectionKey selectionKey) throws IOException {
-        SelectableChannel channel = selectionKey.channel();
-        if (channel instanceof DatagramChannel) {
-            udpTransportHandler.helpHandleSelectionKey(selectionKey);
-        } else {
-            tcpTransportHandler.helpHandleSelectionKey(selectionKey);
-        }
-    }
-
-    private void doUdpConnect(InetSocketAddress sa) {
-        AddressEvent event = UdpAddressEvent.createAddressConnectEvent(sa);
-        dispatch(event);
-    }
-
-    private void doUdpConnect(AddressEvent event) throws IOException {
-        InetSocketAddress address = event.getAddress();
-        DatagramChannel channel = DatagramChannel.open();
-        channel.configureBlocking(false);
-        channel.connect(address);
-
-        channel.register(selector, SelectionKey.OP_READ | SelectionKey.OP_WRITE);
-
-        UdpTransport transport = new UdpTransport(channel, address);
-        onNewTransport(transport);
-    }
-
-    protected void doUdpListen(InetSocketAddress socketAddress) {
-        AddressEvent event = UdpAddressEvent.createAddressBindEvent(socketAddress);
-        dispatch(event);
-    }
-
-    private void doUdpBind(AddressEvent event) throws IOException {
-        DatagramChannel serverChannel = DatagramChannel.open();
-        serverChannel.configureBlocking(false);
-        serverChannel.bind(event.getAddress());
-        serverChannel.register(selector, SelectionKey.OP_READ);
-    }
-
-    protected void doTcpConnect(InetSocketAddress sa) {
-        AddressEvent event = TcpAddressEvent.createAddressConnectEvent(sa);
-        dispatch(event);
-    }
-
-    private void doTcpConnect(AddressEvent event) throws IOException {
-        SocketChannel channel = SocketChannel.open();
-        channel.configureBlocking(false);
-        channel.connect(event.getAddress());
-        channel.register(selector,
-                SelectionKey.OP_CONNECT | SelectionKey.OP_READ | SelectionKey.OP_WRITE);
-    }
-
-    private void doTcpConnect(SelectionKey key) throws IOException {
-        SocketChannel channel = (SocketChannel) key.channel();
-        if (channel.isConnectionPending()) {
-            channel.finishConnect();
-        }
-
-        Transport transport = new TcpTransport(channel, tcpTransportHandler.getStreamingDecoder());
-        channel.register(selector, SelectionKey.OP_READ | SelectionKey.OP_WRITE, transport);
-        onNewTransport(transport);
-    }
-
-    protected void doTcpListen(InetSocketAddress socketAddress) {
-        AddressEvent event = TcpAddressEvent.createAddressBindEvent(socketAddress);
-        dispatch(event);
-    }
-
-    protected void doTcpAccept(SelectionKey key) throws IOException {
-        ServerSocketChannel server = (ServerSocketChannel) key.channel();
-        SocketChannel channel;
-
-        try {
-            while ((channel = server.accept()) != null) {
-                channel.configureBlocking(false);
-                channel.socket().setTcpNoDelay(true);
-                channel.socket().setKeepAlive(true);
-
-                Transport transport = new TcpTransport(channel,
-                    tcpTransportHandler.getStreamingDecoder());
-
-                channel.register(selector,
-                    SelectionKey.OP_READ | SelectionKey.OP_WRITE, transport);
-                onNewTransport(transport);
-            }
-        } catch (ClosedByInterruptException e) {
-            // No op as normal
-        }
-    }
-
-    protected void doTcpBind(AddressEvent event) throws IOException {
-        ServerSocketChannel serverSocketChannel = ServerSocketChannel.open();
-        serverSocketChannel.configureBlocking(false);
-        ServerSocket serverSocket = serverSocketChannel.socket();
-        serverSocket.bind(event.getAddress());
-        serverSocketChannel.register(selector, SelectionKey.OP_ACCEPT, serverSocketChannel);
-    }
-
-    private void onNewTransport(Transport transport) {
-        transport.setDispatcher(getDispatcher());
-        dispatch(TransportEvent.createNewTransportEvent(transport));
-    }
-}

http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/7d9261af/lib/haox-event/src/main/java/org/apache/haox/transport/Transport.java
----------------------------------------------------------------------
diff --git a/lib/haox-event/src/main/java/org/apache/haox/transport/Transport.java b/lib/haox-event/src/main/java/org/apache/haox/transport/Transport.java
deleted file mode 100644
index d4239f7..0000000
--- a/lib/haox-event/src/main/java/org/apache/haox/transport/Transport.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.haox.transport;
-
-import org.apache.haox.event.Dispatcher;
-import org.apache.haox.transport.buffer.TransBuffer;
-import org.apache.haox.transport.event.TransportEvent;
-
-import java.io.IOException;
-import java.net.InetSocketAddress;
-import java.nio.ByteBuffer;
-
-public abstract class Transport {
-    private InetSocketAddress remoteAddress;
-    protected Dispatcher dispatcher;
-    private Object attachment;
-
-    protected TransBuffer sendBuffer;
-
-    private int readableCount = 0;
-    private int writableCount = 0;
-
-    public Transport(InetSocketAddress remoteAddress) {
-        this.remoteAddress = remoteAddress;
-        this.sendBuffer = new TransBuffer();
-    }
-
-    public void setDispatcher(Dispatcher dispatcher) {
-        this.dispatcher = dispatcher;
-    }
-
-    public InetSocketAddress getRemoteAddress() {
-        return remoteAddress;
-    }
-
-    public void sendMessage(ByteBuffer message) {
-        if (message != null) {
-            sendBuffer.write(message);
-            dispatcher.dispatch(TransportEvent.createWritableTransportEvent(this));
-        }
-    }
-
-    public void onWriteable() throws IOException {
-        this.writableCount ++;
-
-        if (! sendBuffer.isEmpty()) {
-            ByteBuffer message = sendBuffer.read();
-            if (message != null) {
-                sendOutMessage(message);
-            }
-        }
-    }
-
-    public void onReadable() throws IOException {
-        this.readableCount++;
-    }
-
-    protected abstract void sendOutMessage(ByteBuffer message) throws IOException;
-
-    public void setAttachment(Object attachment) {
-        this.attachment = attachment;
-    }
-
-    public Object getAttachment() {
-        return attachment;
-    }
-}

http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/7d9261af/lib/haox-event/src/main/java/org/apache/haox/transport/TransportHandler.java
----------------------------------------------------------------------
diff --git a/lib/haox-event/src/main/java/org/apache/haox/transport/TransportHandler.java b/lib/haox-event/src/main/java/org/apache/haox/transport/TransportHandler.java
deleted file mode 100644
index fd5a7f2..0000000
--- a/lib/haox-event/src/main/java/org/apache/haox/transport/TransportHandler.java
+++ /dev/null
@@ -1,34 +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.haox.transport;
-
-import org.apache.haox.event.AbstractEventHandler;
-
-import java.io.IOException;
-import java.nio.channels.SelectionKey;
-
-/**
- * Handling readable and writable events
- */
-public abstract class TransportHandler extends AbstractEventHandler {
-
-    public abstract void helpHandleSelectionKey(SelectionKey selectionKey) throws IOException;
-
-}

http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/7d9261af/lib/haox-event/src/main/java/org/apache/haox/transport/TransportSelector.java
----------------------------------------------------------------------
diff --git a/lib/haox-event/src/main/java/org/apache/haox/transport/TransportSelector.java b/lib/haox-event/src/main/java/org/apache/haox/transport/TransportSelector.java
deleted file mode 100644
index 33424a4..0000000
--- a/lib/haox-event/src/main/java/org/apache/haox/transport/TransportSelector.java
+++ /dev/null
@@ -1,100 +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.haox.transport;
-
-import org.apache.haox.event.Dispatcher;
-import org.apache.haox.event.LongRunningEventHandler;
-import org.apache.haox.transport.event.TransportEvent;
-
-import java.io.IOException;
-import java.nio.channels.SelectionKey;
-import java.nio.channels.Selector;
-import java.util.Iterator;
-import java.util.Set;
-
-public abstract class TransportSelector extends LongRunningEventHandler {
-
-    protected Selector selector;
-    protected TransportHandler transportHandler;
-
-    public TransportSelector(TransportHandler transportHandler) {
-        super();
-        this.transportHandler = transportHandler;
-    }
-
-    @Override
-    public void setDispatcher(Dispatcher dispatcher) {
-        super.setDispatcher(dispatcher);
-        dispatcher.register(transportHandler);
-    }
-
-    @Override
-    public void init() {
-        super.init();
-
-        try {
-            selector = Selector.open();
-        } catch (IOException e) {
-            throw new RuntimeException(e);
-        }
-    }
-
-    @Override
-    protected void loopOnce() {
-        try {
-            selectOnce();
-        } catch (IOException e) {
-            throw new RuntimeException(e);
-        }
-    }
-
-    protected void selectOnce() throws IOException {
-        if (selector.isOpen() && selector.select(10) > 0 && selector.isOpen()) {
-            Set<SelectionKey> selectionKeys = selector.selectedKeys();
-            Iterator<SelectionKey> iterator = selectionKeys.iterator();
-            while (iterator.hasNext()) {
-                SelectionKey selectionKey = iterator.next();
-                dealKey(selectionKey);
-                iterator.remove();
-            }
-            selectionKeys.clear();
-        }
-    }
-
-    protected void dealKey(SelectionKey selectionKey) throws IOException {
-        transportHandler.helpHandleSelectionKey(selectionKey);
-    }
-
-    protected void onNewTransport(Transport transport) {
-        transport.setDispatcher(getDispatcher());
-        dispatch(TransportEvent.createNewTransportEvent(transport));
-    }
-
-    @Override
-    public void stop() {
-        super.stop();
-
-        try {
-            selector.close();
-        } catch (IOException e) {
-            e.printStackTrace();
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/7d9261af/lib/haox-event/src/main/java/org/apache/haox/transport/buffer/BufferPool.java
----------------------------------------------------------------------
diff --git a/lib/haox-event/src/main/java/org/apache/haox/transport/buffer/BufferPool.java b/lib/haox-event/src/main/java/org/apache/haox/transport/buffer/BufferPool.java
deleted file mode 100644
index 213ec1f..0000000
--- a/lib/haox-event/src/main/java/org/apache/haox/transport/buffer/BufferPool.java
+++ /dev/null
@@ -1,33 +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.haox.transport.buffer;
-
-import java.nio.ByteBuffer;
-
-public class BufferPool {
-
-    public static ByteBuffer allocate(int len) {
-        return ByteBuffer.allocate(len);
-    }
-
-    public static void release(ByteBuffer buffer) {
-
-    }
-}

http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/7d9261af/lib/haox-event/src/main/java/org/apache/haox/transport/buffer/BufferUtil.java
----------------------------------------------------------------------
diff --git a/lib/haox-event/src/main/java/org/apache/haox/transport/buffer/BufferUtil.java b/lib/haox-event/src/main/java/org/apache/haox/transport/buffer/BufferUtil.java
deleted file mode 100644
index 292349a..0000000
--- a/lib/haox-event/src/main/java/org/apache/haox/transport/buffer/BufferUtil.java
+++ /dev/null
@@ -1,42 +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.haox.transport.buffer;
-
-import java.nio.BufferOverflowException;
-import java.nio.ByteBuffer;
-
-public class BufferUtil {
-
-    /**
-     * Read len bytes from src buffer
-     */
-    public static ByteBuffer read(ByteBuffer src, int len) {
-        if (len > src.remaining())
-            throw new BufferOverflowException();
-
-        ByteBuffer result = ByteBuffer.allocate(len);
-        int n = src.remaining();
-        for (int i = 0; i < n; i++) {
-            result.put(src.get());
-        }
-
-        return result;
-    }
-}

http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/7d9261af/lib/haox-event/src/main/java/org/apache/haox/transport/buffer/RecvBuffer.java
----------------------------------------------------------------------
diff --git a/lib/haox-event/src/main/java/org/apache/haox/transport/buffer/RecvBuffer.java b/lib/haox-event/src/main/java/org/apache/haox/transport/buffer/RecvBuffer.java
deleted file mode 100644
index a8d5b7b..0000000
--- a/lib/haox-event/src/main/java/org/apache/haox/transport/buffer/RecvBuffer.java
+++ /dev/null
@@ -1,155 +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.haox.transport.buffer;
-
-import java.nio.BufferOverflowException;
-import java.nio.ByteBuffer;
-import java.util.Iterator;
-import java.util.LinkedList;
-
-public class RecvBuffer {
-
-    private LinkedList<ByteBuffer> bufferQueue;
-
-    public RecvBuffer() {
-        bufferQueue = new LinkedList<ByteBuffer>();
-    }
-
-    public synchronized void write(ByteBuffer buffer) {
-        bufferQueue.addLast(buffer);
-    }
-
-    /**
-     * Put buffer as the first into the buffer queue
-     */
-    public synchronized void writeFirst(ByteBuffer buffer) {
-        bufferQueue.addFirst(buffer);
-    }
-
-    /**
-     * Read and return the first buffer if available
-     */
-    public synchronized ByteBuffer readFirst() {
-        if (! bufferQueue.isEmpty()) {
-            return bufferQueue.removeFirst();
-        }
-        return null;
-    }
-
-    /**
-     * Read most available bytes into the dst buffer
-     */
-    public synchronized ByteBuffer readMostBytes() {
-        int len = remaining();
-        return readBytes(len);
-    }
-
-    /**
-     * Read len bytes into the dst buffer if available
-     */
-    public synchronized ByteBuffer readBytes(int len) {
-        if (remaining() < len) { // no enough data that's available
-            throw new BufferOverflowException();
-        }
-
-        ByteBuffer result = null;
-
-        ByteBuffer takenBuffer;
-        if (bufferQueue.size() == 1) {
-            takenBuffer = bufferQueue.removeFirst();
-
-            if (takenBuffer.remaining() == len) {
-                return takenBuffer;
-            }
-
-            result = BufferPool.allocate(len);
-            for (int i = 0; i < len; i++) {
-                result.put(takenBuffer.get());
-            }
-            // Has left bytes so put it back for future reading
-            if (takenBuffer.remaining() > 0) {
-                bufferQueue.addFirst(takenBuffer);
-            }
-        } else {
-            result = BufferPool.allocate(len);
-
-            Iterator<ByteBuffer> iter = bufferQueue.iterator();
-            int alreadyGot = 0, toGet;
-            while (iter.hasNext()) {
-                takenBuffer = iter.next();
-                iter.remove();
-
-                toGet = takenBuffer.remaining() < len - alreadyGot ?
-                    takenBuffer.remaining() : len -alreadyGot;
-                byte[] toGetBytes = new byte[toGet];
-                takenBuffer.get(toGetBytes);
-                result.put(toGetBytes);
-
-                if (takenBuffer.remaining() > 0) {
-                    bufferQueue.addFirst(takenBuffer);
-                }
-
-                alreadyGot += toGet;
-                if (alreadyGot == len) {
-                    break;
-                }
-            }
-        }
-        result.flip();
-
-        return result;
-    }
-
-    public boolean isEmpty() {
-        return bufferQueue.isEmpty();
-    }
-
-    /**
-     * Return count of remaining and left bytes that's available
-     */
-    public int remaining() {
-        if (bufferQueue.isEmpty()) {
-            return 0;
-        } else if (bufferQueue.size() == 1) {
-            return bufferQueue.getFirst().remaining();
-        }
-
-        int result = 0;
-        Iterator<ByteBuffer> iter = bufferQueue.iterator();
-        while (iter.hasNext()) {
-            result += iter.next().remaining();
-        }
-        return result;
-    }
-
-    public synchronized void clear() {
-        if (bufferQueue.isEmpty()) {
-            return;
-        } else if (bufferQueue.size() == 1) {
-            BufferPool.release(bufferQueue.getFirst());
-        }
-
-        Iterator<ByteBuffer> iter = bufferQueue.iterator();
-        while (iter.hasNext()) {
-            BufferPool.release(iter.next());
-        }
-        bufferQueue.clear();
-    }
-}

http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/7d9261af/lib/haox-event/src/main/java/org/apache/haox/transport/buffer/TransBuffer.java
----------------------------------------------------------------------
diff --git a/lib/haox-event/src/main/java/org/apache/haox/transport/buffer/TransBuffer.java b/lib/haox-event/src/main/java/org/apache/haox/transport/buffer/TransBuffer.java
deleted file mode 100644
index 6ddb011..0000000
--- a/lib/haox-event/src/main/java/org/apache/haox/transport/buffer/TransBuffer.java
+++ /dev/null
@@ -1,49 +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.haox.transport.buffer;
-
-import java.nio.ByteBuffer;
-import java.util.concurrent.ArrayBlockingQueue;
-import java.util.concurrent.BlockingQueue;
-
-public class TransBuffer {
-
-    private BlockingQueue<ByteBuffer> bufferQueue;
-
-    public TransBuffer() {
-        bufferQueue = new ArrayBlockingQueue<ByteBuffer>(2);
-    }
-
-    public void write(ByteBuffer buffer) {
-        bufferQueue.add(buffer);
-    }
-
-    public void write(byte[] buffer) {
-        write(ByteBuffer.wrap(buffer));
-    }
-
-    public ByteBuffer read() {
-        return bufferQueue.poll();
-    }
-
-    public boolean isEmpty() {
-        return bufferQueue.isEmpty();
-    }
-}

http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/7d9261af/lib/haox-event/src/main/java/org/apache/haox/transport/event/AddressEvent.java
----------------------------------------------------------------------
diff --git a/lib/haox-event/src/main/java/org/apache/haox/transport/event/AddressEvent.java b/lib/haox-event/src/main/java/org/apache/haox/transport/event/AddressEvent.java
deleted file mode 100644
index 3bc8e37..0000000
--- a/lib/haox-event/src/main/java/org/apache/haox/transport/event/AddressEvent.java
+++ /dev/null
@@ -1,39 +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.haox.transport.event;
-
-import org.apache.haox.event.Event;
-import org.apache.haox.event.EventType;
-
-import java.net.InetSocketAddress;
-
-public class AddressEvent extends Event {
-
-    private InetSocketAddress address;
-
-    public AddressEvent(InetSocketAddress address, EventType eventType) {
-        super(eventType);
-        this.address = address;
-    }
-
-    public InetSocketAddress getAddress() {
-        return address;
-    }
-}

http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/7d9261af/lib/haox-event/src/main/java/org/apache/haox/transport/event/MessageEvent.java
----------------------------------------------------------------------
diff --git a/lib/haox-event/src/main/java/org/apache/haox/transport/event/MessageEvent.java b/lib/haox-event/src/main/java/org/apache/haox/transport/event/MessageEvent.java
deleted file mode 100644
index 4aacbfb..0000000
--- a/lib/haox-event/src/main/java/org/apache/haox/transport/event/MessageEvent.java
+++ /dev/null
@@ -1,41 +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.haox.transport.event;
-
-import org.apache.haox.transport.Transport;
-
-import java.nio.ByteBuffer;
-
-public class MessageEvent extends TransportEvent {
-
-    private MessageEvent(Transport transport, ByteBuffer message) {
-        super(transport, TransportEventType.INBOUND_MESSAGE, message);
-    }
-
-    public ByteBuffer getMessage() {
-        return (ByteBuffer) getEventData();
-    }
-
-    public static MessageEvent createInboundMessageEvent(
-            Transport transport, ByteBuffer message) {
-        return new MessageEvent(transport, message);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/7d9261af/lib/haox-event/src/main/java/org/apache/haox/transport/event/TransportEvent.java
----------------------------------------------------------------------
diff --git a/lib/haox-event/src/main/java/org/apache/haox/transport/event/TransportEvent.java b/lib/haox-event/src/main/java/org/apache/haox/transport/event/TransportEvent.java
deleted file mode 100644
index 8399111..0000000
--- a/lib/haox-event/src/main/java/org/apache/haox/transport/event/TransportEvent.java
+++ /dev/null
@@ -1,56 +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.haox.transport.event;
-
-import org.apache.haox.event.Event;
-import org.apache.haox.event.EventType;
-import org.apache.haox.transport.Transport;
-
-public class TransportEvent extends Event {
-
-    private Transport transport;
-
-    public TransportEvent(Transport transport, EventType eventType) {
-        super(eventType);
-        this.transport = transport;
-    }
-
-    public TransportEvent(Transport transport, EventType eventType, Object eventData) {
-        super(eventType, eventData);
-        this.transport = transport;
-    }
-
-    public Transport getTransport() {
-        return transport;
-    }
-
-    public static TransportEvent createWritableTransportEvent(Transport transport) {
-        return new TransportEvent(transport, TransportEventType.TRANSPORT_WRITABLE);
-    }
-
-    public static TransportEvent createReadableTransportEvent(Transport transport) {
-        return new TransportEvent(transport, TransportEventType.TRANSPORT_READABLE);
-    }
-
-    public static TransportEvent createNewTransportEvent(Transport transport) {
-        return new TransportEvent(transport, TransportEventType.NEW_TRANSPORT);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/7d9261af/lib/haox-event/src/main/java/org/apache/haox/transport/event/TransportEventType.java
----------------------------------------------------------------------
diff --git a/lib/haox-event/src/main/java/org/apache/haox/transport/event/TransportEventType.java b/lib/haox-event/src/main/java/org/apache/haox/transport/event/TransportEventType.java
deleted file mode 100644
index effcf36..0000000
--- a/lib/haox-event/src/main/java/org/apache/haox/transport/event/TransportEventType.java
+++ /dev/null
@@ -1,29 +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.haox.transport.event;
-
-import org.apache.haox.event.EventType;
-
-public enum TransportEventType implements EventType {
-    NEW_TRANSPORT,
-    TRANSPORT_WRITABLE,
-    TRANSPORT_READABLE,
-    INBOUND_MESSAGE
-}

http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/7d9261af/lib/haox-event/src/main/java/org/apache/haox/transport/tcp/DecodingCallback.java
----------------------------------------------------------------------
diff --git a/lib/haox-event/src/main/java/org/apache/haox/transport/tcp/DecodingCallback.java b/lib/haox-event/src/main/java/org/apache/haox/transport/tcp/DecodingCallback.java
deleted file mode 100644
index d9408ca..0000000
--- a/lib/haox-event/src/main/java/org/apache/haox/transport/tcp/DecodingCallback.java
+++ /dev/null
@@ -1,38 +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.haox.transport.tcp;
-
-public interface DecodingCallback {
-
-    /**
-     * OK, enough data is ready, a message can be out
-     */
-    public void onMessageComplete(int messageLength);
-
-    /**
-     * Need more data to be available
-     */
-    public void onMoreDataNeeded();
-
-    /**
-     * Need more data to be available, with determined more data length given
-     */
-    public void onMoreDataNeeded(int needDataLength);
-}

http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/7d9261af/lib/haox-event/src/main/java/org/apache/haox/transport/tcp/StreamingDecoder.java
----------------------------------------------------------------------
diff --git a/lib/haox-event/src/main/java/org/apache/haox/transport/tcp/StreamingDecoder.java b/lib/haox-event/src/main/java/org/apache/haox/transport/tcp/StreamingDecoder.java
deleted file mode 100644
index 03dd511..0000000
--- a/lib/haox-event/src/main/java/org/apache/haox/transport/tcp/StreamingDecoder.java
+++ /dev/null
@@ -1,26 +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.haox.transport.tcp;
-
-import java.nio.ByteBuffer;
-
-public interface StreamingDecoder {
-    public void decode(ByteBuffer streamingBuffer, DecodingCallback callback);
-}


Mime
View raw message