Author: jvermillard
Date: Thu Sep 13 07:23:10 2007
New Revision: 575322

URL: http://svn.apache.org/viewvc?rev=575322&view=rev
Log:
Better APR library loading and support for UDP and SCTP

Added:
    
mina/sandbox/jvermillard/apr/src/main/java/org/apache/mina/transport/apr/APRLibrary.java
    
mina/sandbox/jvermillard/apr/src/main/java/org/apache/mina/transport/apr/APRProtocol.java
Modified:
    
mina/sandbox/jvermillard/apr/src/main/java/org/apache/mina/transport/apr/APRConnector.java
    
mina/sandbox/jvermillard/apr/src/main/java/org/apache/mina/transport/apr/APRFilterChain.java
    
mina/sandbox/jvermillard/apr/src/main/java/org/apache/mina/transport/apr/APRIoProcessor.java
    
mina/sandbox/jvermillard/apr/src/main/java/org/apache/mina/transport/apr/APRSession.java
    
mina/sandbox/jvermillard/apr/src/main/java/org/apache/mina/transport/apr/APRSessionConfig.java
    
mina/sandbox/jvermillard/apr/src/main/java/org/apache/mina/transport/apr/APRSessionImpl.java
    
mina/sandbox/jvermillard/apr/src/main/java/org/apache/mina/transport/apr/AbstractAPRSessionConfig.java
    
mina/sandbox/jvermillard/apr/src/main/java/org/apache/mina/transport/apr/DefaultAPRSessionConfig.java

Modified: 
mina/sandbox/jvermillard/apr/src/main/java/org/apache/mina/transport/apr/APRConnector.java
URL: 
http://svn.apache.org/viewvc/mina/sandbox/jvermillard/apr/src/main/java/org/apache/mina/transport/apr/APRConnector.java?rev=575322&r1=575321&r2=575322&view=diff
==============================================================================
--- 
mina/sandbox/jvermillard/apr/src/main/java/org/apache/mina/transport/apr/APRConnector.java
 (original)
+++ 
mina/sandbox/jvermillard/apr/src/main/java/org/apache/mina/transport/apr/APRConnector.java
 Thu Sep 13 07:23:10 2007
