mina-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jvermill...@apache.org
Subject svn commit: r551146 - in /mina/sandbox/jvermillard/apr: ./ lib/ src/ src/main/ src/main/java/ src/main/java/org/ src/main/java/org/apache/ src/main/java/org/apache/mina/ src/main/java/org/apache/mina/transport/ src/main/java/org/apache/mina/transport/apr/
Date Wed, 27 Jun 2007 12:42:41 GMT
Author: jvermillard
Date: Wed Jun 27 05:42:39 2007
New Revision: 551146

URL: http://svn.apache.org/viewvc?view=rev&rev=551146
Log:
APR (Apache Portable Runtime) based transport (WIP)

Added:
    mina/sandbox/jvermillard/apr/
    mina/sandbox/jvermillard/apr/lib/
    mina/sandbox/jvermillard/apr/lib/libapr-1.so   (with props)
    mina/sandbox/jvermillard/apr/lib/libapr-1.so.0   (with props)
    mina/sandbox/jvermillard/apr/lib/libapr-1.so.0.2.9   (with props)
    mina/sandbox/jvermillard/apr/lib/libtcnative-1.a   (with props)
    mina/sandbox/jvermillard/apr/lib/libtcnative-1.lai
    mina/sandbox/jvermillard/apr/lib/libtcnative-1.so   (with props)
    mina/sandbox/jvermillard/apr/lib/libtcnative-1.so.0   (with props)
    mina/sandbox/jvermillard/apr/lib/libtcnative-1.so.0.1.8   (with props)
    mina/sandbox/jvermillard/apr/lib/tomcat-native-1.0.0.jar   (with props)
    mina/sandbox/jvermillard/apr/src/
    mina/sandbox/jvermillard/apr/src/main/
    mina/sandbox/jvermillard/apr/src/main/java/
    mina/sandbox/jvermillard/apr/src/main/java/org/
    mina/sandbox/jvermillard/apr/src/main/java/org/apache/
    mina/sandbox/jvermillard/apr/src/main/java/org/apache/mina/
    mina/sandbox/jvermillard/apr/src/main/java/org/apache/mina/transport/
    mina/sandbox/jvermillard/apr/src/main/java/org/apache/mina/transport/apr/
    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/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

Added: mina/sandbox/jvermillard/apr/lib/libapr-1.so
URL: http://svn.apache.org/viewvc/mina/sandbox/jvermillard/apr/lib/libapr-1.so?view=auto&rev=551146
==============================================================================
Binary file - no diff available.

Propchange: mina/sandbox/jvermillard/apr/lib/libapr-1.so
------------------------------------------------------------------------------
    svn:executable = *

Propchange: mina/sandbox/jvermillard/apr/lib/libapr-1.so
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: mina/sandbox/jvermillard/apr/lib/libapr-1.so.0
URL: http://svn.apache.org/viewvc/mina/sandbox/jvermillard/apr/lib/libapr-1.so.0?view=auto&rev=551146
==============================================================================
Binary file - no diff available.

Propchange: mina/sandbox/jvermillard/apr/lib/libapr-1.so.0
------------------------------------------------------------------------------
    svn:executable = *

Propchange: mina/sandbox/jvermillard/apr/lib/libapr-1.so.0
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: mina/sandbox/jvermillard/apr/lib/libapr-1.so.0.2.9
URL: http://svn.apache.org/viewvc/mina/sandbox/jvermillard/apr/lib/libapr-1.so.0.2.9?view=auto&rev=551146
==============================================================================
Binary file - no diff available.

Propchange: mina/sandbox/jvermillard/apr/lib/libapr-1.so.0.2.9
------------------------------------------------------------------------------
    svn:executable = *

Propchange: mina/sandbox/jvermillard/apr/lib/libapr-1.so.0.2.9
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: mina/sandbox/jvermillard/apr/lib/libtcnative-1.a
URL: http://svn.apache.org/viewvc/mina/sandbox/jvermillard/apr/lib/libtcnative-1.a?view=auto&rev=551146
==============================================================================
Binary file - no diff available.

