hammant 2003/02/04 17:02:54 Modified: altrmi/src/java/org/apache/excalibur/altrmi/client ClientInvocationHandler.java altrmi/src/java/org/apache/excalibur/altrmi/client/impl AbstractClientInvocationHandler.java altrmi/src/java/org/apache/excalibur/altrmi/client/impl/callback/stream CallbackEnabledClientCustomStreamReadWriter.java altrmi/src/java/org/apache/excalibur/altrmi/client/impl/multiple RotatingMultipleInvocationHandler.java altrmi/src/java/org/apache/excalibur/altrmi/server/impl AbstractServer.java AbstractServerStreamReadWriter.java altrmi/src/test/org/apache/excalibur/altrmi/test DummyInvocationHandler.java altrmi/src/test/org/apache/excalibur/altrmi/test/misc DefaultConnectionPingerTestCase.java Added: altrmi/src/java/org/apache/excalibur/altrmi/common DefaultThreadPool.java ThreadPool.java ThreadPoolAware.java Removed: altrmi/src/java/org/apache/excalibur/altrmi/common DefaultThreadContextProvider.java ThreadContextProvider.java ThreadContextProviderAware.java Log: ThreadPool renamed Revision Changes Path 1.8 +3 -3 jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/ClientInvocationHandler.java Index: ClientInvocationHandler.java =================================================================== RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/ClientInvocationHandler.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- ClientInvocationHandler.java 2 Feb 2003 14:10:05 -0000 1.7 +++ ClientInvocationHandler.java 5 Feb 2003 01:02:53 -0000 1.8 @@ -9,7 +9,7 @@ import org.apache.excalibur.altrmi.common.ConnectionException; import org.apache.excalibur.altrmi.common.CallbackException; -import org.apache.excalibur.altrmi.common.ThreadContextProviderAware; +import org.apache.excalibur.altrmi.common.ThreadPoolAware; import org.apache.excalibur.altrmi.common.Reply; import org.apache.excalibur.altrmi.common.Request; @@ -20,7 +20,7 @@ * @author Paul Hammant * @version * $Revision$ */ -public interface ClientInvocationHandler extends ThreadContextProviderAware +public interface ClientInvocationHandler extends ThreadPoolAware { /** 1.15 +7 -7 jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/impl/AbstractClientInvocationHandler.java Index: AbstractClientInvocationHandler.java =================================================================== RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/impl/AbstractClientInvocationHandler.java,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- AbstractClientInvocationHandler.java 29 Jan 2003 08:01:12 -0000 1.14 +++ AbstractClientInvocationHandler.java 5 Feb 2003 01:02:53 -0000 1.15 @@ -15,8 +15,8 @@ import org.apache.excalibur.altrmi.common.ConnectionException; import org.apache.excalibur.altrmi.common.PingRequest; import org.apache.excalibur.altrmi.common.Reply; -import org.apache.excalibur.altrmi.common.ThreadContextProvider; -import org.apache.excalibur.altrmi.common.DefaultThreadContextProvider; +import org.apache.excalibur.altrmi.common.ThreadPool; +import org.apache.excalibur.altrmi.common.DefaultThreadPool; /** * Class AbstractClientInvocationHandler @@ -33,7 +33,7 @@ protected ConnectionListener m_connectionListener = new DefaultConnectionListener(); protected boolean m_stopped = false; - private ThreadContextProvider m_threadContextProvider; + private ThreadPool m_threadContextProvider; /** * Method setConnectionListener @@ -52,16 +52,16 @@ return m_connectionListener; } - public void setThreadContextProvider(ThreadContextProvider threadContextProvider) + public void setThreadContextProvider(ThreadPool threadContextProvider) { m_threadContextProvider = threadContextProvider; } - public synchronized ThreadContextProvider getThreadContextProvider() + public synchronized ThreadPool getThreadContextProvider() { if (m_threadContextProvider == null) { - m_threadContextProvider = new DefaultThreadContextProvider(); + m_threadContextProvider = new DefaultThreadPool(); } return m_threadContextProvider; } 1.17 +4 -4 jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/impl/callback/stream/CallbackEnabledClientCustomStreamReadWriter.java Index: CallbackEnabledClientCustomStreamReadWriter.java =================================================================== RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/impl/callback/stream/CallbackEnabledClientCustomStreamReadWriter.java,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- CallbackEnabledClientCustomStreamReadWriter.java 5 Feb 2003 00:10:25 -0000 1.16 +++ CallbackEnabledClientCustomStreamReadWriter.java 5 Feb 2003 01:02:53 -0000 1.17 @@ -23,7 +23,7 @@ import org.apache.excalibur.altrmi.common.Request; import org.apache.excalibur.altrmi.common.SerializationHelper; import org.apache.excalibur.altrmi.common.ConnectionException; -import org.apache.excalibur.altrmi.common.ThreadContextProvider; +import org.apache.excalibur.altrmi.common.ThreadPool; import org.apache.excalibur.altrmi.common.ThreadContext; import org.apache.excalibur.altrmi.common.ExceptionReply; import org.apache.excalibur.altrmi.common.InvocationException; @@ -58,7 +58,7 @@ private HashMap m_exposedObjPublishNameHash_ = new HashMap(); private Server m_clientServerHostingExposedObjects = new DirectServer(); private static int m_random = 0; - private ThreadContextProvider m_threadContextProvider; + private ThreadPool m_threadContextProvider; /** * Constructor ClientCustomStreamReadWriter @@ -70,7 +70,7 @@ * @throws ConnectionException The IO Exception * */ - public CallbackEnabledClientCustomStreamReadWriter(ThreadContextProvider threadContextProvider, InputStream inputStream, OutputStream outputStream, ClassLoader interfacesClassLoader) + public CallbackEnabledClientCustomStreamReadWriter(ThreadPool threadContextProvider, InputStream inputStream, OutputStream outputStream, ClassLoader interfacesClassLoader) throws ConnectionException { this.m_threadContextProvider = threadContextProvider; 1.10 +4 -4 jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/impl/multiple/RotatingMultipleInvocationHandler.java Index: RotatingMultipleInvocationHandler.java =================================================================== RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/impl/multiple/RotatingMultipleInvocationHandler.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- RotatingMultipleInvocationHandler.java 29 Jan 2003 08:01:13 -0000 1.9 +++ RotatingMultipleInvocationHandler.java 5 Feb 2003 01:02:54 -0000 1.10 @@ -12,7 +12,7 @@ import org.apache.excalibur.altrmi.common.PingReply; import org.apache.excalibur.altrmi.common.PingRequest; import org.apache.excalibur.altrmi.common.Sessionable; -import org.apache.excalibur.altrmi.common.ThreadContextProvider; +import org.apache.excalibur.altrmi.common.ThreadPool; /** * Class RotatingMultipleInvocationHandler @@ -114,12 +114,12 @@ } } - public void setThreadContextProvider(ThreadContextProvider threadContextProvider) + public void setThreadContextProvider(ThreadPool threadContextProvider) { //TODO } - public ThreadContextProvider getThreadContextProvider() + public ThreadPool getThreadContextProvider() { //TODO return null; 1.16 +9 -9 jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/server/impl/AbstractServer.java Index: AbstractServer.java =================================================================== RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/server/impl/AbstractServer.java,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- AbstractServer.java 2 Feb 2003 14:10:05 -0000 1.15 +++ AbstractServer.java 5 Feb 2003 01:02:54 -0000 1.16 @@ -11,10 +11,10 @@ import org.apache.excalibur.altrmi.common.Reply; import org.apache.excalibur.altrmi.common.Request; import org.apache.excalibur.altrmi.common.MethodRequest; -import org.apache.excalibur.altrmi.common.ThreadContextProvider; +import org.apache.excalibur.altrmi.common.ThreadPool; import org.apache.excalibur.altrmi.common.ThreadContext; -import org.apache.excalibur.altrmi.common.DefaultThreadContextProvider; -import org.apache.excalibur.altrmi.common.ThreadContextProviderAware; +import org.apache.excalibur.altrmi.common.DefaultThreadPool; +import org.apache.excalibur.altrmi.common.ThreadPoolAware; import org.apache.excalibur.altrmi.server.Authenticator; import org.apache.excalibur.altrmi.server.Server; import org.apache.excalibur.altrmi.server.ServerConnection; @@ -34,7 +34,7 @@ * @version $Revision$ */ public abstract class AbstractServer - implements Server, ThreadContextProviderAware + implements Server, ThreadPoolAware { /** @@ -53,7 +53,7 @@ private int m_state = UNSTARTED; private ServerMonitor m_serverMonitor; - private ThreadContextProvider m_threadContextProvider; + private ThreadPool m_threadContextProvider; /** * Construct a AbstractServer @@ -82,16 +82,16 @@ return m_serverMonitor; } - public void setThreadContextProvider(ThreadContextProvider threadContextProvider) + public void setThreadContextProvider(ThreadPool threadContextProvider) { m_threadContextProvider = threadContextProvider; } - public synchronized ThreadContextProvider getThreadContextProvider() + public synchronized ThreadPool getThreadContextProvider() { if (m_threadContextProvider == null) { - m_threadContextProvider = new DefaultThreadContextProvider(); + m_threadContextProvider = new DefaultThreadPool(); } return m_threadContextProvider; } 1.2 +8 -8 jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/server/impl/AbstractServerStreamReadWriter.java Index: AbstractServerStreamReadWriter.java =================================================================== RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/server/impl/AbstractServerStreamReadWriter.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- AbstractServerStreamReadWriter.java 5 Feb 2003 00:55:22 -0000 1.1 +++ AbstractServerStreamReadWriter.java 5 Feb 2003 01:02:54 -0000 1.2 @@ -13,9 +13,9 @@ import org.apache.excalibur.altrmi.common.Reply; import org.apache.excalibur.altrmi.common.Request; import org.apache.excalibur.altrmi.common.ConnectionException; -import org.apache.excalibur.altrmi.common.ThreadContextProvider; +import org.apache.excalibur.altrmi.common.ThreadPool; import org.apache.excalibur.altrmi.server.ServerMonitor; -import org.apache.excalibur.altrmi.common.ThreadContextProviderAware; +import org.apache.excalibur.altrmi.common.ThreadPoolAware; /** @@ -25,7 +25,7 @@ * @author Paul Hammant * @version $Revision$ */ -public abstract class AbstractServerStreamReadWriter implements ThreadContextProviderAware +public abstract class AbstractServerStreamReadWriter implements ThreadPoolAware { @@ -40,19 +40,19 @@ private OutputStream m_outputStream; protected ServerMonitor m_serverMonitor; - private ThreadContextProvider m_threadContextProvider; + private ThreadPool m_threadContextProvider; private Object m_connectionDetails; public final void setServerMonitor(ServerMonitor serverMonitor) { m_serverMonitor = serverMonitor; } - public void setThreadContextProvider(ThreadContextProvider threadContextProvider) + public void setThreadContextProvider(ThreadPool threadContextProvider) { m_threadContextProvider = threadContextProvider; } - public ThreadContextProvider getThreadContextProvider() + public ThreadPool getThreadContextProvider() { return m_threadContextProvider; } @@ -108,7 +108,7 @@ { m_serverMonitor.closeError( "AbstractServerStreamReadWriter.close(): Failed closing an AltRMI connection input stream: ", e); } - + try { m_outputStream.close(); 1.6 +5 -5 jakarta-avalon-excalibur/altrmi/src/test/org/apache/excalibur/altrmi/test/DummyInvocationHandler.java Index: DummyInvocationHandler.java =================================================================== RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/test/org/apache/excalibur/altrmi/test/DummyInvocationHandler.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- DummyInvocationHandler.java 2 Feb 2003 14:10:07 -0000 1.5 +++ DummyInvocationHandler.java 5 Feb 2003 01:02:54 -0000 1.6 @@ -11,7 +11,7 @@ import org.apache.excalibur.altrmi.common.Request; import org.apache.excalibur.altrmi.common.ConnectionException; import org.apache.excalibur.altrmi.common.CallbackException; -import org.apache.excalibur.altrmi.common.ThreadContextProvider; +import org.apache.excalibur.altrmi.common.ThreadPool; import org.apache.excalibur.altrmi.client.ClientInvocationHandler; import org.apache.excalibur.altrmi.client.ConnectionListener; import org.apache.excalibur.altrmi.client.ConnectionPinger; @@ -31,7 +31,7 @@ boolean pinged = false; long lastReq = System.currentTimeMillis(); private ConnectionListener m_connectionListener; - private ThreadContextProvider m_threadContextProvider; + private ThreadPool m_threadContextProvider; public boolean isPinged() { @@ -108,12 +108,12 @@ throw new java.lang.UnsupportedOperationException(); } - public void setThreadContextProvider(ThreadContextProvider threadContextProvider) + public void setThreadContextProvider(ThreadPool threadContextProvider) { m_threadContextProvider = threadContextProvider; } - public ThreadContextProvider getThreadContextProvider() + public ThreadPool getThreadContextProvider() { return m_threadContextProvider; } 1.3 +2 -2 jakarta-avalon-excalibur/altrmi/src/test/org/apache/excalibur/altrmi/test/misc/DefaultConnectionPingerTestCase.java Index: DefaultConnectionPingerTestCase.java =================================================================== RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/test/org/apache/excalibur/altrmi/test/misc/DefaultConnectionPingerTestCase.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- DefaultConnectionPingerTestCase.java 2 Feb 2003 08:50:14 -0000 1.2 +++ DefaultConnectionPingerTestCase.java 5 Feb 2003 01:02:54 -0000 1.3 @@ -10,7 +10,7 @@ import junit.framework.TestCase; import org.apache.excalibur.altrmi.test.DummyInvocationHandler; import org.apache.excalibur.altrmi.client.impl.DefaultConnectionPinger; -import org.apache.excalibur.altrmi.common.DefaultThreadContextProvider; +import org.apache.excalibur.altrmi.common.DefaultThreadPool; public class DefaultConnectionPingerTestCase extends TestCase { @@ -29,7 +29,7 @@ { DefaultConnectionPinger pinger = new DefaultConnectionPinger(1L,10000L); DummyInvocationHandler dummy = new DummyInvocationHandler(); - dummy.setThreadContextProvider(new DefaultThreadContextProvider()); + dummy.setThreadContextProvider(new DefaultThreadPool()); pinger.setInvocationHandler(dummy); pinger.start(); Thread.sleep(1000); 1.1 jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/DefaultThreadPool.java Index: DefaultThreadPool.java =================================================================== /* * Copyright (C) The Apache Software Foundation. All rights reserved. * * This software is published under the terms of the Apache Software License * version 1.1, a copy of which has been included with this distribution in * the LICENSE.txt file. */ package org.apache.excalibur.altrmi.common; /** * Class DefaultThreadPool * * * @author Paul Hammant * @version $Revision: 1.1 $ */ public class DefaultThreadPool implements ThreadPool { public DefaultThreadPool() { } public ThreadContext getThreadContext(Runnable runnable) { return new DefaultThreadContext(runnable); } } 1.1 jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/ThreadPool.java Index: ThreadPool.java =================================================================== /* * Copyright (C) The Apache Software Foundation. All rights reserved. * * This software is published under the terms of the Apache Software License * version 1.1, a copy of which has been included with this distribution in * the LICENSE.txt file. */ package org.apache.excalibur.altrmi.common; /** * Class ThreadPool * * * @author Paul Hammant * @version $Revision: 1.1 $ */ public interface ThreadPool { ThreadContext getThreadContext(Runnable runnable); } 1.1 jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/ThreadPoolAware.java Index: ThreadPoolAware.java =================================================================== /* * Copyright (C) The Apache Software Foundation. All rights reserved. * * This software is published under the terms of the Apache Software License * version 1.1, a copy of which has been included with this distribution in * the LICENSE.txt file. */ package org.apache.excalibur.altrmi.common; /** * Class ThreadPoolAware * * * @author Paul Hammant * @version $Revision: 1.1 $ */ public interface ThreadPoolAware { void setThreadContextProvider(ThreadPool threadContextProvider); ThreadPool getThreadContextProvider(); }
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]