@@ -1,3 +1,22 @@
+/*
+ *  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.mina.transport.apr;
 
 import java.io.IOException;
@@ -9,6 +28,7 @@
 import org.apache.mina.common.AbstractIoFilterChain;
 import org.apache.mina.common.ConnectFuture;
 import org.apache.mina.common.DefaultConnectFuture;
+import org.apache.mina.common.IoConnector;
 import org.apache.mina.common.IoServiceListenerSupport;
 import org.apache.mina.common.TransportMetadata;
 import org.apache.mina.util.NewThreadExecutor;
@@ -16,6 +36,16 @@
 import org.apache.tomcat.jni.Pool;
 import org.apache.tomcat.jni.Socket;
 
+/**
+ * An [EMAIL PROTECTED] IoConnector} implementation using the Apache Portable 
Runtime 
+ * (APR : http://apr.apache.org) for providing socket.
+ * It's supporting different transport protocol, so you need to give the 
+ * wanted [EMAIL PROTECTED] APRProtocol} as parameter to the constructor.
+ * @see APRSession
+ * @see APRProtocol
+ * @author The Apache MINA Project ([EMAIL PROTECTED])
+ * @version $Rev:  $, $Date:  $
+ */
 public class APRConnector extends AbstractIoConnector {
 
        /**
@@ -36,35 +66,42 @@
 
        private int processorDistributor = 0;
 
-       // APR memory pool (package wide mother pool)
-       static long pool = -1;
-
+       private APRProtocol protocol;
+       
        /**
         * Create a connector with a single processing thread using a
         * NewThreadExecutor
+        * @param protocol 
+        *            The needed socket protocol (TCP,UDP,...)
         */
-       public APRConnector() {
-               this(1, new NewThreadExecutor());
+       public APRConnector(APRProtocol protocol) {
+               this(protocol,1, new NewThreadExecutor());
        }
 
        /**
         * Create a connector with the desired number of processing threads
         * 
+        * @param protocol 
+        *                        The needed socket protocol (TCP,UDP,...)
         * @param processorCount
         *            Number of processing threads
         * @param executor
         *            Executor to use for launching threads
         */
-       public APRConnector(int processorCount, Executor executor) {
+       public APRConnector(APRProtocol protocol,int processorCount, Executor 
executor) {
                super(new DefaultAPRSessionConfig());
+               
+               this.protocol=protocol;
+               
+               // load  the APR library
+               
+               APRLibrary.initialize();
+               
                if (processorCount < 1) {
                        throw new IllegalArgumentException(
                                        "Must have at least one processor");
                }
 
-               if (pool == -1)
-                       pool = Pool.create(0);
-
                this.executor = executor;
                this.processorCount = processorCount;
                ioProcessors = new APRIoProcessor[processorCount];
@@ -81,14 +118,14 @@
                boolean success = false;
                try {
                        InetSocketAddress sockAddr = (InetSocketAddress) 
remoteAddress;
-                       pool = Pool.create(pool);
+                       //pool = Pool.create(pool);
                        long inetAddr = 0;
                        inetAddr = Address.info(sockAddr.getHostName(), 
Socket.APR_INET,
-                                       sockAddr.getPort(), 0, pool);
+                                       sockAddr.getPort(), 0, 
APRLibrary.getLibrary().getPool());
 
                        // TODO : type of socket need to be configurable
                        long clientSock = Socket.create(Socket.APR_INET,
-                                       Socket.SOCK_STREAM, 
Socket.APR_PROTO_TCP, pool);
+                                       Socket.SOCK_STREAM, protocol.codeProto, 
APRLibrary.getLibrary().getPool());
                        
                        
                        
@@ -116,9 +153,9 @@
                        
session.setAttribute(AbstractIoFilterChain.CONNECT_FUTURE, future);
 
                        // Forward the remaining process to the APRIoProcessor.
+                       // it's will validate the COnnectFuture when the 
session is in the poll set
                        session.getIoProcessor().addNew(session);
-                       //future.setSession(session);
-
+                       
                        success = true;
                        return future;
                } catch (Exception e) {
@@ -138,12 +175,6 @@
                }
 
                return ioProcessors[processorDistributor % processorCount];
-       }
-
-       @Override
-       protected void finalize() throws Throwable {
-//              TODO : necessary I think, need to check APR doc
-               Pool.clear(pool);
        }
 
        public TransportMetadata getTransportMetadata() {

Modified: 
mina/sandbox/jvermillard/apr/src/main/java/org/apache/mina/transport/apr/APRFilterChain.java
URL: 
http://svn.apache.org/viewvc/mina/sandbox/jvermillard/apr/src/main/java/org/apache/mina/transport/apr/APRFilterChain.java?rev=575322&r1=575321&r2=575322&view=diff
==============================================================================
--- 
mina/sandbox/jvermillard/apr/src/main/java/org/apache/mina/transport/apr/APRFilterChain.java
 (original)
+++ 
mina/sandbox/jvermillard/apr/src/main/java/org/apache/mina/transport/apr/APRFilterChain.java
 Thu Sep 13 07:23:10 2007
@@ -1,3 +1,22 @@
+/*
+ *  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.mina.transport.apr;
 
 import java.io.IOException;
@@ -5,10 +24,19 @@
 
 import org.apache.mina.common.AbstractIoFilterChain;
 import org.apache.mina.common.ByteBuffer;
+import org.apache.mina.common.IoConnector;
+import org.apache.mina.common.IoFilterChain;
+import org.apache.mina.common.IoService;
 import org.apache.mina.common.IoSession;
 import org.apache.mina.common.WriteRequest;
 
-public class APRFilterChain extends AbstractIoFilterChain {
+/**
+ * An [EMAIL PROTECTED] IoFilterChain} for the APR based [EMAIL PROTECTED] 
IoService}.
+ * 
+ * @author The Apache MINA Project ([EMAIL PROTECTED])
+ * @version $Rev:  $, $Date:  $
+ */
+class APRFilterChain extends AbstractIoFilterChain {
 
        APRFilterChain(IoSession parent) {
                super(parent);

Modified: 
mina/sandbox/jvermillard/apr/src/main/java/org/apache/mina/transport/apr/APRIoProcessor.java
URL: 
http://svn.apache.org/viewvc/mina/sandbox/jvermillard/apr/src/main/java/org/apache/mina/transport/apr/APRIoProcessor.java?rev=575322&r1=575321&r2=575322&view=diff
==============================================================================
--- 
mina/sandbox/jvermillard/apr/src/main/java/org/apache/mina/transport/apr/APRIoProcessor.java
 (original)
+++ 
mina/sandbox/jvermillard/apr/src/main/java/org/apache/mina/transport/apr/APRIoProcessor.java
 Thu Sep 13 07:23:10 2007
@@ -1,3 +1,22 @@
+/*
+ *  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.mina.transport.apr;
 
 import java.util.HashMap;
@@ -11,6 +30,7 @@
 import org.apache.mina.common.ConnectFuture;
 import org.apache.mina.common.ExceptionMonitor;
 import org.apache.mina.common.IdleStatus;
+import org.apache.mina.common.IoFilterChain;
 import org.apache.mina.common.IoService;
 import org.apache.mina.common.IoSession;
 import org.apache.mina.common.WriteRequest;
@@ -23,8 +43,14 @@
 import org.apache.tomcat.jni.Status;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
+/**
+ * The class in charge of processing socket level IO events for the [EMAIL 
PROTECTED] APRConnector}
+ * 
+ * @author The Apache MINA Project ([EMAIL PROTECTED])
+ * @version $Rev:  $, $Date:  $
+ */
 
-public class APRIoProcessor {
+class APRIoProcessor {
 
        private final Logger logger = LoggerFactory.getLogger(getClass());
 
@@ -57,7 +83,7 @@
                this.executor = executor;
 
                // initialize a memory pool for APR functions
-               pool = Pool.create(APRConnector.pool);
+               pool = Pool.create(APRLibrary.getLibrary().getPool());
                try {
 
                        // TODO : optimize/parametrize those values

Added: 
mina/sandbox/jvermillard/apr/src/main/java/org/apache/mina/transport/apr/APRLibrary.java
URL: 
http://svn.apache.org/viewvc/mina/sandbox/jvermillard/apr/src/main/java/org/apache/mina/transport/apr/APRLibrary.java?rev=575322&view=auto
==============================================================================
--- 
mina/sandbox/jvermillard/apr/src/main/java/org/apache/mina/transport/apr/APRLibrary.java
 (added)
+++ 
mina/sandbox/jvermillard/apr/src/main/java/org/apache/mina/transport/apr/APRLibrary.java
 Thu Sep 13 07:23:10 2007
@@ -0,0 +1,77 @@
+/*
+ *  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.mina.transport.apr;
+
+import org.apache.mina.common.IoFilterChain;
+import org.apache.mina.common.IoService;
+import org.apache.tomcat.jni.Library;
+import org.apache.tomcat.jni.Pool;
+
+/**
+ * Internal singleton used for initializing corretcly the APR native library
+ * and the associated memory pool.
+ * 
+ * @author The Apache MINA Project ([EMAIL PROTECTED])
+ * @version $Rev:  $, $Date:  $
+ */
+class APRLibrary {
+       
+       // is APR library was initialized (load of native libraries)
+       private static APRLibrary library=null;
+       
+       
+       static synchronized APRLibrary getLibrary() {
+               if(!isInitialized())
+                       initialize();
+               return library; 
+       }
+
+       static synchronized void initialize() {
+               if(library==null)
+                       library=new APRLibrary();
+       }
+       
+       static synchronized boolean isInitialized() {
+               return library!=null;
+       }
+       
+       
+       
+       // APR memory pool (package wide mother pool)   
+       private long pool = -1;
+       
+       private APRLibrary() {
+               try {
+                       Library.initialize(null);
+               } catch (Exception e) {
+                       throw new RuntimeException("Error loading Apache 
Portable Runtime (APR)",e);
+               }
+               pool = Pool.create(0);          
+       }
+       
+       protected void finalize() throws Throwable {
+               //               TODO : necessary I think, need to check APR doc
+               Pool.clear(pool);
+       }
+       
+       public long getPool() {
+               return pool;
+       }
+}

Added: 
mina/sandbox/jvermillard/apr/src/main/java/org/apache/mina/transport/apr/APRProtocol.java
URL: 
http://svn.apache.org/viewvc/mina/sandbox/jvermillard/apr/src/main/java/org/apache/mina/transport/apr/APRProtocol.java?rev=575322&view=auto
==============================================================================
--- 
mina/sandbox/jvermillard/apr/src/main/java/org/apache/mina/transport/apr/APRProtocol.java
 (added)
+++ 
mina/sandbox/jvermillard/apr/src/main/java/org/apache/mina/transport/apr/APRProtocol.java
 Thu Sep 13 07:23:10 2007
@@ -0,0 +1,39 @@
+/*
+ *  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.mina.transport.apr;
+
+import org.apache.tomcat.jni.Socket;
+
+/**
+ * Protocol usable with the [EMAIL PROTECTED] APRConnector}.
+ * 
+ * @author The Apache MINA Project ([EMAIL PROTECTED])
+ * @version $Rev:  $, $Date:  $
+ */
+public enum APRProtocol {
+       TCP(Socket.APR_PROTO_TCP),
+       UDP(Socket.APR_PROTO_UDP),
+       SCTP(Socket.APR_PROTO_SCTP);
+       
+       int codeProto;
+    private APRProtocol(int codeProto) {
+        this.codeProto=codeProto;
+    }
+}

Modified: 
mina/sandbox/jvermillard/apr/src/main/java/org/apache/mina/transport/apr/APRSession.java
URL: 
http://svn.apache.org/viewvc/mina/sandbox/jvermillard/apr/src/main/java/org/apache/mina/transport/apr/APRSession.java?rev=575322&r1=575321&r2=575322&view=diff
==============================================================================
--- 
mina/sandbox/jvermillard/apr/src/main/java/org/apache/mina/transport/apr/APRSession.java
 (original)
+++ 
mina/sandbox/jvermillard/apr/src/main/java/org/apache/mina/transport/apr/APRSession.java
 Thu Sep 13 07:23:10 2007
@@ -1,9 +1,34 @@
+/*
+ *  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.mina.transport.apr;
 
 import java.net.InetSocketAddress;
 
 import org.apache.mina.common.IoSession;
 
+/**
+ * [EMAIL PROTECTED] IoSession} for the [EMAIL PROTECTED] APRConnector}
+ * 
+ * @author The Apache MINA Project ([EMAIL PROTECTED])
+ * @version $Rev:  $, $Date:  $
+ */
 public interface APRSession extends IoSession {
        APRSessionConfig getConfig();
 

Modified: 
mina/sandbox/jvermillard/apr/src/main/java/org/apache/mina/transport/apr/APRSessionConfig.java
URL: 
http://svn.apache.org/viewvc/mina/sandbox/jvermillard/apr/src/main/java/org/apache/mina/transport/apr/APRSessionConfig.java?rev=575322&r1=575321&r2=575322&view=diff
==============================================================================
--- 
mina/sandbox/jvermillard/apr/src/main/java/org/apache/mina/transport/apr/APRSessionConfig.java
 (original)
+++ 
mina/sandbox/jvermillard/apr/src/main/java/org/apache/mina/transport/apr/APRSessionConfig.java
 Thu Sep 13 07:23:10 2007
@@ -1,9 +1,35 @@
+/*
+ *  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.mina.transport.apr;
 
 import java.net.Socket;
 
+import org.apache.mina.common.IoSession;
 import org.apache.mina.common.IoSessionConfig;
 
+/**
+ * [EMAIL PROTECTED] IoSessionConfig} for configuring [EMAIL PROTECTED] 
APRSession} options.
+ * 
+ * @author The Apache MINA Project ([EMAIL PROTECTED])
+ * @version $Rev:  $, $Date:  $
+ */
 public interface APRSessionConfig extends IoSessionConfig {
        
     /**

Modified: 
mina/sandbox/jvermillard/apr/src/main/java/org/apache/mina/transport/apr/APRSessionImpl.java
URL: 
http://svn.apache.org/viewvc/mina/sandbox/jvermillard/apr/src/main/java/org/apache/mina/transport/apr/APRSessionImpl.java?rev=575322&r1=575321&r2=575322&view=diff
==============================================================================
--- 
mina/sandbox/jvermillard/apr/src/main/java/org/apache/mina/transport/apr/APRSessionImpl.java
 (original)
+++ 
mina/sandbox/jvermillard/apr/src/main/java/org/apache/mina/transport/apr/APRSessionImpl.java
 Thu Sep 13 07:23:10 2007
@@ -1,3 +1,22 @@
+/*
+ *  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.mina.transport.apr;
 
 import java.net.InetSocketAddress;
@@ -11,13 +30,20 @@
 import org.apache.mina.common.IoFilterChain;
 import org.apache.mina.common.IoHandler;
 import org.apache.mina.common.IoService;
+import org.apache.mina.common.IoSession;
 import org.apache.mina.common.IoSessionConfig;
 import org.apache.mina.common.RuntimeIOException;
 import org.apache.mina.common.TransportMetadata;
 import org.apache.mina.common.WriteRequest;
 import org.apache.tomcat.jni.Socket;
 
-public class APRSessionImpl extends AbstractIoSession implements APRSession {
+/**
+ * Implementation for [EMAIL PROTECTED] APRSession}
+ * 
+ * @author The Apache MINA Project ([EMAIL PROTECTED])
+ * @version $Rev:  $, $Date:  $
+ */
+class APRSessionImpl extends AbstractIoSession implements APRSession {
        private long socket;
 
        private final IoService service;

Modified: 
mina/sandbox/jvermillard/apr/src/main/java/org/apache/mina/transport/apr/AbstractAPRSessionConfig.java
URL: 
http://svn.apache.org/viewvc/mina/sandbox/jvermillard/apr/src/main/java/org/apache/mina/transport/apr/AbstractAPRSessionConfig.java?rev=575322&r1=575321&r2=575322&view=diff
==============================================================================
--- 
mina/sandbox/jvermillard/apr/src/main/java/org/apache/mina/transport/apr/AbstractAPRSessionConfig.java
 (original)
+++ 
mina/sandbox/jvermillard/apr/src/main/java/org/apache/mina/transport/apr/AbstractAPRSessionConfig.java
 Thu Sep 13 07:23:10 2007
@@ -1,9 +1,35 @@
+/*
+ *  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.mina.transport.apr;
 
 import org.apache.mina.common.AbstractIoSessionConfig;
+import org.apache.mina.common.IoFuture;
 import org.apache.mina.common.IoSessionConfig;
 
-public abstract class AbstractAPRSessionConfig extends AbstractIoSessionConfig 
implements APRSessionConfig {
+/**
+ * An abstract APRSessionConfig [EMAIL PROTECTED] APRSessionConfig}.
+ *  
+ * @author The Apache MINA Project ([EMAIL PROTECTED])
+ * @version $Rev:  $, $Date:  $
+ */
+abstract class AbstractAPRSessionConfig extends AbstractIoSessionConfig 
implements APRSessionConfig {
 
        public AbstractAPRSessionConfig() {
                super();

Modified: 
mina/sandbox/jvermillard/apr/src/main/java/org/apache/mina/transport/apr/DefaultAPRSessionConfig.java
URL: 
http://svn.apache.org/viewvc/mina/sandbox/jvermillard/apr/src/main/java/org/apache/mina/transport/apr/DefaultAPRSessionConfig.java?rev=575322&r1=575321&r2=575322&view=diff
==============================================================================
--- 
mina/sandbox/jvermillard/apr/src/main/java/org/apache/mina/transport/apr/DefaultAPRSessionConfig.java
 (original)
+++ 
mina/sandbox/jvermillard/apr/src/main/java/org/apache/mina/transport/apr/DefaultAPRSessionConfig.java
 Thu Sep 13 07:23:10 2007
@@ -1,7 +1,34 @@
+/*
+ *  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.mina.transport.apr;
 
+import org.apache.mina.common.IoSession;
 
-public class DefaultAPRSessionConfig extends AbstractAPRSessionConfig 
implements APRSessionConfig {
+
+/**
+ * Default configuration for [EMAIL PROTECTED] APRSession}
+ * 
+ * @author The Apache MINA Project ([EMAIL PROTECTED])
+ * @version $Rev:  $, $Date:  $
+ */
+class DefaultAPRSessionConfig extends AbstractAPRSessionConfig implements 
APRSessionConfig {
     
        private static boolean SET_RECEIVE_BUFFER_SIZE_AVAILABLE = false;
 


Reply via email to