Propchange: mina/sandbox/jvermillard/apr/lib/libtcnative-1.a
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: mina/sandbox/jvermillard/apr/lib/libtcnative-1.lai
URL: http://svn.apache.org/viewvc/mina/sandbox/jvermillard/apr/lib/libtcnative-1.lai?view=auto&rev=551146
==============================================================================
--- mina/sandbox/jvermillard/apr/lib/libtcnative-1.lai (added)
+++ mina/sandbox/jvermillard/apr/lib/libtcnative-1.lai Wed Jun 27 05:42:39 2007
@@ -0,0 +1,35 @@
+# libtcnative-1.la - a libtool library file
+# Generated by ltmain.sh - GNU libtool 1.5.20 (1.1220.2.287 2005/08/31 18:54:15)
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# The name that we can dlopen(3).
+dlname='libtcnative-1.so.0'
+
+# Names of this library.
+library_names='libtcnative-1.so.0.1.8 libtcnative-1.so.0 libtcnative-1.so'
+
+# The name of the static archive.
+old_library='libtcnative-1.a'
+
+# Libraries that this one depends upon.
+dependency_libs=' /usr/local/apr/lib/libapr-1.la -luuid -lrt -lcrypt -lpthread -ldl -lssl
-lcrypto'
+
+# Version information for libtcnative-1.
+current=1
+age=1
+revision=8
+
+# Is this an already installed library?
+installed=yes
+
+# Should we warn about portability when linking against -modules?
+shouldnotlink=no
+
+# Files to dlopen/dlpreopen
+dlopen=''
+dlpreopen=''
+
+# Directory that this library needs to be installed in:
+libdir='/usr/local/apr/lib'

Added: mina/sandbox/jvermillard/apr/lib/libtcnative-1.so
URL: http://svn.apache.org/viewvc/mina/sandbox/jvermillard/apr/lib/libtcnative-1.so?view=auto&rev=551146
==============================================================================
Binary file - no diff available.

Propchange: mina/sandbox/jvermillard/apr/lib/libtcnative-1.so
------------------------------------------------------------------------------
    svn:executable = *

Propchange: mina/sandbox/jvermillard/apr/lib/libtcnative-1.so
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: mina/sandbox/jvermillard/apr/lib/libtcnative-1.so.0
URL: http://svn.apache.org/viewvc/mina/sandbox/jvermillard/apr/lib/libtcnative-1.so.0?view=auto&rev=551146
==============================================================================
Binary file - no diff available.

Propchange: mina/sandbox/jvermillard/apr/lib/libtcnative-1.so.0
------------------------------------------------------------------------------
    svn:executable = *

Propchange: mina/sandbox/jvermillard/apr/lib/libtcnative-1.so.0
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: mina/sandbox/jvermillard/apr/lib/libtcnative-1.so.0.1.8
URL: http://svn.apache.org/viewvc/mina/sandbox/jvermillard/apr/lib/libtcnative-1.so.0.1.8?view=auto&rev=551146
==============================================================================
Binary file - no diff available.

Propchange: mina/sandbox/jvermillard/apr/lib/libtcnative-1.so.0.1.8
------------------------------------------------------------------------------
    svn:executable = *

Propchange: mina/sandbox/jvermillard/apr/lib/libtcnative-1.so.0.1.8
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: mina/sandbox/jvermillard/apr/lib/tomcat-native-1.0.0.jar
URL: http://svn.apache.org/viewvc/mina/sandbox/jvermillard/apr/lib/tomcat-native-1.0.0.jar?view=auto&rev=551146
==============================================================================
Binary file - no diff available.

Propchange: mina/sandbox/jvermillard/apr/lib/tomcat-native-1.0.0.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: 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?view=auto&rev=551146
==============================================================================
--- mina/sandbox/jvermillard/apr/src/main/java/org/apache/mina/transport/apr/APRConnector.java
(added)
+++ mina/sandbox/jvermillard/apr/src/main/java/org/apache/mina/transport/apr/APRConnector.java
Wed Jun 27 05:42:39 2007
@@ -0,0 +1,83 @@
+package org.apache.mina.transport.apr;
+
+import java.net.SocketAddress;
+import java.util.concurrent.Executor;
+
+import org.apache.mina.common.ConnectFuture;
+import org.apache.mina.common.TransportType;
+import org.apache.mina.common.support.BaseIoConnector;
+import org.apache.mina.common.support.IoServiceListenerSupport;
+import org.apache.mina.util.NewThreadExecutor;
+import org.apache.tomcat.jni.Pool;
+
+public class APRConnector  extends BaseIoConnector {
+
+    /**
+     * @noinspection StaticNonFinalField
+     */
+    private static volatile int nextId = 0;
+
+    private final Object lock = new Object();
+    private final int id = nextId++;
+    private final String threadName = "APRConnector-" + id;    
+    private final int processorCount;
+    private final Executor executor;
+    private final APRIoProcessor[] ioProcessors;
+
+    // APR memory pool (package wide mother pool)
+    static long pool = -1;
+
+    /**
+     * Create a connector with a single processing thread using a NewThreadExecutor 
+     */
+    public APRConnector()
+    {
+        this( 1, new NewThreadExecutor() );
+    }
+
+    /**
+     * Create a connector with the desired number of processing threads
+     *
+     * @param processorCount Number of processing threads
+     * @param executor Executor to use for launching threads
+     */
+    public APRConnector( int processorCount, Executor executor )
+    {
+        super( null ); // TODO : DEFAULT CONFIG
+        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];
+
+        for( int i = 0; i < processorCount; i++ )
+        {
+        	ioProcessors[i] = new APRIoProcessor( "APRConnectorIoProcessor-" + id + "." + i,
executor );
+        }
+    }
+
+    
+    
+	@Override
+	protected ConnectFuture doConnect(SocketAddress remoteAddress, SocketAddress localAddress)
{
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public TransportType getTransportType() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+	
+    @Override
+    protected IoServiceListenerSupport getListeners()
+    {
+        return super.getListeners();
+    }
+}

Added: 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?view=auto&rev=551146
==============================================================================
--- mina/sandbox/jvermillard/apr/src/main/java/org/apache/mina/transport/apr/APRIoProcessor.java
(added)
+++ mina/sandbox/jvermillard/apr/src/main/java/org/apache/mina/transport/apr/APRIoProcessor.java
Wed Jun 27 05:42:39 2007
@@ -0,0 +1,325 @@
+package org.apache.mina.transport.apr;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Queue;
+import java.util.concurrent.ConcurrentLinkedQueue;
+import java.util.concurrent.Executor;
+
+import org.apache.mina.common.ByteBuffer;
+import org.apache.mina.common.ExceptionMonitor;
+import org.apache.mina.common.IdleStatus;
+import org.apache.mina.common.IoService;
+import org.apache.mina.common.IoSession;
+import org.apache.mina.common.WriteRequest;
+import org.apache.mina.common.support.IoServiceListenerSupport;
+import org.apache.mina.util.NamePreservingRunnable;
+import org.apache.tomcat.jni.Error;
+import org.apache.tomcat.jni.Poll;
+import org.apache.tomcat.jni.Pool;
+import org.apache.tomcat.jni.Socket;
+import org.apache.tomcat.jni.Status;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class APRIoProcessor {
+
+	private final Logger logger = LoggerFactory.getLogger(getClass());
+
+	private final Object lock = new Object();
+
+	private final String threadName;
+
+	private final Executor executor;
+
+	private long pool = 0; // memory pool
+
+	private long pollset = 0; // socket poller
+
+	private final Queue<APRSessionImpl> newSessions = new ConcurrentLinkedQueue<APRSessionImpl>();
+
+	private final Queue<APRSessionImpl> removingSessions = new ConcurrentLinkedQueue<APRSessionImpl>();
+
+	private final Queue<APRSessionImpl> flushingSessions = new ConcurrentLinkedQueue<APRSessionImpl>();
+
+	private final Queue<APRSessionImpl> trafficControllingSessions = new ConcurrentLinkedQueue<APRSessionImpl>();
+
+	private final Map<Long, APRSessionImpl> managedSessions = new HashMap<Long, APRSessionImpl>();
+
+	private long lastIdleCheckTime = System.currentTimeMillis();
+
+	private int socketCount = 0;
+
+	private Worker worker;
+
+	APRIoProcessor(String threadName, Executor executor) {
+		this.threadName = threadName;
+		this.executor = executor;
+
+		// initialize a memory pool for APR functions
+		pool = Pool.create(APRConnector.pool);
+		try {
+
+			// TODO : optimize/parametrize those values
+			pollset = Poll.create(32, pool, 0, 10000000);
+		} catch (Error e) {
+			logger.error("APR Error : " + e.getDescription(), e);
+			// TODO : send that to the good logger
+		}
+	}
+
+	void addNew(APRSessionImpl session) {
+		newSessions.offer(session);
+
+		startupWorker();
+	}
+
+	void remove(APRSessionImpl session) {
+		scheduleRemove(session);
+		startupWorker();
+	}
+
+	private void startupWorker() {
+		synchronized (lock) {
+			if (worker == null) {
+				worker = new Worker();
+				executor.execute(new NamePreservingRunnable(worker));
+			}
+		}
+	}
+
+	void flush(APRSessionImpl session) {
+		scheduleFlush(session);
+	}
+
+	private void scheduleRemove(APRSessionImpl session) {
+		removingSessions.offer(session);
+	}
+
+	// TODO : do something with traffic control 
+	private void scheduleTrafficControl(APRSessionImpl session) {
+		trafficControllingSessions.offer(session);
+	}
+
+	private void scheduleFlush(APRSessionImpl session) {
+		flushingSessions.offer(session);
+	}
+
+	private void doAddNew() {
+		for (;;) {
+			APRSessionImpl session = newSessions.poll();
+
+			if (session == null) {
+				break;
+			}
+
+			// polling the socket for write and read
+			// FIXME : perhaps we should oll write only if needed for save CPU, but actually it's
too complex for me :)
+			int rv = Poll.add(pollset, session.getAPRSocket(), Poll.APR_POLLIN
+					| Poll.APR_POLLOUT);
+			if (rv == Status.APR_SUCCESS) {
+				System.out.println("Added worker to pollset");
+				managedSessions.put(session.getAPRSocket(), session);
+				socketCount++;
+				// AbstractIoFilterChain.CONNECT_FUTURE is cleared inside here
+				// in AbstractIoFilterChain.fireSessionOpened().
+				getServiceListeners(session).fireSessionCreated(session);
+			} else {
+				// FIXME: find a way to bring the real APR error from returned codes
+				session.getFilterChain().fireExceptionCaught(session,
+						new RuntimeException("APR Error"));
+			}
+		}
+	}
+
+	private void doRemove() {
+		for (;;) {
+			APRSessionImpl session = removingSessions.poll();
+
+			if (session == null) {
+				break;
+			}
+
+			// remove of the pollset
+			Poll.remove(pollset, session.getAPRSocket());
+
+			// close the socket
+			Socket.close(session.getAPRSocket());
+			clearWriteRequestQueue(session);
+			getServiceListeners(session).fireSessionDestroyed(session);
+		}
+	}
+
+	private void read(APRSessionImpl session) {
+		byte[] buf = session.getReadBuffer();
+		int bytes = Socket.recv(session.getAPRSocket(), buf, 0, -1);
+		if (bytes > 0) {
+			ByteBuffer bbuf = ByteBuffer.allocate(bytes);
+			bbuf.put(buf, 0, bytes);
+			bbuf.flip();
+			session.increaseReadBytes(bytes);
+			session.getFilterChain().fireMessageReceived(session, bbuf);
+		} else if (bytes < 0) {
+			logger.debug("Read {} bytes, scheduling for remove", bytes);
+			scheduleRemove(session);
+		}
+	}
+
+	private void write(APRSessionImpl session) {
+		if (session.getWriteRequestQueue().size() <= 0)
+			return;
+		Queue<WriteRequest> writeRequestQueue = session.getWriteRequestQueue();
+
+		for (;;) {
+
+			WriteRequest req;
+
+			synchronized (writeRequestQueue) {
+				req = writeRequestQueue.peek();
+			}
+
+			if (req == null) {
+				break;
+			}
+
+			ByteBuffer buf = (ByteBuffer) req.getMessage();
+			if (buf.remaining() == 0) {
+				synchronized (writeRequestQueue) {
+					writeRequestQueue.poll();
+				}
+				session.increaseWrittenMessages();
+				buf.reset();
+				session.getFilterChain().fireMessageSent(session, req);
+				continue;
+			}
+			// be sure APR_SO_NONBLOCK was set, or it will block
+			int toWrite = buf.remaining();
+			int writtenBytes = Socket.sendb(session.getAPRSocket(), buf.buf(),
+					0, toWrite);
+			if (writtenBytes > 0) {
+				// increase
+				session.increaseWrittenBytes(writtenBytes);
+			}
+
+			// kernel buffer full for this socket, wait next polling
+			if (buf.hasRemaining())
+				break;
+		}
+	}
+
+	private void clearWriteRequestQueue(APRSessionImpl session) {
+		Queue<WriteRequest> writeRequestQueue = session.getWriteRequestQueue();
+		WriteRequest req;
+
+		while ((req = writeRequestQueue.poll()) != null) {
+			req.getFuture().setWritten(false);
+		}
+	}
+
+	private void notifyIdleness() {
+		// process idle sessions
+		long currentTime = System.currentTimeMillis();
+		if ((currentTime - lastIdleCheckTime) >= 1000) {
+			lastIdleCheckTime = currentTime;
+			for (APRSessionImpl session : managedSessions.values()) {
+				notifyIdleness(session, currentTime);
+			}
+		}
+	}
+
+	private void notifyIdleness(APRSessionImpl session, long currentTime) {
+		notifyIdleness0(session, currentTime, session
+				.getIdleTimeInMillis(IdleStatus.BOTH_IDLE),
+				IdleStatus.BOTH_IDLE, Math.max(session.getLastIoTime(), session
+						.getLastIdleTime(IdleStatus.BOTH_IDLE)));
+		notifyIdleness0(session, currentTime, session
+				.getIdleTimeInMillis(IdleStatus.READER_IDLE),
+				IdleStatus.READER_IDLE, Math.max(session.getLastReadTime(),
+						session.getLastIdleTime(IdleStatus.READER_IDLE)));
+		notifyIdleness0(session, currentTime, session
+				.getIdleTimeInMillis(IdleStatus.WRITER_IDLE),
+				IdleStatus.WRITER_IDLE, Math.max(session.getLastWriteTime(),
+						session.getLastIdleTime(IdleStatus.WRITER_IDLE)));
+
+		notifyWriteTimeout(session, currentTime, session
+				.getWriteTimeoutInMillis(), session.getLastWriteTime());
+	}
+
+	private void notifyIdleness0(APRSessionImpl session, long currentTime,
+			long idleTime, IdleStatus status, long lastIoTime) {
+		if (idleTime > 0 && lastIoTime != 0
+				&& (currentTime - lastIoTime) >= idleTime) {
+			session.increaseIdleCount(status);
+			session.getFilterChain().fireSessionIdle(session, status);
+		}
+	}
+
+	private void notifyWriteTimeout(APRSessionImpl session, long currentTime,
+			long writeTimeout, long lastIoTime) {
+		// TODO : I understand nothing here :)
+	}
+
+	private IoServiceListenerSupport getServiceListeners(IoSession session) {
+		IoService service = session.getService();
+		if (service instanceof APRConnector) {
+			return ((APRConnector) service).getListeners();
+		} else
+			return null;
+	}
+
+	private class Worker implements Runnable {
+		public void run() {
+			Thread.currentThread().setName(APRIoProcessor.this.threadName);
+
+			for (;;) {
+
+				try {
+
+					// pop new sessions
+					doAddNew();
+
+					if (socketCount < 1) {
+						return; // no need to poll an empty pollset
+					}
+
+					// TODO : doUpdateTrafficMask();
+
+					/* is it OK ? : Two times size of the created pollset */
+					long[] desc = new long[socketCount * 2];
+
+					/* use 100 milliseconds poll timeout, TODO : parametrize for more latency/CPU usage
control*/
+					int rv = Poll.poll(pollset, 100000, desc, false);
+					if (rv > 0) {
+						for (int n = 0; n < rv; n++) {
+							long clientSock = desc[n * 2 + 1];
+							logger.debug("Poll flags " + desc[n * 2]);
+
+							APRSessionImpl session = managedSessions
+									.get(clientSock);
+
+							if (!session.isConnected()) {
+								clearWriteRequestQueue(session);
+								continue;
+							}
+
+							if (desc[n * 2] == Poll.APR_POLLIN)
+								read(session);
+							if (desc[n * 2] == Poll.APR_POLLOUT)
+								write(session);
+						}
+					}
+					notifyIdleness();
+					doRemove();
+				} catch (Throwable t) {
+					ExceptionMonitor.getInstance().exceptionCaught(t);
+
+					try {
+						Thread.sleep(1000);
+					} catch (InterruptedException e1) {
+						ExceptionMonitor.getInstance().exceptionCaught(e1);
+					}
+				}
+			}
+		}
+	}
+}

Added: 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?view=auto&rev=551146
==============================================================================
--- mina/sandbox/jvermillard/apr/src/main/java/org/apache/mina/transport/apr/APRSession.java
(added)
+++ mina/sandbox/jvermillard/apr/src/main/java/org/apache/mina/transport/apr/APRSession.java
Wed Jun 27 05:42:39 2007
@@ -0,0 +1,22 @@
+package org.apache.mina.transport.apr;
+
+import java.net.InetSocketAddress;
+import java.util.Queue;
+
+import org.apache.mina.common.IoSession;
+import org.apache.mina.common.WriteRequest;
+
+public interface APRSession extends IoSession {
+	
+	
+    APRSessionConfig getConfig();
+    InetSocketAddress getRemoteAddress();
+    InetSocketAddress getLocalAddress();
+    InetSocketAddress getServiceAddress();
+    
+    // TODO : move to package only visible implementation
+    long getAPRSocket();
+    byte[] getReadBuffer();
+    void increaseReadBytes( int increment );
+    Queue<WriteRequest> getWriteRequestQueue();
+}

Added: 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?view=auto&rev=551146
==============================================================================
--- mina/sandbox/jvermillard/apr/src/main/java/org/apache/mina/transport/apr/APRSessionConfig.java
(added)
+++ mina/sandbox/jvermillard/apr/src/main/java/org/apache/mina/transport/apr/APRSessionConfig.java
Wed Jun 27 05:42:39 2007
@@ -0,0 +1,7 @@
+package org.apache.mina.transport.apr;
+
+import org.apache.mina.common.IoSessionConfig;
+
+public interface APRSessionConfig extends IoSessionConfig {
+
+}

Added: 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?view=auto&rev=551146
==============================================================================
--- mina/sandbox/jvermillard/apr/src/main/java/org/apache/mina/transport/apr/APRSessionImpl.java
(added)
+++ mina/sandbox/jvermillard/apr/src/main/java/org/apache/mina/transport/apr/APRSessionImpl.java
Wed Jun 27 05:42:39 2007
@@ -0,0 +1,86 @@
+package org.apache.mina.transport.apr;
+
+import java.net.InetSocketAddress;
+import java.util.Queue;
+
+import org.apache.mina.common.IoFilterChain;
+import org.apache.mina.common.IoHandler;
+import org.apache.mina.common.IoService;
+import org.apache.mina.common.TransportType;
+import org.apache.mina.common.WriteRequest;
+import org.apache.mina.common.support.BaseIoSession;
+
+public class APRSessionImpl extends BaseIoSession implements APRSession {
+
+	@Override
+	protected void updateTrafficMask() {
+		// TODO Auto-generated method stub
+		
+	}
+
+	public long getAPRSocket() {
+		// TODO Auto-generated method stub
+		return 0;
+	}
+
+	public APRSessionConfig getConfig() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public InetSocketAddress getLocalAddress() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public byte[] getReadBuffer() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public InetSocketAddress getRemoteAddress() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public Queue<WriteRequest> getWriteRequestQueue() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public IoFilterChain getFilterChain() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public IoHandler getHandler() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public int getScheduledWriteBytes() {
+		// TODO Auto-generated method stub
+		return 0;
+	}
+
+	public int getScheduledWriteMessages() {
+		// TODO Auto-generated method stub
+		return 0;
+	}
+
+	public IoService getService() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public TransportType getTransportType() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+    @Override
+    public InetSocketAddress getServiceAddress() {
+        return (InetSocketAddress) super.getServiceAddress();
+    }
+
+}



Mime
View raw message