You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@avalon.apache.org by do...@apache.org on 2002/05/13 14:17:41 UTC
cvs commit: jakarta-avalon-excalibur/cli/src/java/org/apache/avalon/excalibur/cli CLOptionDescriptor.java
donaldp 02/05/13 05:17:41
Modified: all/src/scratchpad/org/apache/avalon/excalibur/i18n
ConfigurableBundleInfo.java
DefaultBundleFactory.java DefaultBundleMatcher.java
DefaultMapper.java DirectoryMapper.java
XmlBundle.java
thread/src/java/org/apache/avalon/excalibur/thread/impl
DefaultThreadPool.java
ResourceLimitingThreadPool.java WorkerThread.java
thread/src/test/org/apache/avalon/excalibur/thread/impl/test
DefaultThreadPoolTestCase.java
ResourceLimitingThreadPoolTestCase.java
threadcontext/src/java/org/apache/excalibur/threadcontext
ThreadContext.java
threadcontext/src/java/org/apache/excalibur/threadcontext/impl
AbstractThreadContextPolicy.java
DefaultThreadContextPolicy.java
converter/src/java/org/apache/excalibur/converter/lib
StringToBooleanConverter.java
StringToByteConverter.java
StringToClassConverter.java
StringToDateConverter.java
StringToDoubleConverter.java
StringToFloatConverter.java
StringToIntegerConverter.java
StringToLongConverter.java
StringToShortConverter.java
StringToURLConverter.java
extension/src/java/org/apache/avalon/excalibur/extension
Extension.java
fortress/src/java/org/apache/excalibur/fortress
AbstractContainer.java DefaultContainerManager.java
fortress/src/java/org/apache/excalibur/fortress/handler
ComponentFactory.java FactoryComponentHandler.java
PerThreadComponentHandler.java
PoolableComponentHandler.java
ThreadSafeComponentHandler.java
fortress/src/java/org/apache/excalibur/fortress/util
AbstractRoleManager.java ContextBuilder.java
ContextManager.java
fortress/src/java/org/apache/excalibur/mpool
DefaultPoolManager.java
fortress/src/test/org/apache/excalibur/fortress/test
ContainerProfile.java TestContainer.java
fortress/src/test/org/apache/excalibur/fortress/util/test
ConfigurableRoleManagerTestCase.java
ExcaliburRoleManagerTestCase.java
fortress/src/test/org/apache/excalibur/mpool/test
ClassInstanceObjectFactory.java
MultiThreadedPoolComparisonProfile.java
PoolComparisonProfileAbstract.java
SingleThreadedPoolComparisonProfile.java
sourceresolve/src/java/org/apache/excalibur/source
Source.java SourceException.java SourceFactory.java
SourceNotFoundException.java SourceResolver.java
sourceresolve/src/java/org/apache/excalibur/source/impl
ResourceSource.java ResourceSourceFactory.java
SourceResolverImpl.java URLSource.java
monitor/src/java/org/apache/avalon/excalibur/monitor
ActiveMonitor.java FileResource.java Monitor.java
MonitorableURLSource.java PassiveMonitor.java
Resource.java ResourceOutputStream.java
ResourceWriter.java SourceResource.java
StreamResource.java
event/src/java/org/apache/excalibur/event SinkException.java
event/src/java/org/apache/excalibur/event/command
Command.java TPCThreadManager.java
TPSPThreadManager.java
event/src/test QueueTest.java
context/src/java/org/apache/excalibur/context
ContextUtility.java
configuration/src/java/org/apache/excalibur/configuration
CascadingConfiguration.java ConfigurationUtil.java
component/src/java/org/apache/avalon/excalibur/component
ComponentHandler.java
ExcaliburComponentManager.java
ExcaliburComponentSelector.java
PoolableComponentHandler.java
cli/src/java/org/apache/avalon/excalibur/cli
CLOptionDescriptor.java
Log:
Restyled codebase.
Revision Changes Path
1.3 +4 -4 jakarta-avalon-excalibur/all/src/scratchpad/org/apache/avalon/excalibur/i18n/ConfigurableBundleInfo.java
Index: ConfigurableBundleInfo.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/all/src/scratchpad/org/apache/avalon/excalibur/i18n/ConfigurableBundleInfo.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ConfigurableBundleInfo.java 16 Mar 2002 00:05:47 -0000 1.2
+++ ConfigurableBundleInfo.java 13 May 2002 12:17:37 -0000 1.3
@@ -16,11 +16,12 @@
* Used to map locale information to URI space, to find the relevant bundle.
*
* @author <a href="mailto:neeme@apache.org">Neeme Praks</a>
- * @version CVS $Revision: 1.2 $ $Date: 2002/03/16 00:05:47 $ $Author: donaldp $
+ * @version CVS $Revision: 1.3 $ $Date: 2002/05/13 12:17:37 $ $Author: donaldp $
*/
-public class ConfigurableBundleInfo extends BundleInfo implements Configurable
+public class ConfigurableBundleInfo
+ extends BundleInfo
+ implements Configurable
{
-
public ConfigurableBundleInfo()
{
this( null, null, null );
@@ -89,5 +90,4 @@
}
configure( bundleName, locale, ext );
}
-
}
1.3 +4 -3 jakarta-avalon-excalibur/all/src/scratchpad/org/apache/avalon/excalibur/i18n/DefaultBundleFactory.java
Index: DefaultBundleFactory.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/all/src/scratchpad/org/apache/avalon/excalibur/i18n/DefaultBundleFactory.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- DefaultBundleFactory.java 16 Mar 2002 00:05:47 -0000 1.2
+++ DefaultBundleFactory.java 13 May 2002 12:17:37 -0000 1.3
@@ -23,10 +23,11 @@
* Used to map locale information to URI space, to find the relevant bundle.
*
* @author <a href="mailto:neeme@apache.org">Neeme Praks</a>
- * @version CVS $Revision: 1.2 $ $Date: 2002/03/16 00:05:47 $ $Author: donaldp $
+ * @version CVS $Revision: 1.3 $ $Date: 2002/05/13 12:17:37 $ $Author: donaldp $
*/
-
-public class DefaultBundleFactory extends AbstractLogEnabled implements BundleFactory, Configurable, Composable, Initializable
+public class DefaultBundleFactory
+ extends AbstractLogEnabled
+ implements BundleFactory, Configurable, Composable, Initializable
{
public static final class ConfigurationKeys
1.7 +3 -4 jakarta-avalon-excalibur/all/src/scratchpad/org/apache/avalon/excalibur/i18n/DefaultBundleMatcher.java
Index: DefaultBundleMatcher.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/all/src/scratchpad/org/apache/avalon/excalibur/i18n/DefaultBundleMatcher.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- DefaultBundleMatcher.java 16 Mar 2002 00:05:47 -0000 1.6
+++ DefaultBundleMatcher.java 13 May 2002 12:17:37 -0000 1.7
@@ -19,11 +19,11 @@
* to find the relevant bundle.
*
* @author <a href="mailto:neeme@apache.org">Neeme Praks</a>
- * @version CVS $Revision: 1.6 $ $Date: 2002/03/16 00:05:47 $ $Author: donaldp $
+ * @version CVS $Revision: 1.7 $ $Date: 2002/05/13 12:17:37 $ $Author: donaldp $
*/
-public class DefaultBundleMatcher implements BundleMatcher, Configurable
+public class DefaultBundleMatcher
+ implements BundleMatcher, Configurable
{
-
private List bundleInfos = new LinkedList();
private String type;
@@ -106,5 +106,4 @@
match( locale.getCountry(), reference.getCountry() ) &&
match( locale.getVariant(), reference.getVariant() );
}
-
}
1.8 +3 -4 jakarta-avalon-excalibur/all/src/scratchpad/org/apache/avalon/excalibur/i18n/DefaultMapper.java
Index: DefaultMapper.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/all/src/scratchpad/org/apache/avalon/excalibur/i18n/DefaultMapper.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- DefaultMapper.java 16 Mar 2002 00:05:47 -0000 1.7
+++ DefaultMapper.java 13 May 2002 12:17:37 -0000 1.8
@@ -18,12 +18,12 @@
* file ending with en_US.
*
* @author <a href="mailto:neeme@apache.org">Neeme Praks</a>
- * @version CVS $Revision: 1.7 $ $Date: 2002/03/16 00:05:47 $ $Author: donaldp $
+ * @version CVS $Revision: 1.8 $ $Date: 2002/05/13 12:17:37 $ $Author: donaldp $
*/
-public class DefaultMapper implements BundleInfoMapper, Component, Configurable
+public class DefaultMapper
+ implements BundleInfoMapper, Component, Configurable
{
-
public static final class ConfigurationKeys
{
public static final String PREFIX = "prefix";
@@ -82,5 +82,4 @@
String result = sb.toString();
return result;
}
-
}
1.8 +3 -4 jakarta-avalon-excalibur/all/src/scratchpad/org/apache/avalon/excalibur/i18n/DirectoryMapper.java
Index: DirectoryMapper.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/all/src/scratchpad/org/apache/avalon/excalibur/i18n/DirectoryMapper.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- DirectoryMapper.java 16 Mar 2002 00:05:47 -0000 1.7
+++ DirectoryMapper.java 13 May 2002 12:17:38 -0000 1.8
@@ -14,12 +14,12 @@
* file ending with en_US.
*
* @author <a href="mailto:neeme@apache.org">Neeme Praks</a>
- * @version CVS $Revision: 1.7 $ $Date: 2002/03/16 00:05:47 $ $Author: donaldp $
+ * @version CVS $Revision: 1.8 $ $Date: 2002/05/13 12:17:38 $ $Author: donaldp $
*/
-public class DirectoryMapper extends DefaultMapper
+public class DirectoryMapper
+ extends DefaultMapper
{
-
/**
* Get the URI for the bundle, based on locale and filename.
*
@@ -45,5 +45,4 @@
String result = sb.toString();
return result;
}
-
}
1.13 +8 -13 jakarta-avalon-excalibur/all/src/scratchpad/org/apache/avalon/excalibur/i18n/XmlBundle.java
Index: XmlBundle.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/all/src/scratchpad/org/apache/avalon/excalibur/i18n/XmlBundle.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- XmlBundle.java 10 May 2002 02:51:13 -0000 1.12
+++ XmlBundle.java 13 May 2002 12:17:38 -0000 1.13
@@ -12,9 +12,6 @@
import java.util.HashMap;
import java.util.Map;
import java.util.MissingResourceException;
-import org.apache.excalibur.source.Source;
-import org.apache.excalibur.source.SourceResolver;
-import org.apache.excalibur.source.SourceUtil;
import org.apache.avalon.excalibur.xml.Parser;
import org.apache.avalon.excalibur.xml.xpath.XPathProcessor;
import org.apache.avalon.framework.activity.Disposable;
@@ -25,6 +22,8 @@
import org.apache.avalon.framework.configuration.Configurable;
import org.apache.avalon.framework.configuration.Configuration;
import org.apache.avalon.framework.configuration.ConfigurationException;
+import org.apache.excalibur.source.Source;
+import org.apache.excalibur.source.SourceResolver;
import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
@@ -35,9 +34,11 @@
* @author <a href="mailto:mengelhart@earthtrip.com">Mike Engelhart</a>
* @author <a href="mailto:neeme@apache.org">Neeme Praks</a>
* @author <a href="mailto:oleg@one.lv">Oleg Podolsky</a>
- * @version $Id: XmlBundle.java,v 1.12 2002/05/10 02:51:13 donaldp Exp $
+ * @version $Id: XmlBundle.java,v 1.13 2002/05/13 12:17:38 donaldp Exp $
*/
-public class XmlBundle extends AbstractBundle implements Configurable, Initializable, Disposable, Composable
+public class XmlBundle
+ extends AbstractBundle
+ implements Configurable, Initializable, Disposable, Composable
{
/** Constants for configuration keys */
@@ -57,19 +58,13 @@
private Document doc;
/** Component Manager */
- protected ComponentManager manager = null;
+ protected ComponentManager manager;
/** XPath Processor */
- private XPathProcessor processor = null;
+ private XPathProcessor processor;
/** bundle info mapper */
private BundleInfoMapper mapper;
-
- /** bundle name prefix */
- private String prefix;
-
- /** bundle name suffix */
- private String suffix;
/** Load all the keys when initializing? */
private boolean loadOnInit = true;
1.6 +2 -2 jakarta-avalon-excalibur/thread/src/java/org/apache/avalon/excalibur/thread/impl/DefaultThreadPool.java
Index: DefaultThreadPool.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/thread/src/java/org/apache/avalon/excalibur/thread/impl/DefaultThreadPool.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- DefaultThreadPool.java 10 May 2002 02:51:14 -0000 1.5
+++ DefaultThreadPool.java 13 May 2002 12:17:38 -0000 1.6
@@ -7,7 +7,6 @@
*/
package org.apache.avalon.excalibur.thread.impl;
-import org.apache.excalibur.threadcontext.ThreadContext;
import org.apache.avalon.excalibur.pool.ObjectFactory;
import org.apache.avalon.excalibur.pool.SoftResourceLimitingPool;
import org.apache.avalon.excalibur.thread.ThreadControl;
@@ -18,6 +17,7 @@
import org.apache.avalon.framework.logger.LogKitLogger;
import org.apache.avalon.framework.logger.Loggable;
import org.apache.avalon.framework.logger.Logger;
+import org.apache.excalibur.threadcontext.ThreadContext;
/**
* This class is the public frontend for the thread pool code.
@@ -86,7 +86,7 @@
}
final WorkerThread worker =
- new WorkerThread( this, name, m_pool, context );
+ new WorkerThread( this, name, m_pool, context );
worker.setDaemon( true );
worker.enableLogging( m_logger );
worker.start();
1.4 +6 -8 jakarta-avalon-excalibur/thread/src/java/org/apache/avalon/excalibur/thread/impl/ResourceLimitingThreadPool.java
Index: ResourceLimitingThreadPool.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/thread/src/java/org/apache/avalon/excalibur/thread/impl/ResourceLimitingThreadPool.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- ResourceLimitingThreadPool.java 10 May 2002 14:46:39 -0000 1.3
+++ ResourceLimitingThreadPool.java 13 May 2002 12:17:38 -0000 1.4
@@ -7,19 +7,17 @@
*/
package org.apache.avalon.excalibur.thread.impl;
-import org.apache.excalibur.threadcontext.ThreadContext;
-
import org.apache.avalon.excalibur.instrument.Instrument;
import org.apache.avalon.excalibur.instrument.Instrumentable;
import org.apache.avalon.excalibur.pool.ObjectFactory;
import org.apache.avalon.excalibur.pool.ResourceLimitingPool;
import org.apache.avalon.excalibur.thread.ThreadControl;
import org.apache.avalon.excalibur.thread.ThreadPool;
-
import org.apache.avalon.framework.activity.Disposable;
import org.apache.avalon.framework.activity.Executable;
import org.apache.avalon.framework.logger.LogEnabled;
import org.apache.avalon.framework.logger.Logger;
+import org.apache.excalibur.threadcontext.ThreadContext;
/**
* A Thread Pool which can be configured to have a hard limit on the maximum number of threads
@@ -33,7 +31,7 @@
* @author <a href="mailto:leif@tanukisoftware.com">Leif Mortenson</a>
* @author <a href="mailto:stefano@apache.org">Stefano Mazzocchi</a>
* @author <a href="mailto:peter@apache.org">Peter Donald</a>
- * @version CVS $Revision: 1.3 $ $Date: 2002/05/10 14:46:39 $
+ * @version CVS $Revision: 1.4 $ $Date: 2002/05/13 12:17:38 $
* @since 4.1
*/
public class ResourceLimitingThreadPool
@@ -48,7 +46,7 @@
/** Instrumentable Name assigned to this Instrumentable */
private String m_instrumentableName;
-
+
/*---------------------------------------------------------------
* Constructors
*-------------------------------------------------------------*/
@@ -302,9 +300,9 @@
*/
public Instrumentable[] getChildInstrumentables()
{
- return new Instrumentable[] { m_pool };
+ return new Instrumentable[]{m_pool};
}
-
+
/*---------------------------------------------------------------
* Methods
*-------------------------------------------------------------*/
@@ -332,7 +330,7 @@
throw new IllegalStateException( "Unable to access thread pool due to " + e );
}
}
-
+
/**
* Return the number of worker threads in the pool.
*
1.4 +1 -1 jakarta-avalon-excalibur/thread/src/java/org/apache/avalon/excalibur/thread/impl/WorkerThread.java
Index: WorkerThread.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/thread/src/java/org/apache/avalon/excalibur/thread/impl/WorkerThread.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- WorkerThread.java 1 May 2002 09:11:47 -0000 1.3
+++ WorkerThread.java 13 May 2002 12:17:38 -0000 1.4
@@ -7,13 +7,13 @@
*/
package org.apache.avalon.excalibur.thread.impl;
-import org.apache.excalibur.threadcontext.ThreadContext;
import org.apache.avalon.excalibur.pool.Pool;
import org.apache.avalon.excalibur.pool.Poolable;
import org.apache.avalon.excalibur.thread.ThreadControl;
import org.apache.avalon.framework.activity.Executable;
import org.apache.avalon.framework.logger.LogEnabled;
import org.apache.avalon.framework.logger.Logger;
+import org.apache.excalibur.threadcontext.ThreadContext;
/**
* This class extends the Thread class to add recyclable functionalities.
1.3 +2 -3 jakarta-avalon-excalibur/thread/src/test/org/apache/avalon/excalibur/thread/impl/test/DefaultThreadPoolTestCase.java
Index: DefaultThreadPoolTestCase.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/thread/src/test/org/apache/avalon/excalibur/thread/impl/test/DefaultThreadPoolTestCase.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- DefaultThreadPoolTestCase.java 9 May 2002 06:23:17 -0000 1.2
+++ DefaultThreadPoolTestCase.java 13 May 2002 12:17:38 -0000 1.3
@@ -8,12 +8,11 @@
package org.apache.avalon.excalibur.thread.impl.test;
import java.util.HashMap;
-import org.apache.avalon.framework.logger.ConsoleLogger;
-import org.apache.avalon.excalibur.thread.ThreadPool;
+import junit.framework.TestCase;
import org.apache.avalon.excalibur.thread.impl.DefaultThreadPool;
+import org.apache.avalon.framework.logger.ConsoleLogger;
import org.apache.excalibur.threadcontext.ThreadContext;
import org.apache.excalibur.threadcontext.impl.DefaultThreadContextPolicy;
-import junit.framework.TestCase;
/**
* TestCase for DefaultThreadPool.
1.2 +46 -44 jakarta-avalon-excalibur/thread/src/test/org/apache/avalon/excalibur/thread/impl/test/ResourceLimitingThreadPoolTestCase.java
Index: ResourceLimitingThreadPoolTestCase.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/thread/src/test/org/apache/avalon/excalibur/thread/impl/test/ResourceLimitingThreadPoolTestCase.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ResourceLimitingThreadPoolTestCase.java 10 May 2002 14:46:58 -0000 1.1
+++ ResourceLimitingThreadPoolTestCase.java 13 May 2002 12:17:38 -0000 1.2
@@ -15,19 +15,19 @@
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
-import org.apache.avalon.excalibur.thread.impl.ResourceLimitingThreadPool;
import org.apache.avalon.excalibur.testcase.BufferedLogger;
+import org.apache.avalon.excalibur.thread.impl.ResourceLimitingThreadPool;
/**
* @author <a href="mailto:leif@tanukisoftware.com">Leif Mortenson</a>
- * @version CVS $Revision: 1.1 $ $Date: 2002/05/10 14:46:58 $
+ * @version CVS $Revision: 1.2 $ $Date: 2002/05/13 12:17:38 $
* @since 4.1
*/
public final class ResourceLimitingThreadPoolTestCase
extends TestCase
{
private volatile int m_completeCount;
-
+
/*---------------------------------------------------------------
* Constructors
*-------------------------------------------------------------*/
@@ -48,44 +48,44 @@
{
commonTest( 1, 1, 0L, 200L, 1, true, true, -1, -1 );
}
-
+
public void test1Worker5Tasks()
{
// One will start immediately, 4 will have to wait 200ms each in turn.
commonTest( 5, 1, 800L, 1000L, 1, true, true, -1, -1 );
}
-
+
public void test5Workers10Tasks()
{
// 5 will start immediately, 5 will have to wait 200ms for the first 5 to complete.
commonTest( 10, 5, 200L, 400L, 5, true, true, -1, -1 );
}
-
+
public void test10Workers100Tasks()
{
// 10 will start immediately, next 10 will have to wait 200ms for the
// first 10 to complete and so on.
commonTest( 100, 10, 1800L, 2000L, 10, true, true, -1, -1 );
}
-
+
public void test5Workers6TasksNoBlock()
{
- commonTest( 6, 5, 0L, 200L, 5, true, false, -1, -1 );
+ commonTest( 6, 5, 0L, 200L, 5, true, false, -1, -1 );
}
-
+
public void test5Workers10TasksNotStrict()
{
commonTest( 10, 10, 0L, 200L, 5, false, false, -1, -1 );
}
-
+
private void incCompleteCount()
{
- synchronized (this)
+ synchronized( this )
{
m_completeCount++;
}
}
-
+
private void commonTest( int taskCount,
int firstSize,
long firstTime,
@@ -100,27 +100,28 @@
ResourceLimitingThreadPool pool = new ResourceLimitingThreadPool(
"Test Worker Pool", max, maxStrict, blocking, blockTimeout, trimInterval );
pool.enableLogging( logger );
-
+
Runnable runner = new Runnable()
+ {
+ public void run()
+ {
+ try
{
- public void run()
- {
- try
- {
- Thread.sleep( 200 );
- }
- catch (InterruptedException e)
- {}
-
- incCompleteCount();
- }
- };
-
+ Thread.sleep( 200 );
+ }
+ catch( InterruptedException e )
+ {
+ }
+
+ incCompleteCount();
+ }
+ };
+
long start = System.currentTimeMillis();
m_completeCount = 0;
- for ( int i = 0; i < taskCount; i++ )
+ for( int i = 0; i < taskCount; i++ )
{
- if ( maxStrict && ( !blocking ) && i >= max )
+ if( maxStrict && ( !blocking ) && i >= max )
{
// This request shoudl throw an exception.
try
@@ -128,7 +129,7 @@
pool.execute( runner );
fail( "Should have failed when requesting more than max resources." );
}
- catch ( Exception e )
+ catch( Exception e )
{
// Ok
incCompleteCount();
@@ -140,39 +141,40 @@
}
}
long dur = System.currentTimeMillis() - start;
-
+
// Make sure that the size of the pool is what is expected.
assertEquals( "The pool size was not what it should be.", firstSize, pool.getSize() );
-
+
// Make sure this took about the right amount of time to get here.
//System.out.println( "First time: " + dur );
- if ( Math.abs( dur - firstTime ) > 50 )
+ if( Math.abs( dur - firstTime ) > 50 )
{
- fail( "Time to start all tasks, " + dur +
- ", was not within 50ms of the expected time, " + firstTime );
+ fail( "Time to start all tasks, " + dur +
+ ", was not within 50ms of the expected time, " + firstTime );
}
-
+
// Wait for all worker threads to complete.
- while ( m_completeCount < taskCount )
+ while( m_completeCount < taskCount )
{
try
{
Thread.sleep( 10 );
}
- catch (InterruptedException e)
- {}
+ catch( InterruptedException e )
+ {
+ }
}
-
+
dur = System.currentTimeMillis() - start;
-
+
// Make sure this took about the right amount of time to get here.
//System.out.println( "Total time: " + dur );
- if ( Math.abs( dur - totalTime ) > 50 )
+ if( Math.abs( dur - totalTime ) > 50 )
{
- fail( "Time to complete all tasks, " + dur +
- ", was not within 50ms of the expected time, " + totalTime );
+ fail( "Time to complete all tasks, " + dur +
+ ", was not within 50ms of the expected time, " + totalTime );
}
-
+
//System.out.println( logger.toString() );
}
}
1.7 +2 -2 jakarta-avalon-excalibur/threadcontext/src/java/org/apache/excalibur/threadcontext/ThreadContext.java
Index: ThreadContext.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/threadcontext/src/java/org/apache/excalibur/threadcontext/ThreadContext.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- ThreadContext.java 1 May 2002 09:09:48 -0000 1.6
+++ ThreadContext.java 13 May 2002 12:17:38 -0000 1.7
@@ -36,7 +36,7 @@
* other state in such variables.</p>
*
* @author <a href="mailto:peter@apache.org">Peter Donald</a>
- * @version $Revision: 1.6 $ $Date: 2002/05/01 09:09:48 $
+ * @version $Revision: 1.7 $ $Date: 2002/05/13 12:17:38 $
*/
public final class ThreadContext
{
@@ -158,7 +158,7 @@
*/
public ThreadContext duplicate()
{
- return new ThreadContext( m_policy, m_map );
+ return new ThreadContext( m_policy, m_map );
}
/**
1.3 +3 -3 jakarta-avalon-excalibur/threadcontext/src/java/org/apache/excalibur/threadcontext/impl/AbstractThreadContextPolicy.java
Index: AbstractThreadContextPolicy.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/threadcontext/src/java/org/apache/excalibur/threadcontext/impl/AbstractThreadContextPolicy.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- AbstractThreadContextPolicy.java 10 May 2002 02:51:14 -0000 1.2
+++ AbstractThreadContextPolicy.java 13 May 2002 12:17:38 -0000 1.3
@@ -7,16 +7,16 @@
*/
package org.apache.excalibur.threadcontext.impl;
-import org.apache.excalibur.threadcontext.ThreadContextPolicy;
-import org.apache.excalibur.threadcontext.ThreadContextAccessor;
import java.util.HashMap;
+import org.apache.excalibur.threadcontext.ThreadContextAccessor;
+import org.apache.excalibur.threadcontext.ThreadContextPolicy;
/**
* Abstract class to make it easier to implement
* {@link ThreadContextPolicy} objects.
*
* @author <a href="mailto:peter@apache.org">Peter Donald</a>
- * @version $Revision: 1.2 $ $Date: 2002/05/10 02:51:14 $
+ * @version $Revision: 1.3 $ $Date: 2002/05/13 12:17:38 $
*/
public abstract class AbstractThreadContextPolicy
implements ThreadContextPolicy
1.8 +1 -3 jakarta-avalon-excalibur/threadcontext/src/java/org/apache/excalibur/threadcontext/impl/DefaultThreadContextPolicy.java
Index: DefaultThreadContextPolicy.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/threadcontext/src/java/org/apache/excalibur/threadcontext/impl/DefaultThreadContextPolicy.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- DefaultThreadContextPolicy.java 9 May 2002 10:50:10 -0000 1.7
+++ DefaultThreadContextPolicy.java 13 May 2002 12:17:38 -0000 1.8
@@ -16,7 +16,7 @@
* class to extend for those wanting to write their own Policy.
*
* @author <a href="mailto:peter@apache.org">Peter Donald</a>
- * @version $Revision: 1.7 $ $Date: 2002/05/09 10:50:10 $
+ * @version $Revision: 1.8 $ $Date: 2002/05/13 12:17:38 $
*/
public class DefaultThreadContextPolicy
extends AbstractThreadContextPolicy
@@ -31,7 +31,6 @@
*/
public static final String THREAD_NAME = Thread.class.getName();
-
public DefaultThreadContextPolicy()
{
addEntry( CLASSLOADER, ClassLoader.class, true );
@@ -58,7 +57,6 @@
(ClassLoader)get( accessor, CLASSLOADER, null );
Thread.currentThread().setContextClassLoader( newLoader );
}
-
if( accessor.containsKey( THREAD_NAME ) )
{
1.2 +4 -4 jakarta-avalon-excalibur/converter/src/java/org/apache/excalibur/converter/lib/StringToBooleanConverter.java
Index: StringToBooleanConverter.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/converter/src/java/org/apache/excalibur/converter/lib/StringToBooleanConverter.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- StringToBooleanConverter.java 27 Apr 2002 05:23:01 -0000 1.1
+++ StringToBooleanConverter.java 13 May 2002 12:17:38 -0000 1.2
@@ -7,10 +7,10 @@
*/
package org.apache.excalibur.converter.lib;
-import org.apache.excalibur.converter.AbstractConverter;
-import org.apache.excalibur.converter.ConverterException;
import org.apache.avalon.excalibur.i18n.ResourceManager;
import org.apache.avalon.excalibur.i18n.Resources;
+import org.apache.excalibur.converter.AbstractConverter;
+import org.apache.excalibur.converter.ConverterException;
/**
* String to boolean converter
@@ -45,12 +45,12 @@
{
final String string = (String)object;
if( string.equalsIgnoreCase( "true" ) ||
- string.equalsIgnoreCase( "yes" ) )
+ string.equalsIgnoreCase( "yes" ) )
{
return Boolean.TRUE;
}
else if( string.equalsIgnoreCase( "false" ) ||
- string.equalsIgnoreCase( "no" ) )
+ string.equalsIgnoreCase( "no" ) )
{
return Boolean.FALSE;
}
1.2 +2 -2 jakarta-avalon-excalibur/converter/src/java/org/apache/excalibur/converter/lib/StringToByteConverter.java
Index: StringToByteConverter.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/converter/src/java/org/apache/excalibur/converter/lib/StringToByteConverter.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- StringToByteConverter.java 27 Apr 2002 05:23:01 -0000 1.1
+++ StringToByteConverter.java 13 May 2002 12:17:38 -0000 1.2
@@ -7,10 +7,10 @@
*/
package org.apache.excalibur.converter.lib;
-import org.apache.excalibur.converter.AbstractConverter;
-import org.apache.excalibur.converter.ConverterException;
import org.apache.avalon.excalibur.i18n.ResourceManager;
import org.apache.avalon.excalibur.i18n.Resources;
+import org.apache.excalibur.converter.AbstractConverter;
+import org.apache.excalibur.converter.ConverterException;
/**
* String to byte converter
1.2 +2 -2 jakarta-avalon-excalibur/converter/src/java/org/apache/excalibur/converter/lib/StringToClassConverter.java
Index: StringToClassConverter.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/converter/src/java/org/apache/excalibur/converter/lib/StringToClassConverter.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- StringToClassConverter.java 27 Apr 2002 05:23:01 -0000 1.1
+++ StringToClassConverter.java 13 May 2002 12:17:38 -0000 1.2
@@ -7,10 +7,10 @@
*/
package org.apache.excalibur.converter.lib;
-import org.apache.excalibur.converter.AbstractConverter;
-import org.apache.excalibur.converter.ConverterException;
import org.apache.avalon.excalibur.i18n.ResourceManager;
import org.apache.avalon.excalibur.i18n.Resources;
+import org.apache.excalibur.converter.AbstractConverter;
+import org.apache.excalibur.converter.ConverterException;
/**
* String to class converter
1.2 +2 -2 jakarta-avalon-excalibur/converter/src/java/org/apache/excalibur/converter/lib/StringToDateConverter.java
Index: StringToDateConverter.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/converter/src/java/org/apache/excalibur/converter/lib/StringToDateConverter.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- StringToDateConverter.java 27 Apr 2002 05:23:01 -0000 1.1
+++ StringToDateConverter.java 13 May 2002 12:17:38 -0000 1.2
@@ -8,10 +8,10 @@
package org.apache.excalibur.converter.lib;
import java.util.Date;
-import org.apache.excalibur.converter.AbstractConverter;
-import org.apache.excalibur.converter.ConverterException;
import org.apache.avalon.excalibur.i18n.ResourceManager;
import org.apache.avalon.excalibur.i18n.Resources;
+import org.apache.excalibur.converter.AbstractConverter;
+import org.apache.excalibur.converter.ConverterException;
/**
* String to date converter.
1.2 +2 -2 jakarta-avalon-excalibur/converter/src/java/org/apache/excalibur/converter/lib/StringToDoubleConverter.java
Index: StringToDoubleConverter.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/converter/src/java/org/apache/excalibur/converter/lib/StringToDoubleConverter.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- StringToDoubleConverter.java 27 Apr 2002 05:23:01 -0000 1.1
+++ StringToDoubleConverter.java 13 May 2002 12:17:38 -0000 1.2
@@ -7,10 +7,10 @@
*/
package org.apache.excalibur.converter.lib;
-import org.apache.excalibur.converter.AbstractConverter;
-import org.apache.excalibur.converter.ConverterException;
import org.apache.avalon.excalibur.i18n.ResourceManager;
import org.apache.avalon.excalibur.i18n.Resources;
+import org.apache.excalibur.converter.AbstractConverter;
+import org.apache.excalibur.converter.ConverterException;
/**
* String to double converter
1.2 +2 -2 jakarta-avalon-excalibur/converter/src/java/org/apache/excalibur/converter/lib/StringToFloatConverter.java
Index: StringToFloatConverter.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/converter/src/java/org/apache/excalibur/converter/lib/StringToFloatConverter.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- StringToFloatConverter.java 27 Apr 2002 05:23:01 -0000 1.1
+++ StringToFloatConverter.java 13 May 2002 12:17:38 -0000 1.2
@@ -7,10 +7,10 @@
*/
package org.apache.excalibur.converter.lib;
-import org.apache.excalibur.converter.AbstractConverter;
-import org.apache.excalibur.converter.ConverterException;
import org.apache.avalon.excalibur.i18n.ResourceManager;
import org.apache.avalon.excalibur.i18n.Resources;
+import org.apache.excalibur.converter.AbstractConverter;
+import org.apache.excalibur.converter.ConverterException;
/**
* String to float converter
1.2 +2 -2 jakarta-avalon-excalibur/converter/src/java/org/apache/excalibur/converter/lib/StringToIntegerConverter.java
Index: StringToIntegerConverter.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/converter/src/java/org/apache/excalibur/converter/lib/StringToIntegerConverter.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- StringToIntegerConverter.java 27 Apr 2002 05:23:01 -0000 1.1
+++ StringToIntegerConverter.java 13 May 2002 12:17:38 -0000 1.2
@@ -7,10 +7,10 @@
*/
package org.apache.excalibur.converter.lib;
-import org.apache.excalibur.converter.AbstractConverter;
-import org.apache.excalibur.converter.ConverterException;
import org.apache.avalon.excalibur.i18n.ResourceManager;
import org.apache.avalon.excalibur.i18n.Resources;
+import org.apache.excalibur.converter.AbstractConverter;
+import org.apache.excalibur.converter.ConverterException;
/**
* String to integer converter.
1.2 +2 -2 jakarta-avalon-excalibur/converter/src/java/org/apache/excalibur/converter/lib/StringToLongConverter.java
Index: StringToLongConverter.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/converter/src/java/org/apache/excalibur/converter/lib/StringToLongConverter.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- StringToLongConverter.java 27 Apr 2002 05:23:01 -0000 1.1
+++ StringToLongConverter.java 13 May 2002 12:17:38 -0000 1.2
@@ -7,10 +7,10 @@
*/
package org.apache.excalibur.converter.lib;
-import org.apache.excalibur.converter.AbstractConverter;
-import org.apache.excalibur.converter.ConverterException;
import org.apache.avalon.excalibur.i18n.ResourceManager;
import org.apache.avalon.excalibur.i18n.Resources;
+import org.apache.excalibur.converter.AbstractConverter;
+import org.apache.excalibur.converter.ConverterException;
/**
* String to long converter
1.2 +2 -2 jakarta-avalon-excalibur/converter/src/java/org/apache/excalibur/converter/lib/StringToShortConverter.java
Index: StringToShortConverter.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/converter/src/java/org/apache/excalibur/converter/lib/StringToShortConverter.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- StringToShortConverter.java 27 Apr 2002 05:23:01 -0000 1.1
+++ StringToShortConverter.java 13 May 2002 12:17:38 -0000 1.2
@@ -7,10 +7,10 @@
*/
package org.apache.excalibur.converter.lib;
-import org.apache.excalibur.converter.AbstractConverter;
-import org.apache.excalibur.converter.ConverterException;
import org.apache.avalon.excalibur.i18n.ResourceManager;
import org.apache.avalon.excalibur.i18n.Resources;
+import org.apache.excalibur.converter.AbstractConverter;
+import org.apache.excalibur.converter.ConverterException;
/**
* String to short converter
1.2 +2 -2 jakarta-avalon-excalibur/converter/src/java/org/apache/excalibur/converter/lib/StringToURLConverter.java
Index: StringToURLConverter.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/converter/src/java/org/apache/excalibur/converter/lib/StringToURLConverter.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- StringToURLConverter.java 27 Apr 2002 05:23:01 -0000 1.1
+++ StringToURLConverter.java 13 May 2002 12:17:38 -0000 1.2
@@ -9,10 +9,10 @@
import java.net.MalformedURLException;
import java.net.URL;
-import org.apache.excalibur.converter.AbstractConverter;
-import org.apache.excalibur.converter.ConverterException;
import org.apache.avalon.excalibur.i18n.ResourceManager;
import org.apache.avalon.excalibur.i18n.Resources;
+import org.apache.excalibur.converter.AbstractConverter;
+import org.apache.excalibur.converter.ConverterException;
/**
* String to url converter
1.20 +21 -22 jakarta-avalon-excalibur/extension/src/java/org/apache/avalon/excalibur/extension/Extension.java
Index: Extension.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/extension/src/java/org/apache/avalon/excalibur/extension/Extension.java,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- Extension.java 18 Apr 2002 10:46:58 -0000 1.19
+++ Extension.java 13 May 2002 12:17:38 -0000 1.20
@@ -26,7 +26,7 @@
*
* @author <a href="mailto:craigmcc@apache.org">Craig R. McClanahan</a>
* @author <a href="mailto:peter@apache.org">Peter Donald</a>
- * @version $Revision: 1.19 $ $Date: 2002/04/18 10:46:58 $
+ * @version $Revision: 1.20 $ $Date: 2002/05/13 12:17:38 $
*/
public final class Extension
{
@@ -46,57 +46,57 @@
* @see <a href="http://java.sun.com/j2se/1.3/docs/guide/extensions/spec.html#dependnecy">
* Installed extension dependency</a>
*/
- public static final Attributes.Name OPTIONAL_EXTENSION_LIST =
- new Attributes.Name( "Optional-Extension-List" );
+ public static final Attributes.Name OPTIONAL_EXTENSION_LIST =
+ new Attributes.Name( "Optional-Extension-List" );
/**
* Manifest Attribute Name object for EXTENSION_NAME.
* @see Attributes.Name#EXTENSION_NAME
*/
- public static final Attributes.Name EXTENSION_NAME =
- Attributes.Name.EXTENSION_NAME;
+ public static final Attributes.Name EXTENSION_NAME =
+ Attributes.Name.EXTENSION_NAME;
/**
* Manifest Attribute Name object for SPECIFICATION_VERSION.
* @see Attributes.Name#SPECIFICATION_VERSION
*/
- public static final Attributes.Name SPECIFICATION_VERSION =
- Attributes.Name.SPECIFICATION_VERSION;
+ public static final Attributes.Name SPECIFICATION_VERSION =
+ Attributes.Name.SPECIFICATION_VERSION;
/**
* Manifest Attribute Name object for SPECIFICATION_VENDOR.
* @see Attributes.Name#SPECIFICATION_VENDOR
*/
- public static final Attributes.Name SPECIFICATION_VENDOR =
-Attributes.Name.SPECIFICATION_VENDOR;
+ public static final Attributes.Name SPECIFICATION_VENDOR =
+ Attributes.Name.SPECIFICATION_VENDOR;
/**
* Manifest Attribute Name object for IMPLEMENTATION_VERSION.
* @see Attributes.Name#IMPLEMENTATION_VERSION
*/
- public static final Attributes.Name IMPLEMENTATION_VERSION =
- Attributes.Name.IMPLEMENTATION_VERSION;
+ public static final Attributes.Name IMPLEMENTATION_VERSION =
+ Attributes.Name.IMPLEMENTATION_VERSION;
/**
* Manifest Attribute Name object for IMPLEMENTATION_VENDOR.
* @see Attributes.Name#IMPLEMENTATION_VENDOR
*/
- public static final Attributes.Name IMPLEMENTATION_VENDOR =
- Attributes.Name.IMPLEMENTATION_VENDOR;
+ public static final Attributes.Name IMPLEMENTATION_VENDOR =
+ Attributes.Name.IMPLEMENTATION_VENDOR;
/**
* Manifest Attribute Name object for IMPLEMENTATION_URL.
* @see Attributes.Name#IMPLEMENTATION_URL
*/
- public static final Attributes.Name IMPLEMENTATION_URL =
- Attributes.Name.IMPLEMENTATION_URL;
+ public static final Attributes.Name IMPLEMENTATION_URL =
+ Attributes.Name.IMPLEMENTATION_URL;
/**
* Manifest Attribute Name object for IMPLEMENTATION_VENDOR_ID.
* @see Attributes.Name#IMPLEMENTATION_VENDOR_ID
*/
- public static final Attributes.Name IMPLEMENTATION_VENDOR_ID =
- Attributes.Name.IMPLEMENTATION_VENDOR_ID;
+ public static final Attributes.Name IMPLEMENTATION_VENDOR_ID =
+ Attributes.Name.IMPLEMENTATION_VENDOR_ID;
/**
* Enum indicating that extension is compatible with other extension.
@@ -219,10 +219,9 @@
return (Extension[])results.toArray( new Extension[ results.size() ] );
}
-
/**
* Retrieve the set of <code>Extension</code> objects that are available
- * by the specified Manifest objects. If there are no such optional
+ * by the specified Manifest objects. If there are no such optional
* packages, a zero-length list is returned.
*
* @param manifests the manifests to scan
@@ -260,7 +259,7 @@
/**
* Retrieve the set of <code>Extension</code> objects that are required
- * by the specified Manifest objects. If there are no such optional
+ * by the specified Manifest objects. If there are no such optional
* packages, a zero-length list is returned.
*
* @param manifests the manifests to scan
@@ -685,8 +684,8 @@
* or OPTIONAL_EXTENSION_LIST
*/
private static void getExtension( final Attributes attributes,
- final ArrayList required,
- final Attributes.Name listKey )
+ final ArrayList required,
+ final Attributes.Name listKey )
{
final String names = attributes.getValue( listKey );
if( null == names )
1.34 +9 -9 jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/AbstractContainer.java
Index: AbstractContainer.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/AbstractContainer.java,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -r1.33 -r1.34
--- AbstractContainer.java 2 May 2002 19:23:50 -0000 1.33
+++ AbstractContainer.java 13 May 2002 12:17:39 -0000 1.34
@@ -11,12 +11,6 @@
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
-import org.apache.excalibur.event.command.Command;
-import org.apache.excalibur.event.Queue;
-import org.apache.excalibur.fortress.handler.ComponentHandler;
-import org.apache.excalibur.fortress.util.ExcaliburRoleManager;
-import org.apache.excalibur.fortress.util.RoleManager;
-import org.apache.excalibur.mpool.PoolManager;
import org.apache.avalon.excalibur.collections.BucketMap;
import org.apache.avalon.excalibur.collections.FixedSizeBuffer;
import org.apache.avalon.excalibur.logger.LoggerManager;
@@ -36,6 +30,12 @@
import org.apache.avalon.framework.context.Contextualizable;
import org.apache.avalon.framework.logger.AbstractLogEnabled;
import org.apache.avalon.framework.logger.Logger;
+import org.apache.excalibur.event.Queue;
+import org.apache.excalibur.event.command.Command;
+import org.apache.excalibur.fortress.handler.ComponentHandler;
+import org.apache.excalibur.fortress.util.ExcaliburRoleManager;
+import org.apache.excalibur.fortress.util.RoleManager;
+import org.apache.excalibur.mpool.PoolManager;
/**
* The Container is an interface used to mark the Containers in your system. It
@@ -44,7 +44,7 @@
*
* @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
* @author <a href="mailto:proyal@apache.org">Peter Royal</a>
- * @version CVS $Revision: 1.33 $ $Date: 2002/05/02 19:23:50 $
+ * @version CVS $Revision: 1.34 $ $Date: 2002/05/13 12:17:39 $
*/
public abstract class AbstractContainer
extends AbstractLogEnabled
@@ -192,7 +192,7 @@
}
final String logger = configItem.getAttribute( "logger", null );
- if ( null != logger )
+ if( null != logger )
{
temp.setAttribute( "logger", logger );
}
@@ -519,7 +519,7 @@
}
catch( ComponentException ce )
{
-// ce.printStackTrace( System.err );
+ // ce.printStackTrace( System.err );
if( null != m_parent )
{
return m_parent.lookup( role );
1.9 +3 -3 jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/DefaultContainerManager.java
Index: DefaultContainerManager.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/DefaultContainerManager.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- DefaultContainerManager.java 2 May 2002 17:33:02 -0000 1.8
+++ DefaultContainerManager.java 13 May 2002 12:17:39 -0000 1.9
@@ -8,8 +8,6 @@
package org.apache.excalibur.fortress;
import org.apache.avalon.excalibur.logger.LoggerManager;
-import org.apache.excalibur.fortress.util.ContextManager;
-import org.apache.excalibur.util.ComponentStateValidator;
import org.apache.avalon.framework.activity.Disposable;
import org.apache.avalon.framework.activity.Initializable;
import org.apache.avalon.framework.activity.Startable;
@@ -25,6 +23,8 @@
import org.apache.avalon.framework.logger.Logger;
import org.apache.avalon.framework.parameters.Parameterizable;
import org.apache.avalon.framework.parameters.Parameters;
+import org.apache.excalibur.fortress.util.ContextManager;
+import org.apache.excalibur.util.ComponentStateValidator;
/**
* The ContainerManager is a single point of contact to manage your Container
@@ -40,7 +40,7 @@
* </p>
*
* @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
- * @version CVS $Revision: 1.8 $ $Date: 2002/05/02 17:33:02 $
+ * @version CVS $Revision: 1.9 $ $Date: 2002/05/13 12:17:39 $
*/
public class DefaultContainerManager implements ContainerManager, ContainerManagerConstants
{
1.11 +4 -4 jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/handler/ComponentFactory.java
Index: ComponentFactory.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/handler/ComponentFactory.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- ComponentFactory.java 24 Apr 2002 18:31:57 -0000 1.10
+++ ComponentFactory.java 13 May 2002 12:17:39 -0000 1.11
@@ -8,11 +8,9 @@
package org.apache.excalibur.fortress.handler;
import org.apache.avalon.excalibur.instrument.CounterInstrument;
-import org.apache.avalon.excalibur.instrument.Instrumentable;
import org.apache.avalon.excalibur.instrument.Instrument;
+import org.apache.avalon.excalibur.instrument.Instrumentable;
import org.apache.avalon.excalibur.logger.LoggerManager;
-import org.apache.avalon.excalibur.mpool.ObjectFactory;
-import org.apache.excalibur.fortress.util.RoleManager;
import org.apache.avalon.framework.activity.Disposable;
import org.apache.avalon.framework.activity.Initializable;
import org.apache.avalon.framework.activity.Startable;
@@ -27,13 +25,15 @@
import org.apache.avalon.framework.parameters.Parameterizable;
import org.apache.avalon.framework.parameters.Parameters;
import org.apache.avalon.framework.thread.ThreadSafe;
+import org.apache.excalibur.fortress.util.RoleManager;
+import org.apache.excalibur.mpool.ObjectFactory;
/**
* Factory for Avalon components.
*
* @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
* @author <a href="mailto:paul@luminas.co.uk">Paul Russell</a>
- * @version CVS $Revision: 1.10 $ $Date: 2002/04/24 18:31:57 $
+ * @version CVS $Revision: 1.11 $ $Date: 2002/05/13 12:17:39 $
* @since 4.0
*/
public class ComponentFactory
1.14 +4 -4 jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/handler/FactoryComponentHandler.java
Index: FactoryComponentHandler.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/handler/FactoryComponentHandler.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- FactoryComponentHandler.java 13 Apr 2002 01:39:56 -0000 1.13
+++ FactoryComponentHandler.java 13 May 2002 12:17:39 -0000 1.14
@@ -7,24 +7,24 @@
*/
package org.apache.excalibur.fortress.handler;
-import org.apache.avalon.excalibur.instrument.Instrumentable;
import org.apache.avalon.excalibur.instrument.Instrument;
+import org.apache.avalon.excalibur.instrument.Instrumentable;
import org.apache.avalon.excalibur.logger.LoggerManager;
-import org.apache.excalibur.fortress.Container;
-import org.apache.excalibur.fortress.util.RoleManager;
import org.apache.avalon.framework.activity.Disposable;
import org.apache.avalon.framework.component.Component;
import org.apache.avalon.framework.component.ComponentManager;
import org.apache.avalon.framework.configuration.Configuration;
import org.apache.avalon.framework.context.Context;
import org.apache.avalon.framework.logger.Logger;
+import org.apache.excalibur.fortress.Container;
+import org.apache.excalibur.fortress.util.RoleManager;
/**
* The FactoryComponentHandler to make sure components are initialized
* and destroyed correctly.
*
* @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
- * @version CVS $Revision: 1.13 $ $Date: 2002/04/13 01:39:56 $
+ * @version CVS $Revision: 1.14 $ $Date: 2002/05/13 12:17:39 $
* @since 4.0
*/
public final class FactoryComponentHandler
1.15 +4 -4 jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/handler/PerThreadComponentHandler.java
Index: PerThreadComponentHandler.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/handler/PerThreadComponentHandler.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- PerThreadComponentHandler.java 13 Apr 2002 01:39:56 -0000 1.14
+++ PerThreadComponentHandler.java 13 May 2002 12:17:39 -0000 1.15
@@ -7,23 +7,23 @@
*/
package org.apache.excalibur.fortress.handler;
-import org.apache.avalon.excalibur.instrument.Instrumentable;
import org.apache.avalon.excalibur.instrument.Instrument;
+import org.apache.avalon.excalibur.instrument.Instrumentable;
import org.apache.avalon.excalibur.logger.LoggerManager;
-import org.apache.excalibur.fortress.Container;
-import org.apache.excalibur.fortress.util.RoleManager;
import org.apache.avalon.framework.component.Component;
import org.apache.avalon.framework.component.ComponentManager;
import org.apache.avalon.framework.configuration.Configuration;
import org.apache.avalon.framework.context.Context;
import org.apache.avalon.framework.logger.Logger;
+import org.apache.excalibur.fortress.Container;
+import org.apache.excalibur.fortress.util.RoleManager;
/**
* The ThreadSafeComponentHandler to make sure components are initialized
* and destroyed correctly.
*
* @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
- * @version CVS $Revision: 1.14 $ $Date: 2002/04/13 01:39:56 $
+ * @version CVS $Revision: 1.15 $ $Date: 2002/05/13 12:17:39 $
* @since 4.0
*/
public final class PerThreadComponentHandler implements ComponentHandler, Instrumentable
1.18 +6 -6 jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/handler/PoolableComponentHandler.java
Index: PoolableComponentHandler.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/handler/PoolableComponentHandler.java,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- PoolableComponentHandler.java 2 May 2002 19:23:50 -0000 1.17
+++ PoolableComponentHandler.java 13 May 2002 12:17:39 -0000 1.18
@@ -7,26 +7,26 @@
*/
package org.apache.excalibur.fortress.handler;
-import org.apache.avalon.excalibur.instrument.Instrumentable;
import org.apache.avalon.excalibur.instrument.Instrument;
+import org.apache.avalon.excalibur.instrument.Instrumentable;
import org.apache.avalon.excalibur.logger.LoggerManager;
-import org.apache.excalibur.mpool.Pool;
-import org.apache.excalibur.mpool.PoolManager;
-import org.apache.excalibur.fortress.Container;
-import org.apache.excalibur.fortress.util.RoleManager;
import org.apache.avalon.framework.activity.Disposable;
import org.apache.avalon.framework.component.Component;
import org.apache.avalon.framework.component.ComponentManager;
import org.apache.avalon.framework.configuration.Configuration;
import org.apache.avalon.framework.context.Context;
import org.apache.avalon.framework.logger.Logger;
+import org.apache.excalibur.fortress.Container;
+import org.apache.excalibur.fortress.util.RoleManager;
+import org.apache.excalibur.mpool.Pool;
+import org.apache.excalibur.mpool.PoolManager;
/**
* The PoolableComponentHandler to make sure components are initialized
* and destroyed correctly.
*
* @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
- * @version CVS $Revision: 1.17 $ $Date: 2002/05/02 19:23:50 $
+ * @version CVS $Revision: 1.18 $ $Date: 2002/05/13 12:17:39 $
* @since 4.0
*/
public final class PoolableComponentHandler implements ComponentHandler, Instrumentable
1.13 +4 -4 jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/handler/ThreadSafeComponentHandler.java
Index: ThreadSafeComponentHandler.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/handler/ThreadSafeComponentHandler.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- ThreadSafeComponentHandler.java 13 Apr 2002 01:39:57 -0000 1.12
+++ ThreadSafeComponentHandler.java 13 May 2002 12:17:39 -0000 1.13
@@ -7,11 +7,9 @@
*/
package org.apache.excalibur.fortress.handler;
-import org.apache.avalon.excalibur.instrument.Instrumentable;
import org.apache.avalon.excalibur.instrument.Instrument;
+import org.apache.avalon.excalibur.instrument.Instrumentable;
import org.apache.avalon.excalibur.logger.LoggerManager;
-import org.apache.excalibur.fortress.Container;
-import org.apache.excalibur.fortress.util.RoleManager;
import org.apache.avalon.framework.activity.Disposable;
import org.apache.avalon.framework.activity.Startable;
import org.apache.avalon.framework.component.Component;
@@ -19,13 +17,15 @@
import org.apache.avalon.framework.configuration.Configuration;
import org.apache.avalon.framework.context.Context;
import org.apache.avalon.framework.logger.Logger;
+import org.apache.excalibur.fortress.Container;
+import org.apache.excalibur.fortress.util.RoleManager;
/**
* The ThreadSafeComponentHandler to make sure components are initialized
* and destroyed correctly.
*
* @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
- * @version CVS $Revision: 1.12 $ $Date: 2002/04/13 01:39:57 $
+ * @version CVS $Revision: 1.13 $ $Date: 2002/05/13 12:17:39 $
* @since 4.0
*/
public final class ThreadSafeComponentHandler implements ComponentHandler, Instrumentable
1.8 +2 -3 jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/util/AbstractRoleManager.java
Index: AbstractRoleManager.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/util/AbstractRoleManager.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- AbstractRoleManager.java 13 Apr 2002 01:39:57 -0000 1.7
+++ AbstractRoleManager.java 13 May 2002 12:17:39 -0000 1.8
@@ -17,7 +17,7 @@
* information is hard-coded.
*
* @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
- * @version CVS $Revision: 1.7 $ $Date: 2002/04/13 01:39:57 $
+ * @version CVS $Revision: 1.8 $ $Date: 2002/05/13 12:17:39 $
* @since 4.1
*/
public abstract class AbstractRoleManager
@@ -220,8 +220,7 @@
* does not have the match, and there is a parent RoleManager, the
* parent will be asked to resolve the class name.
*
- * @param role The role that this shorthand refers to.
- * @param shorthand The shorthand name for the type of Component
+ * @param klass The class to get rolename for
* @return the FQCN for the role/hint combination.
*/
public final String getRoleForClass( final Class klass )
1.11 +2 -2 jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/util/ContextBuilder.java
Index: ContextBuilder.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/util/ContextBuilder.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- ContextBuilder.java 2 May 2002 19:23:50 -0000 1.10
+++ ContextBuilder.java 13 May 2002 12:17:39 -0000 1.11
@@ -2,14 +2,14 @@
import java.io.File;
import org.apache.avalon.excalibur.instrument.InstrumentManager;
-import org.apache.excalibur.event.Queue;
-import org.apache.excalibur.mpool.PoolManager;
import org.apache.avalon.excalibur.logger.LoggerManager;
import org.apache.avalon.framework.component.ComponentManager;
import org.apache.avalon.framework.configuration.Configuration;
import org.apache.avalon.framework.context.Context;
import org.apache.avalon.framework.context.ContextException;
import org.apache.avalon.framework.context.DefaultContext;
+import org.apache.excalibur.event.Queue;
+import org.apache.excalibur.mpool.PoolManager;
/**
* Helper class to create a context for the ContextManager.
1.19 +9 -9 jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/util/ContextManager.java
Index: ContextManager.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/util/ContextManager.java,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- ContextManager.java 2 May 2002 19:23:50 -0000 1.18
+++ ContextManager.java 13 May 2002 12:17:39 -0000 1.19
@@ -10,12 +10,8 @@
import java.util.ArrayList;
import java.util.Iterator;
import org.apache.avalon.excalibur.instrument.manager.DefaultInstrumentManager;
-import org.apache.excalibur.event.Queue;
-import org.apache.excalibur.event.command.CommandManager;
import org.apache.avalon.excalibur.logger.LogKitLoggerManager;
import org.apache.avalon.excalibur.logger.LoggerManager;
-import org.apache.excalibur.mpool.DefaultPoolManager;
-import org.apache.excalibur.mpool.PoolManager;
import org.apache.avalon.framework.activity.Disposable;
import org.apache.avalon.framework.activity.Startable;
import org.apache.avalon.framework.component.ComponentManager;
@@ -30,6 +26,10 @@
import org.apache.avalon.framework.context.DefaultContext;
import org.apache.avalon.framework.logger.ConsoleLogger;
import org.apache.avalon.framework.logger.Logger;
+import org.apache.excalibur.event.Queue;
+import org.apache.excalibur.event.command.CommandManager;
+import org.apache.excalibur.mpool.DefaultPoolManager;
+import org.apache.excalibur.mpool.PoolManager;
import org.apache.excalibur.source.Source;
import org.apache.excalibur.source.SourceResolver;
import org.apache.excalibur.source.impl.ResourceSourceFactory;
@@ -61,7 +61,7 @@
* @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
* @author <a href="mailto:leo.sutic@inspireinfrastructure.com">Leo Sutic</a>
* @author <a href="mailto:proyal@apache.org">Peter Royal</a>
- * @version CVS $Revision: 1.18 $ $Date: 2002/05/02 19:23:50 $
+ * @version CVS $Revision: 1.19 $ $Date: 2002/05/13 12:17:39 $
* @since 4.1
*/
public class ContextManager implements ContextManagerConstants
@@ -346,9 +346,9 @@
{
}
- Configuration config = getConfiguration(ROLE_MANAGER_CONFIGURATION, ROLE_MANAGER_CONFIGURATION_URI);
+ Configuration config = getConfiguration( ROLE_MANAGER_CONFIGURATION, ROLE_MANAGER_CONFIGURATION_URI );
- if (config == null)
+ if( config == null )
{
// See if we can inherit from the parent...
try
@@ -371,9 +371,9 @@
}
}
- ConfigurableRoleManager rm = new ConfigurableRoleManager(new ExcaliburRoleManager());
+ ConfigurableRoleManager rm = new ConfigurableRoleManager( new ExcaliburRoleManager() );
- rm.configure(config);
+ rm.configure( config );
assumeOwnership( rm );
childContext.put( ROLE_MANAGER, rm );
1.7 +2 -2 jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/mpool/DefaultPoolManager.java
Index: DefaultPoolManager.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/mpool/DefaultPoolManager.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- DefaultPoolManager.java 2 May 2002 19:03:47 -0000 1.6
+++ DefaultPoolManager.java 13 May 2002 12:17:39 -0000 1.7
@@ -10,8 +10,8 @@
import java.util.Iterator;
import java.util.Random;
import org.apache.avalon.excalibur.collections.BucketMap;
-import org.apache.excalibur.event.command.RepeatedCommand;
import org.apache.excalibur.event.Queue;
+import org.apache.excalibur.event.command.RepeatedCommand;
/**
* This interface is for a PoolManager that creates pools that are managed
@@ -19,7 +19,7 @@
* the constructor.
*
* @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
- * @version CVS $Revision: 1.6 $ $Date: 2002/05/02 19:03:47 $
+ * @version CVS $Revision: 1.7 $ $Date: 2002/05/13 12:17:39 $
* @since 4.1
*/
public class DefaultPoolManager implements PoolManager
1.17 +5 -5 jakarta-avalon-excalibur/fortress/src/test/org/apache/excalibur/fortress/test/ContainerProfile.java
Index: ContainerProfile.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/fortress/src/test/org/apache/excalibur/fortress/test/ContainerProfile.java,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- ContainerProfile.java 13 Apr 2002 01:39:57 -0000 1.16
+++ ContainerProfile.java 13 May 2002 12:17:39 -0000 1.17
@@ -14,10 +14,6 @@
import org.apache.avalon.excalibur.datasource.DataSourceComponent;
import org.apache.avalon.excalibur.logger.DefaultLogKitManager;
import org.apache.avalon.excalibur.monitor.Monitor;
-import org.apache.excalibur.fortress.ContainerManager;
-import org.apache.excalibur.fortress.DefaultContainerManager;
-import org.apache.excalibur.fortress.util.ContextBuilder;
-import org.apache.excalibur.fortress.util.ContextManager;
import org.apache.avalon.excalibur.testcase.CascadingAssertionFailedError;
import org.apache.avalon.excalibur.testcase.LatchedThreadGroup;
import org.apache.avalon.excalibur.xml.Parser;
@@ -28,12 +24,16 @@
import org.apache.avalon.framework.context.DefaultContext;
import org.apache.avalon.framework.logger.LogKitLogger;
import org.apache.avalon.framework.logger.Logger;
+import org.apache.excalibur.fortress.ContainerManager;
+import org.apache.excalibur.fortress.DefaultContainerManager;
+import org.apache.excalibur.fortress.util.ContextBuilder;
+import org.apache.excalibur.fortress.util.ContextManager;
/**
* Used as a basis for the PoolComparisonProfile Tests
*
* @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
- * @version $Id: ContainerProfile.java,v 1.16 2002/04/13 01:39:57 jefft Exp $
+ * @version $Id: ContainerProfile.java,v 1.17 2002/05/13 12:17:39 donaldp Exp $
*/
public final class ContainerProfile
extends TestCase
1.7 +2 -2 jakarta-avalon-excalibur/fortress/src/test/org/apache/excalibur/fortress/test/TestContainer.java
Index: TestContainer.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/fortress/src/test/org/apache/excalibur/fortress/test/TestContainer.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- TestContainer.java 4 Apr 2002 16:04:28 -0000 1.6
+++ TestContainer.java 13 May 2002 12:17:39 -0000 1.7
@@ -7,8 +7,8 @@
*/
package org.apache.excalibur.fortress.test;
-import org.apache.excalibur.fortress.AbstractContainer;
import org.apache.avalon.framework.component.ComponentManager;
+import org.apache.excalibur.fortress.AbstractContainer;
/**
* The Container is an interface used to mark the Containers in your system. It
@@ -16,7 +16,7 @@
* Manager can expose that to the instantiating class.
*
* @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
- * @version CVS $Revision: 1.6 $ $Date: 2002/04/04 16:04:28 $
+ * @version CVS $Revision: 1.7 $ $Date: 2002/05/13 12:17:39 $
*/
public final class TestContainer
extends AbstractContainer
1.9 +2 -2 jakarta-avalon-excalibur/fortress/src/test/org/apache/excalibur/fortress/util/test/ConfigurableRoleManagerTestCase.java
Index: ConfigurableRoleManagerTestCase.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/fortress/src/test/org/apache/excalibur/fortress/util/test/ConfigurableRoleManagerTestCase.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- ConfigurableRoleManagerTestCase.java 2 May 2002 17:33:02 -0000 1.8
+++ ConfigurableRoleManagerTestCase.java 13 May 2002 12:17:39 -0000 1.9
@@ -8,8 +8,8 @@
package org.apache.excalibur.fortress.util.test;
import junit.framework.TestCase;
-import org.apache.excalibur.fortress.util.ConfigurableRoleManager;
import org.apache.avalon.framework.configuration.DefaultConfigurationBuilder;
+import org.apache.excalibur.fortress.util.ConfigurableRoleManager;
/**
* Configurable RoleManager implementation. It populates the RoleManager
@@ -17,7 +17,7 @@
* in the org.apache.avalon.component package.
*
* @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
- * @version CVS $Revision: 1.8 $ $Date: 2002/05/02 17:33:02 $
+ * @version CVS $Revision: 1.9 $ $Date: 2002/05/13 12:17:39 $
* @since 4.1
*/
public class ConfigurableRoleManagerTestCase
1.9 +7 -7 jakarta-avalon-excalibur/fortress/src/test/org/apache/excalibur/fortress/util/test/ExcaliburRoleManagerTestCase.java
Index: ExcaliburRoleManagerTestCase.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/fortress/src/test/org/apache/excalibur/fortress/util/test/ExcaliburRoleManagerTestCase.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- ExcaliburRoleManagerTestCase.java 2 May 2002 17:33:02 -0000 1.8
+++ ExcaliburRoleManagerTestCase.java 13 May 2002 12:17:39 -0000 1.9
@@ -16,7 +16,7 @@
* in the org.apache.avalon.component package.
*
* @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
- * @version CVS $Revision: 1.8 $ $Date: 2002/05/02 17:33:02 $
+ * @version CVS $Revision: 1.9 $ $Date: 2002/05/13 12:17:39 $
* @since 4.1
*/
public class ExcaliburRoleManagerTestCase
@@ -36,7 +36,7 @@
Class.forName( "org.apache.avalon.excalibur.datasource.InformixDataSource" );
m_informixClassExists = true;
}
- catch (Exception e)
+ catch( Exception e )
{
m_informixClassExists = false;
}
@@ -66,7 +66,7 @@
roles.getClassForName( "j2ee-datasource" ),
Class.forName( "org.apache.avalon.excalibur.datasource.J2eeDataSource" )
);
- if ( m_informixClassExists )
+ if( m_informixClassExists )
{
assertEquals(
roles.getClassForName( "informix-datasource" ),
@@ -131,7 +131,7 @@
roles.getNameForClass( Class.forName( "org.apache.avalon.excalibur.datasource.J2eeDataSource" ) ),
"j2ee-datasource"
);
- if ( m_informixClassExists )
+ if( m_informixClassExists )
{
assertEquals(
roles.getNameForClass( Class.forName( "org.apache.avalon.excalibur.datasource.InformixDataSource" ) ),
@@ -196,7 +196,7 @@
roles.getRoleForClass( Class.forName( "org.apache.avalon.excalibur.datasource.J2eeDataSource" ) ),
"org.apache.avalon.excalibur.datasource.DataSourceComponent"
);
- if ( m_informixClassExists )
+ if( m_informixClassExists )
{
assertEquals(
roles.getRoleForClass( Class.forName( "org.apache.avalon.excalibur.datasource.InformixDataSource" ) ),
@@ -266,7 +266,7 @@
classes[ 1 ],
Class.forName( "org.apache.avalon.excalibur.datasource.J2eeDataSource" )
);
- if ( m_informixClassExists )
+ if( m_informixClassExists )
{
assertEquals(
classes[ 2 ],
@@ -346,7 +346,7 @@
roles.getHandlerClassForClass( Class.forName( "org.apache.avalon.excalibur.datasource.J2eeDataSource" ) ),
Class.forName( "org.apache.excalibur.fortress.handler.ThreadSafeComponentHandler" )
);
- if ( m_informixClassExists )
+ if( m_informixClassExists )
{
assertEquals(
roles.getHandlerClassForClass( Class.forName( "org.apache.avalon.excalibur.datasource.InformixDataSource" ) ),
1.5 +2 -2 jakarta-avalon-excalibur/fortress/src/test/org/apache/excalibur/mpool/test/ClassInstanceObjectFactory.java
Index: ClassInstanceObjectFactory.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/fortress/src/test/org/apache/excalibur/mpool/test/ClassInstanceObjectFactory.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- ClassInstanceObjectFactory.java 2 May 2002 19:03:47 -0000 1.4
+++ ClassInstanceObjectFactory.java 13 May 2002 12:17:39 -0000 1.5
@@ -8,13 +8,13 @@
package org.apache.excalibur.mpool.test;
import java.util.HashMap;
-import org.apache.excalibur.mpool.ObjectFactory;
import org.apache.avalon.framework.activity.Disposable;
import org.apache.avalon.framework.logger.Logger;
+import org.apache.excalibur.mpool.ObjectFactory;
/**
* @author <a href="mailto:leif@tanukisoftware.com">Leif Mortenson</a>
- * @version CVS $Revision: 1.4 $ $Date: 2002/05/02 19:03:47 $
+ * @version CVS $Revision: 1.5 $ $Date: 2002/05/13 12:17:39 $
* @since 4.1
*/
public class ClassInstanceObjectFactory
1.8 +2 -2 jakarta-avalon-excalibur/fortress/src/test/org/apache/excalibur/mpool/test/MultiThreadedPoolComparisonProfile.java
Index: MultiThreadedPoolComparisonProfile.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/fortress/src/test/org/apache/excalibur/mpool/test/MultiThreadedPoolComparisonProfile.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- MultiThreadedPoolComparisonProfile.java 2 May 2002 19:03:47 -0000 1.7
+++ MultiThreadedPoolComparisonProfile.java 13 May 2002 12:17:39 -0000 1.8
@@ -7,19 +7,19 @@
*/
package org.apache.excalibur.mpool.test;
-import org.apache.excalibur.mpool.Pool;
import org.apache.avalon.excalibur.pool.Poolable;
import org.apache.avalon.excalibur.testcase.CascadingAssertionFailedError;
import org.apache.avalon.excalibur.testcase.LatchedThreadGroup;
import org.apache.avalon.framework.activity.Disposable;
import org.apache.avalon.framework.logger.Logger;
+import org.apache.excalibur.mpool.Pool;
/**
* This is used to profile and compare various pool implementations
* given a single access thread.
*
* @author <a href="mailto:leif@tanukisoftware.com">Leif Mortenson</a>
- * @version $Id: MultiThreadedPoolComparisonProfile.java,v 1.7 2002/05/02 19:03:47 bloritsch Exp $
+ * @version $Id: MultiThreadedPoolComparisonProfile.java,v 1.8 2002/05/13 12:17:39 donaldp Exp $
*/
public class MultiThreadedPoolComparisonProfile
extends PoolComparisonProfileAbstract
1.12 +5 -5 jakarta-avalon-excalibur/fortress/src/test/org/apache/excalibur/mpool/test/PoolComparisonProfileAbstract.java
Index: PoolComparisonProfileAbstract.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/fortress/src/test/org/apache/excalibur/mpool/test/PoolComparisonProfileAbstract.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- PoolComparisonProfileAbstract.java 2 May 2002 19:03:47 -0000 1.11
+++ PoolComparisonProfileAbstract.java 13 May 2002 12:17:39 -0000 1.12
@@ -8,20 +8,20 @@
package org.apache.excalibur.mpool.test;
import junit.framework.TestCase;
-import org.apache.excalibur.mpool.FixedSizePool;
-import org.apache.excalibur.mpool.ObjectFactory;
-import org.apache.excalibur.mpool.Pool;
-import org.apache.excalibur.mpool.VariableSizePool;
import org.apache.avalon.excalibur.pool.ResourceLimitingPool;
import org.apache.avalon.framework.logger.LogEnabled;
import org.apache.avalon.framework.logger.LogKitLogger;
import org.apache.avalon.framework.logger.Logger;
+import org.apache.excalibur.mpool.FixedSizePool;
+import org.apache.excalibur.mpool.ObjectFactory;
+import org.apache.excalibur.mpool.Pool;
+import org.apache.excalibur.mpool.VariableSizePool;
/**
* Used as a basis for the PoolComparisonProfile Tests
*
* @author <a href="mailto:leif@tanukisoftware.com">Leif Mortenson</a>
- * @version $Id: PoolComparisonProfileAbstract.java,v 1.11 2002/05/02 19:03:47 bloritsch Exp $
+ * @version $Id: PoolComparisonProfileAbstract.java,v 1.12 2002/05/13 12:17:39 donaldp Exp $
*/
public abstract class PoolComparisonProfileAbstract
extends TestCase
1.8 +2 -2 jakarta-avalon-excalibur/fortress/src/test/org/apache/excalibur/mpool/test/SingleThreadedPoolComparisonProfile.java
Index: SingleThreadedPoolComparisonProfile.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/fortress/src/test/org/apache/excalibur/mpool/test/SingleThreadedPoolComparisonProfile.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- SingleThreadedPoolComparisonProfile.java 2 May 2002 19:03:47 -0000 1.7
+++ SingleThreadedPoolComparisonProfile.java 13 May 2002 12:17:39 -0000 1.8
@@ -7,16 +7,16 @@
*/
package org.apache.excalibur.mpool.test;
-import org.apache.excalibur.mpool.Pool;
import org.apache.avalon.excalibur.pool.Poolable;
import org.apache.avalon.framework.activity.Disposable;
+import org.apache.excalibur.mpool.Pool;
/**
* This is used to profile and compare various pool implementations
* given a single access thread.
*
* @author <a href="mailto:leif@tanukisoftware.com">Leif Mortenson</a>
- * @version $Id: SingleThreadedPoolComparisonProfile.java,v 1.7 2002/05/02 19:03:47 bloritsch Exp $
+ * @version $Id: SingleThreadedPoolComparisonProfile.java,v 1.8 2002/05/13 12:17:39 donaldp Exp $
*/
public class SingleThreadedPoolComparisonProfile
extends PoolComparisonProfileAbstract
1.4 +4 -3 jakarta-avalon-excalibur/sourceresolve/src/java/org/apache/excalibur/source/Source.java
Index: Source.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/sourceresolve/src/java/org/apache/excalibur/source/Source.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- Source.java 24 Apr 2002 12:35:37 -0000 1.3
+++ Source.java 13 May 2002 12:17:40 -0000 1.4
@@ -50,9 +50,10 @@
* validity object must be the same until discardValidity is called!
*
* @author <a href="mailto:cziegeler@apache.org">Carsten Ziegeler</a>
- * @version CVS $Revision: 1.3 $ $Date: 2002/04/24 12:35:37 $
+ * @version CVS $Revision: 1.4 $ $Date: 2002/05/13 12:17:40 $
*/
-public interface Source {
+public interface Source
+{
/**
* Return an <code>InputStream</code> object to read from the source.
@@ -87,5 +88,5 @@
* If the source is not able to determine the mime-type by itself
* this can be null.
*/
- String getMimeType();
+ String getMimeType();
}
1.2 +23 -17 jakarta-avalon-excalibur/sourceresolve/src/java/org/apache/excalibur/source/SourceException.java
Index: SourceException.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/sourceresolve/src/java/org/apache/excalibur/source/SourceException.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- SourceException.java 24 Apr 2002 12:35:37 -0000 1.1
+++ SourceException.java 13 May 2002 12:17:40 -0000 1.2
@@ -17,10 +17,11 @@
* the source.
*
* @author <a href="mailto:cziegeler@apache.org">Carsten Ziegeler</a>
- * @version CVS $Revision: 1.1 $ $Date: 2002/04/24 12:35:37 $
+ * @version CVS $Revision: 1.2 $ $Date: 2002/05/13 12:17:40 $
*/
public class SourceException
- extends CascadingException {
+ extends CascadingException
+{
/**
* Construct a new <code>SourceException</code> instance.
@@ -43,31 +44,36 @@
super( message, throwable );
}
- public String toString() {
+ public String toString()
+ {
StringBuffer s = new StringBuffer();
- s.append(super.toString());
- if(getCause()!=null) {
- s.append(": ");
- s.append(getCause().toString());
+ s.append( super.toString() );
+ if( getCause() != null )
+ {
+ s.append( ": " );
+ s.append( getCause().toString() );
}
return s.toString();
}
- public void printStackTrace() {
+ public void printStackTrace()
+ {
super.printStackTrace();
- if(getCause()!=null)
+ if( getCause() != null )
getCause().printStackTrace();
}
- public void printStackTrace( PrintStream s ) {
- super.printStackTrace(s);
- if(getCause()!=null)
- getCause().printStackTrace(s);
+ public void printStackTrace( PrintStream s )
+ {
+ super.printStackTrace( s );
+ if( getCause() != null )
+ getCause().printStackTrace( s );
}
- public void printStackTrace( PrintWriter s ) {
- super.printStackTrace(s);
- if(getCause()!=null)
- getCause().printStackTrace(s);
+ public void printStackTrace( PrintWriter s )
+ {
+ super.printStackTrace( s );
+ if( getCause() != null )
+ getCause().printStackTrace( s );
}
}
1.3 +2 -2 jakarta-avalon-excalibur/sourceresolve/src/java/org/apache/excalibur/source/SourceFactory.java
Index: SourceFactory.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/sourceresolve/src/java/org/apache/excalibur/source/SourceFactory.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- SourceFactory.java 24 Apr 2002 12:35:37 -0000 1.2
+++ SourceFactory.java 13 May 2002 12:17:40 -0000 1.3
@@ -14,10 +14,10 @@
/**
* @author <a href="mailto:cziegeler@apache.org">Carsten Ziegeler</a>
- * @version $Id: SourceFactory.java,v 1.2 2002/04/24 12:35:37 cziegeler Exp $
+ * @version $Id: SourceFactory.java,v 1.3 2002/05/13 12:17:40 donaldp Exp $
*/
public interface SourceFactory
- extends Component
+ extends Component
{
String ROLE = SourceFactory.class.getName();
1.2 +3 -2 jakarta-avalon-excalibur/sourceresolve/src/java/org/apache/excalibur/source/SourceNotFoundException.java
Index: SourceNotFoundException.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/sourceresolve/src/java/org/apache/excalibur/source/SourceNotFoundException.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- SourceNotFoundException.java 10 May 2002 07:54:09 -0000 1.1
+++ SourceNotFoundException.java 13 May 2002 12:17:40 -0000 1.2
@@ -12,10 +12,11 @@
* This Exception should be thrown if the source could not be found.
*
* @author <a href="mailto:cziegeler@apache.org">Carsten Ziegeler</a>
- * @version CVS $Revision: 1.1 $ $Date: 2002/05/10 07:54:09 $
+ * @version CVS $Revision: 1.2 $ $Date: 2002/05/13 12:17:40 $
*/
public class SourceNotFoundException
- extends SourceException {
+ extends SourceException
+{
/**
* Construct a new <code>SourceNotFoundException</code> instance.
1.4 +2 -2 jakarta-avalon-excalibur/sourceresolve/src/java/org/apache/excalibur/source/SourceResolver.java
Index: SourceResolver.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/sourceresolve/src/java/org/apache/excalibur/source/SourceResolver.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- SourceResolver.java 10 May 2002 07:54:09 -0000 1.3
+++ SourceResolver.java 13 May 2002 12:17:40 -0000 1.4
@@ -29,11 +29,11 @@
* like Composable, Initializable, Disposable etc.
*
* @author <a href="mailto:cziegeler@apache.org">Carsten Ziegeler</a>
- * @version CVS $Revision: 1.3 $ $Date: 2002/05/10 07:54:09 $
+ * @version CVS $Revision: 1.4 $ $Date: 2002/05/13 12:17:40 $
*/
public interface SourceResolver
- extends Component
+ extends Component
{
String ROLE = SourceResolver.class.getName();
1.2 +3 -2 jakarta-avalon-excalibur/sourceresolve/src/java/org/apache/excalibur/source/impl/ResourceSource.java
Index: ResourceSource.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/sourceresolve/src/java/org/apache/excalibur/source/impl/ResourceSource.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ResourceSource.java 19 Apr 2002 09:05:37 -0000 1.1
+++ ResourceSource.java 13 May 2002 12:17:40 -0000 1.2
@@ -9,7 +9,8 @@
import java.io.IOException;
import java.io.InputStream;
-import org.apache.excalibur.source.*;
+import org.apache.excalibur.source.Source;
+import org.apache.excalibur.source.SourceValidity;
import org.apache.excalibur.source.impl.validity.NOPValidity;
/**
@@ -17,7 +18,7 @@
* which gets a resource from the classloader.
*
* @author <a href="mailto:cziegeler@apache.org">Carsten Ziegeler</a>
- * @version CVS $Revision: 1.1 $ $Date: 2002/04/19 09:05:37 $
+ * @version CVS $Revision: 1.2 $ $Date: 2002/05/13 12:17:40 $
*/
public final class ResourceSource
1.4 +4 -2 jakarta-avalon-excalibur/sourceresolve/src/java/org/apache/excalibur/source/impl/ResourceSourceFactory.java
Index: ResourceSourceFactory.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/sourceresolve/src/java/org/apache/excalibur/source/impl/ResourceSourceFactory.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- ResourceSourceFactory.java 1 May 2002 09:11:47 -0000 1.3
+++ ResourceSourceFactory.java 13 May 2002 12:17:40 -0000 1.4
@@ -12,13 +12,15 @@
import java.util.Map;
import org.apache.avalon.framework.logger.AbstractLogEnabled;
import org.apache.avalon.framework.thread.ThreadSafe;
-import org.apache.excalibur.source.*;
+import org.apache.excalibur.source.Source;
+import org.apache.excalibur.source.SourceException;
+import org.apache.excalibur.source.SourceFactory;
/**
* A factory for the Resource protocol
*
* @author <a href="mailto:cziegeler@apache.org">Carsten Ziegeler</a>
- * @version $Id: ResourceSourceFactory.java,v 1.3 2002/05/01 09:11:47 donaldp Exp $
+ * @version $Id: ResourceSourceFactory.java,v 1.4 2002/05/13 12:17:40 donaldp Exp $
*/
public class ResourceSourceFactory
extends AbstractLogEnabled
1.7 +24 -21 jakarta-avalon-excalibur/sourceresolve/src/java/org/apache/excalibur/source/impl/SourceResolverImpl.java
Index: SourceResolverImpl.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/sourceresolve/src/java/org/apache/excalibur/source/impl/SourceResolverImpl.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- SourceResolverImpl.java 10 May 2002 07:54:09 -0000 1.6
+++ SourceResolverImpl.java 13 May 2002 12:17:40 -0000 1.7
@@ -13,7 +13,6 @@
import java.net.URL;
import java.util.Map;
import org.apache.avalon.excalibur.pool.Recyclable;
-
import org.apache.avalon.framework.activity.Disposable;
import org.apache.avalon.framework.component.ComponentException;
import org.apache.avalon.framework.component.ComponentManager;
@@ -25,10 +24,14 @@
import org.apache.avalon.framework.logger.AbstractLogEnabled;
import org.apache.avalon.framework.logger.LogEnabled;
import org.apache.avalon.framework.parameters.ParameterException;
-import org.apache.avalon.framework.parameters.Parameters;
import org.apache.avalon.framework.parameters.Parameterizable;
+import org.apache.avalon.framework.parameters.Parameters;
import org.apache.avalon.framework.thread.ThreadSafe;
-import org.apache.excalibur.source.*;
+import org.apache.excalibur.source.Source;
+import org.apache.excalibur.source.SourceException;
+import org.apache.excalibur.source.SourceFactory;
+import org.apache.excalibur.source.SourceNotFoundException;
+import org.apache.excalibur.source.SourceResolver;
/**
* Base interface for resolving a source by system identifiers.
@@ -51,7 +54,7 @@
*
* @author <a href="mailto:cziegeler@apache.org">Carsten Ziegeler</a>
* @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
- * @version $Id: SourceResolverImpl.java,v 1.6 2002/05/10 07:54:09 cziegeler Exp $
+ * @version $Id: SourceResolverImpl.java,v 1.7 2002/05/13 12:17:40 donaldp Exp $
*/
public class SourceResolverImpl
extends AbstractLogEnabled
@@ -142,11 +145,11 @@
/**
* Configure
*/
- public void parameterize(Parameters pars)
- throws ParameterException
+ public void parameterize( Parameters pars )
+ throws ParameterException
{
- final String urlSourceClassName = pars.getParameter("url-source",
- "org.apache.excalibur.source.impl.URLSource");
+ final String urlSourceClassName = pars.getParameter( "url-source",
+ "org.apache.excalibur.source.impl.URLSource" );
ClassLoader loader = Thread.currentThread().getContextClassLoader();
if( loader == null )
{
@@ -156,10 +159,10 @@
{
this.m_urlSourceClass = loader.loadClass( urlSourceClassName );
}
- catch (ClassNotFoundException cnfe)
+ catch( ClassNotFoundException cnfe )
{
- this.getLogger().error("Class not found: " + urlSourceClassName, cnfe);
- throw new ParameterException("Class not found: " + urlSourceClassName, cnfe);
+ this.getLogger().error( "Class not found: " + urlSourceClassName, cnfe );
+ throw new ParameterException( "Class not found: " + urlSourceClassName, cnfe );
}
}
@@ -267,9 +270,9 @@
factory = (SourceFactory)m_factorySelector.select( protocol );
source = factory.getSource( systemID, parameters );
}
- catch (ComponentException ce)
+ catch( ComponentException ce )
{
- throw new SourceException("ComponentException.", ce);
+ throw new SourceException( "ComponentException.", ce );
}
finally
{
@@ -290,7 +293,7 @@
try
{
final URLSource urlSource =
- (URLSource)this.m_urlSourceClass.newInstance();
+ (URLSource)this.m_urlSourceClass.newInstance();
urlSource.init( new URL( systemID ), parameters );
source = urlSource;
}
@@ -298,10 +301,10 @@
{
throw mue;
}
- catch (Exception ie)
+ catch( Exception ie )
{
- throw new SourceException("Unable to create new instance of " +
- this.m_urlSourceClass, ie);
+ throw new SourceException( "Unable to create new instance of " +
+ this.m_urlSourceClass, ie );
}
}
catch( MalformedURLException mue )
@@ -314,14 +317,14 @@
try
{
final URLSource urlSource =
- (URLSource)this.m_urlSourceClass.newInstance();
+ (URLSource)this.m_urlSourceClass.newInstance();
urlSource.init( ( new File( systemID ) ).toURL(), parameters );
source = urlSource;
}
- catch (Exception ie)
+ catch( Exception ie )
{
- throw new SourceException("Unable to create new instance of " +
- this.m_urlSourceClass, ie);
+ throw new SourceException( "Unable to create new instance of " +
+ this.m_urlSourceClass, ie );
}
}
}
1.9 +11 -5 jakarta-avalon-excalibur/sourceresolve/src/java/org/apache/excalibur/source/impl/URLSource.java
Index: URLSource.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/sourceresolve/src/java/org/apache/excalibur/source/impl/URLSource.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- URLSource.java 2 May 2002 10:25:24 -0000 1.8
+++ URLSource.java 13 May 2002 12:17:40 -0000 1.9
@@ -17,14 +17,18 @@
import java.net.URLConnection;
import java.util.Iterator;
import java.util.Map;
-import org.apache.excalibur.source.*;
+import org.apache.excalibur.source.Source;
+import org.apache.excalibur.source.SourceException;
+import org.apache.excalibur.source.SourceParameters;
+import org.apache.excalibur.source.SourceUtil;
+import org.apache.excalibur.source.SourceValidity;
import org.apache.excalibur.source.impl.validity.TimeStampValidity;
/**
* Description of a source which is described by an URL.
*
* @author <a href="mailto:cziegeler@apache.org">Carsten Ziegeler</a>
- * @version CVS $Revision: 1.8 $ $Date: 2002/05/02 10:25:24 $
+ * @version CVS $Revision: 1.9 $ $Date: 2002/05/13 12:17:40 $
*/
public class URLSource
@@ -71,14 +75,16 @@
/**
* Constructor
*/
- public URLSource() {}
+ public URLSource()
+ {
+ }
/**
* Initialize a new object from a <code>URL</code>.
* @param parameters This is optional
*/
- public void init(URL url,
- Map parameters )
+ public void init( URL url,
+ Map parameters )
throws IOException
{
this.systemId = url.toExternalForm();
1.11 +2 -2 jakarta-avalon-excalibur/monitor/src/java/org/apache/avalon/excalibur/monitor/ActiveMonitor.java
Index: ActiveMonitor.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/monitor/src/java/org/apache/avalon/excalibur/monitor/ActiveMonitor.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- ActiveMonitor.java 21 Apr 2002 21:47:49 -0000 1.10
+++ ActiveMonitor.java 13 May 2002 12:17:40 -0000 1.11
@@ -35,9 +35,9 @@
* </pre>
*
* @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
- * @version $Id: ActiveMonitor.java,v 1.10 2002/04/21 21:47:49 donaldp Exp $
+ * @version $Id: ActiveMonitor.java,v 1.11 2002/05/13 12:17:40 donaldp Exp $
*/
-public final class ActiveMonitor
+public final class ActiveMonitor
extends AbstractLogEnabled
implements Monitor, Startable, ThreadSafe, Configurable, Runnable
{
1.5 +10 -10 jakarta-avalon-excalibur/monitor/src/java/org/apache/avalon/excalibur/monitor/FileResource.java
Index: FileResource.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/monitor/src/java/org/apache/avalon/excalibur/monitor/FileResource.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- FileResource.java 21 Apr 2002 21:47:49 -0000 1.4
+++ FileResource.java 13 May 2002 12:17:40 -0000 1.5
@@ -26,9 +26,9 @@
* OutputStream has been closed.
*
* @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
- * @version $Id: FileResource.java,v 1.4 2002/04/21 21:47:49 donaldp Exp $
+ * @version $Id: FileResource.java,v 1.5 2002/05/13 12:17:40 donaldp Exp $
*/
-public class FileResource
+public class FileResource
extends StreamResource
{
private final File m_file;
@@ -61,8 +61,8 @@
/**
* Sets the resource value with an OutputStream
*/
- public InputStream getResourceAsStream()
- throws IOException
+ public InputStream getResourceAsStream()
+ throws IOException
{
return new FileInputStream( m_file );
}
@@ -70,8 +70,8 @@
/**
* Sets the resource value with a Writer
*/
- public Reader getResourceAsReader()
- throws IOException
+ public Reader getResourceAsReader()
+ throws IOException
{
return new FileReader( m_file );
}
@@ -79,8 +79,8 @@
/**
* Sets the resource value with an OutputStream
*/
- public OutputStream setResourceAsStream()
- throws IOException
+ public OutputStream setResourceAsStream()
+ throws IOException
{
return new ResourceOutputStream( new FileOutputStream( m_file ), this );
}
@@ -88,8 +88,8 @@
/**
* Sets the resource value with a Writer
*/
- public Writer setResourceAsWriter()
- throws IOException
+ public Writer setResourceAsWriter()
+ throws IOException
{
return new ResourceWriter( new FileWriter( m_file ), this );
}
1.7 +2 -2 jakarta-avalon-excalibur/monitor/src/java/org/apache/avalon/excalibur/monitor/Monitor.java
Index: Monitor.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/monitor/src/java/org/apache/avalon/excalibur/monitor/Monitor.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- Monitor.java 21 Apr 2002 21:47:49 -0000 1.6
+++ Monitor.java 13 May 2002 12:17:40 -0000 1.7
@@ -15,9 +15,9 @@
* the ComponentManager.
*
* @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
- * @version $Id: Monitor.java,v 1.6 2002/04/21 21:47:49 donaldp Exp $
+ * @version $Id: Monitor.java,v 1.7 2002/05/13 12:17:40 donaldp Exp $
*/
-public interface Monitor
+public interface Monitor
extends Component
{
String ROLE = Monitor.class.getName();
1.3 +4 -6 jakarta-avalon-excalibur/monitor/src/java/org/apache/avalon/excalibur/monitor/MonitorableURLSource.java
Index: MonitorableURLSource.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/monitor/src/java/org/apache/avalon/excalibur/monitor/MonitorableURLSource.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- MonitorableURLSource.java 24 Apr 2002 08:25:42 -0000 1.2
+++ MonitorableURLSource.java 13 May 2002 12:17:40 -0000 1.3
@@ -7,16 +7,13 @@
*/
package org.apache.avalon.excalibur.monitor;
-import java.io.IOException;
-import java.net.URL;
-import java.util.Map;
import org.apache.excalibur.source.impl.URLSource;
/**
* This adds the <code>Monitorable</code> interface to the URLSource.
*
* @author <a href="mailto:cziegeler@apache.org">Carsten Ziegeler</a>
- * @version CVS $Revision: 1.2 $ $Date: 2002/04/24 08:25:42 $
+ * @version CVS $Revision: 1.3 $ $Date: 2002/05/13 12:17:40 $
*/
public class MonitorableURLSource
@@ -27,7 +24,9 @@
/**
* Constructor
*/
- public MonitorableURLSource() {}
+ public MonitorableURLSource()
+ {
+ }
/**
* Get the corresponding Resource object for monitoring.
@@ -45,6 +44,5 @@
return new SourceResource( this );
}
}
-
}
1.8 +2 -2 jakarta-avalon-excalibur/monitor/src/java/org/apache/avalon/excalibur/monitor/PassiveMonitor.java
Index: PassiveMonitor.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/monitor/src/java/org/apache/avalon/excalibur/monitor/PassiveMonitor.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- PassiveMonitor.java 21 Apr 2002 21:47:49 -0000 1.7
+++ PassiveMonitor.java 13 May 2002 12:17:40 -0000 1.8
@@ -34,9 +34,9 @@
* </pre>
*
* @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
- * @version $Id: PassiveMonitor.java,v 1.7 2002/04/21 21:47:49 donaldp Exp $
+ * @version $Id: PassiveMonitor.java,v 1.8 2002/05/13 12:17:40 donaldp Exp $
*/
-public final class PassiveMonitor
+public final class PassiveMonitor
extends AbstractLoggable
implements Monitor, ThreadSafe, Configurable
{
1.8 +2 -2 jakarta-avalon-excalibur/monitor/src/java/org/apache/avalon/excalibur/monitor/Resource.java
Index: Resource.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/monitor/src/java/org/apache/avalon/excalibur/monitor/Resource.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- Resource.java 1 May 2002 09:11:47 -0000 1.7
+++ Resource.java 13 May 2002 12:17:40 -0000 1.8
@@ -22,9 +22,9 @@
* last modified property will be enough.
*
* @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
- * @version $Id: Resource.java,v 1.7 2002/05/01 09:11:47 donaldp Exp $
+ * @version $Id: Resource.java,v 1.8 2002/05/13 12:17:40 donaldp Exp $
*/
-public abstract class Resource
+public abstract class Resource
implements Modifiable
{
protected static final String MODIFIED = "last-modified";
1.6 +3 -3 jakarta-avalon-excalibur/monitor/src/java/org/apache/avalon/excalibur/monitor/ResourceOutputStream.java
Index: ResourceOutputStream.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/monitor/src/java/org/apache/avalon/excalibur/monitor/ResourceOutputStream.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- ResourceOutputStream.java 21 Apr 2002 21:47:49 -0000 1.5
+++ ResourceOutputStream.java 13 May 2002 12:17:40 -0000 1.6
@@ -19,7 +19,7 @@
* OutputStream has been closed.
*
* @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
- * @version $Id: ResourceOutputStream.java,v 1.5 2002/04/21 21:47:49 donaldp Exp $
+ * @version $Id: ResourceOutputStream.java,v 1.6 2002/05/13 12:17:40 donaldp Exp $
*/
final class ResourceOutputStream extends FilterOutputStream
{
@@ -28,8 +28,8 @@
/**
* Set up the ResourceOutputStream.
*/
- public ResourceOutputStream( final OutputStream out,
- final StreamResource resource )
+ public ResourceOutputStream( final OutputStream out,
+ final StreamResource resource )
{
super( out );
m_resource = resource;
1.6 +3 -3 jakarta-avalon-excalibur/monitor/src/java/org/apache/avalon/excalibur/monitor/ResourceWriter.java
Index: ResourceWriter.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/monitor/src/java/org/apache/avalon/excalibur/monitor/ResourceWriter.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- ResourceWriter.java 21 Apr 2002 21:47:49 -0000 1.5
+++ ResourceWriter.java 13 May 2002 12:17:40 -0000 1.6
@@ -19,7 +19,7 @@
* OutputStream has been closed.
*
* @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
- * @version $Id: ResourceWriter.java,v 1.5 2002/04/21 21:47:49 donaldp Exp $
+ * @version $Id: ResourceWriter.java,v 1.6 2002/05/13 12:17:40 donaldp Exp $
*/
final class ResourceWriter extends FilterWriter
{
@@ -28,8 +28,8 @@
/**
* Set up the ResourceOutputStream.
*/
- public ResourceWriter( final Writer out,
- final StreamResource resource )
+ public ResourceWriter( final Writer out,
+ final StreamResource resource )
{
super( out );
m_resource = resource;
1.4 +9 -8 jakarta-avalon-excalibur/monitor/src/java/org/apache/avalon/excalibur/monitor/SourceResource.java
Index: SourceResource.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/monitor/src/java/org/apache/avalon/excalibur/monitor/SourceResource.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- SourceResource.java 24 Apr 2002 12:35:37 -0000 1.3
+++ SourceResource.java 13 May 2002 12:17:40 -0000 1.4
@@ -20,7 +20,7 @@
/**
*
* @author <a href="mailto:cziegeler@apache.org">Carsten Ziegeler</a>
- * @version $Id: SourceResource.java,v 1.3 2002/04/24 12:35:37 cziegeler Exp $
+ * @version $Id: SourceResource.java,v 1.4 2002/05/13 12:17:40 donaldp Exp $
*/
public final class SourceResource
extends StreamResource
@@ -72,14 +72,15 @@
* Sets the resource value with an OutputStream
*/
public InputStream getResourceAsStream()
- throws IOException
+ throws IOException
{
- try {
+ try
+ {
return m_source.getInputStream();
}
- catch (SourceException se)
+ catch( SourceException se )
{
- throw new IOException("SourceException: " + se.getMessage());
+ throw new IOException( "SourceException: " + se.getMessage() );
}
}
@@ -87,7 +88,7 @@
* Sets the resource value with a Writer
*/
public Reader getResourceAsReader()
- throws IOException
+ throws IOException
{
return new InputStreamReader( getResourceAsStream() );
}
@@ -96,7 +97,7 @@
* Sets the resource value with an OutputStream
*/
public OutputStream setResourceAsStream()
- throws IOException
+ throws IOException
{
throw new IOException( "setResourceAsStream() not supported for URLResource" );
}
@@ -105,7 +106,7 @@
* Sets the resource value with a Writer
*/
public Writer setResourceAsWriter()
- throws IOException
+ throws IOException
{
throw new IOException( "setResourceAsWriter() not supported for URLResource" );
}
1.5 +10 -10 jakarta-avalon-excalibur/monitor/src/java/org/apache/avalon/excalibur/monitor/StreamResource.java
Index: StreamResource.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/monitor/src/java/org/apache/avalon/excalibur/monitor/StreamResource.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- StreamResource.java 21 Apr 2002 21:47:49 -0000 1.4
+++ StreamResource.java 13 May 2002 12:17:40 -0000 1.5
@@ -21,9 +21,9 @@
* OutputStream has been closed.
*
* @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
- * @version $Id: StreamResource.java,v 1.4 2002/04/21 21:47:49 donaldp Exp $
+ * @version $Id: StreamResource.java,v 1.5 2002/05/13 12:17:40 donaldp Exp $
*/
-public abstract class StreamResource
+public abstract class StreamResource
extends Resource
{
/**
@@ -31,8 +31,8 @@
* the specific resource monitor. For instance, a FileResource will be able
* to convert a string representation of a path to the proper File object.
*/
- public StreamResource( final String location )
- throws Exception
+ public StreamResource( final String location )
+ throws Exception
{
super( location );
}
@@ -40,20 +40,20 @@
/**
* Get the Resource contents as an InputStream.
*/
- public abstract InputStream getResourceAsStream()
- throws IOException;
+ public abstract InputStream getResourceAsStream()
+ throws IOException;
/**
* Get the Resource contents as a Reader.
*/
- public abstract Reader getResourceAsReader()
- throws IOException;
+ public abstract Reader getResourceAsReader()
+ throws IOException;
/**
* Set the Resource contents as an OutputStream.
*/
- public abstract OutputStream setResourceAsStream()
- throws IOException;
+ public abstract OutputStream setResourceAsStream()
+ throws IOException;
/**
* Set the Resource contents as a Writer.
1.5 +1 -1 jakarta-avalon-excalibur/event/src/java/org/apache/excalibur/event/SinkException.java
Index: SinkException.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/event/src/java/org/apache/excalibur/event/SinkException.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- SinkException.java 2 May 2002 16:26:48 -0000 1.4
+++ SinkException.java 13 May 2002 12:17:40 -0000 1.5
@@ -18,7 +18,7 @@
/**
* The Throwable that caused this exception to be thrown.
*/
- private final Throwable m_throwable;
+ private final Throwable m_throwable;
/**
* Construct a new <code>SinkException</code> instance.
1.6 +1 -1 jakarta-avalon-excalibur/event/src/java/org/apache/excalibur/event/command/Command.java
Index: Command.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/event/src/java/org/apache/excalibur/event/command/Command.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- Command.java 2 May 2002 16:26:49 -0000 1.5
+++ Command.java 13 May 2002 12:17:40 -0000 1.6
@@ -7,8 +7,8 @@
*/
package org.apache.excalibur.event.command;
-import org.apache.excalibur.event.Signal;
import org.apache.avalon.framework.activity.Executable;
+import org.apache.excalibur.event.Signal;
/**
* A Command is a specific type of Signal that denotes an asynchronous execution
1.14 +3 -3 jakarta-avalon-excalibur/event/src/java/org/apache/excalibur/event/command/TPCThreadManager.java
Index: TPCThreadManager.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/event/src/java/org/apache/excalibur/event/command/TPCThreadManager.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- TPCThreadManager.java 2 May 2002 16:58:00 -0000 1.13
+++ TPCThreadManager.java 13 May 2002 12:17:40 -0000 1.14
@@ -10,14 +10,14 @@
import java.util.HashMap;
import java.util.Iterator;
import org.apache.avalon.excalibur.concurrent.Mutex;
-import org.apache.excalibur.event.EventHandler;
-import org.apache.excalibur.event.Source;
-import org.apache.excalibur.util.SystemUtil;
import org.apache.avalon.excalibur.thread.ThreadControl;
import org.apache.avalon.excalibur.thread.ThreadPool;
import org.apache.avalon.excalibur.thread.impl.ResourceLimitingThreadPool;
import org.apache.avalon.framework.activity.Disposable;
import org.apache.avalon.framework.logger.NullLogger;
+import org.apache.excalibur.event.EventHandler;
+import org.apache.excalibur.event.Source;
+import org.apache.excalibur.util.SystemUtil;
/**
* This is a ThreadManager that uses a certain number of threads per processor.
1.10 +2 -2 jakarta-avalon-excalibur/event/src/java/org/apache/excalibur/event/command/TPSPThreadManager.java
Index: TPSPThreadManager.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/event/src/java/org/apache/excalibur/event/command/TPSPThreadManager.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- TPSPThreadManager.java 2 May 2002 16:26:49 -0000 1.9
+++ TPSPThreadManager.java 13 May 2002 12:17:40 -0000 1.10
@@ -10,11 +10,11 @@
import java.util.HashMap;
import java.util.Iterator;
import org.apache.avalon.excalibur.concurrent.Mutex;
-import org.apache.excalibur.event.EventHandler;
-import org.apache.excalibur.event.Source;
import org.apache.avalon.excalibur.thread.ThreadControl;
import org.apache.avalon.excalibur.thread.ThreadPool;
import org.apache.avalon.excalibur.thread.impl.ResourceLimitingThreadPool;
+import org.apache.excalibur.event.EventHandler;
+import org.apache.excalibur.event.Source;
/**
* This is a ThreadManager which provides a threadpool per Sink per EventPipeline.
1.3 +2 -2 jakarta-avalon-excalibur/event/src/test/QueueTest.java
Index: QueueTest.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/event/src/test/QueueTest.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- QueueTest.java 2 May 2002 16:26:49 -0000 1.2
+++ QueueTest.java 13 May 2002 12:17:41 -0000 1.3
@@ -1,17 +1,17 @@
+import org.apache.avalon.framework.CascadingRuntimeException;
import org.apache.excalibur.event.DefaultQueue;
import org.apache.excalibur.event.Queue;
import org.apache.excalibur.event.QueueElement;
import org.apache.excalibur.event.Sink;
import org.apache.excalibur.event.SinkException;
import org.apache.excalibur.event.Source;
-import org.apache.avalon.framework.CascadingRuntimeException;
/**
* Simple test to expose the thread queue bug
*
* @author <a href="mailto:proyal@managingpartners.com">Peter Royal</a>
- * @version VSS $Revision: 1.2 $ $Date: 2002/05/02 16:26:49 $
+ * @version VSS $Revision: 1.3 $ $Date: 2002/05/13 12:17:41 $
*/
public class QueueTest
{
1.3 +31 -31 jakarta-avalon-excalibur/context/src/java/org/apache/excalibur/context/ContextUtility.java
Index: ContextUtility.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/context/src/java/org/apache/excalibur/context/ContextUtility.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ContextUtility.java 10 May 2002 04:33:41 -0000 1.2
+++ ContextUtility.java 13 May 2002 12:17:41 -0000 1.3
@@ -17,7 +17,7 @@
import org.apache.avalon.framework.logger.Logger;
/**
- * @version $Id: ContextUtility.java,v 1.2 2002/05/10 04:33:41 mcconnell Exp $
+ * @version $Id: ContextUtility.java,v 1.3 2002/05/13 12:17:41 donaldp Exp $
* @author Stephen McConnell <mc...@osm.net>
*/
public class ContextUtility
@@ -46,9 +46,9 @@
* @return Context a context instance
* @exception ConfigurationException if a context related error occurs
*/
- public static Context createContextFromConfiguration(
- Context parent, Configuration config )
- throws ConfigurationException
+ public static Context createContextFromConfiguration(
+ Context parent, Configuration config )
+ throws ConfigurationException
{
return createContextFromConfiguration( parent, config, null );
}
@@ -61,14 +61,14 @@
* @return Context a context instance
* @exception ConfigurationException if a context related error occurs
*/
- public static Context createContextFromConfiguration(
- Context parent, Configuration config, Logger log )
- throws ConfigurationException
+ public static Context createContextFromConfiguration(
+ Context parent, Configuration config, Logger log )
+ throws ConfigurationException
{
ClassLoader loader = Thread.currentThread().getContextClassLoader();
String contextClassName = config.getAttribute( "class",
- "org.apache.avalon.framework.context.DefaultContext" );
+ "org.apache.avalon.framework.context.DefaultContext" );
Class contextClass = null;
@@ -79,8 +79,8 @@
}
catch( ClassNotFoundException cnfe )
{
- throw new ConfigurationException(
- "Could not find context class " + contextClassName, cnfe );
+ throw new ConfigurationException(
+ "Could not find context class " + contextClassName, cnfe );
}
Map map = new Hashtable();
@@ -93,24 +93,24 @@
}
catch( Throwable e )
{
- throw new ConfigurationException(
- "Unexpected exception while creating custom context form "
- + contextClassName, e );
+ throw new ConfigurationException(
+ "Unexpected exception while creating custom context form "
+ + contextClassName, e );
}
final Configuration[] entrys = config.getChildren( "entry" );
for( int i = 0; i < entrys.length; i++ )
{
- final String className = entrys[ i ].getAttribute(
- "type", "java.lang.String" );
- final String paramName = entrys[ i ].getAttribute(
- "name", null );
+ final String className = entrys[ i ].getAttribute(
+ "type", "java.lang.String" );
+ final String paramName = entrys[ i ].getAttribute(
+ "name", null );
if( paramName == null )
{
- throw new ConfigurationException(
- "missing name for context-entry" );
+ throw new ConfigurationException(
+ "missing name for context-entry" );
}
try
@@ -128,15 +128,15 @@
Constructor cons = params[ 0 ].getConstructor( consObjects );
values = new Object[ 1 ];
Object[] consValues = {
- getContextValue( map, entry.getAttribute( "value" ) )
+ getContextValue( map, entry.getAttribute( "value" ) )
};
values[ 0 ] = cons.newInstance( consValues );
if( log != null )
{
log.debug( "add context-attr '" + paramName
- + "' class '" + className
- + "' with value '" + consValues[ 0 ] + "'" );
+ + "' class '" + className
+ + "' with value '" + consValues[ 0 ] + "'" );
}
}
else
@@ -150,14 +150,14 @@
if( log != null )
{
log.debug( "add context-attr '" + paramName
- + "' class '" + className + "' with "
- + entryChilds.length + " values" );
+ + "' class '" + className + "' with "
+ + entryChilds.length + " values" );
}
for( int p = 0; p < entryChilds.length; p++ )
{
- String paramClassName = entryChilds[ p ].getAttribute(
- "type", "java.lang.String" );
+ String paramClassName = entryChilds[ p ].getAttribute(
+ "type", "java.lang.String" );
String paramValue = entryChilds[ p ].getAttribute( "value", null );
if( paramValue == null )
@@ -174,7 +174,7 @@
if( log != null )
{
log.debug( "value" + ( p + 1 ) + ": class '"
- + paramClassName + "' value '" + paramValue + "'" );
+ + paramClassName + "' value '" + paramValue + "'" );
}
}
@@ -256,7 +256,7 @@
catch( final ClassNotFoundException e )
{
throw new ConfigurationException(
- "incorrect type '" + className
+ "incorrect type '" + className
+ "' for context-attribute '" + paramName + "'",
e );
}
@@ -284,7 +284,7 @@
catch( Exception e )
{
throw new ConfigurationException(
- "Error add context-attribute '" + paramName
+ "Error add context-attribute '" + paramName
+ "' from Configuration", e );
}
}
@@ -299,8 +299,8 @@
* @return String the context attribute value
* @exception ConfigurationException if context-param does not exists
*/
- private static String getContextValue( Map map, String rawValue )
- throws ConfigurationException
+ private static String getContextValue( Map map, String rawValue )
+ throws ConfigurationException
{
StringBuffer result = new StringBuffer( "" );
int i = 0;
1.2 +37 -45 jakarta-avalon-excalibur/configuration/src/java/org/apache/excalibur/configuration/CascadingConfiguration.java
Index: CascadingConfiguration.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/configuration/src/java/org/apache/excalibur/configuration/CascadingConfiguration.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- CascadingConfiguration.java 10 May 2002 03:37:20 -0000 1.1
+++ CascadingConfiguration.java 13 May 2002 12:17:41 -0000 1.2
@@ -15,7 +15,7 @@
import org.apache.avalon.framework.configuration.DefaultConfiguration;
/**
- * The CascadingConfiguration is a classic Configuration backed by parent
+ * The CascadingConfiguration is a classic Configuration backed by parent
* Configuration. Operations such as getChild return a CascadingConfiguration
* encapsulating both a primary and parent configuration. Requests for attribute
* values are resolved against the base configuration initially. If the result
@@ -30,14 +30,14 @@
// state
//=============================================================================
- /**
- * The primary configuration.
- */
+ /**
+ * The primary configuration.
+ */
private final Configuration m_base;
- /**
- * The fallback configuration.
- */
+ /**
+ * The fallback configuration.
+ */
private final Configuration m_parent;
//=============================================================================
@@ -46,19 +46,19 @@
/**
* Create a CascadingConfiguration with specified parent. The base
- * configuration shall override a parent configuration on request for
+ * configuration shall override a parent configuration on request for
* attribute values and configuration body values. Unresolved request
* are redirected up the parent chain until a classic configuration is
- * reached. Request for child configurations will return a
- * new CascadingConfiguration referencing the child of the base and
+ * reached. Request for child configurations will return a
+ * new CascadingConfiguration referencing the child of the base and
* the child of the primary (i.e. a child configuration chain).
*
* @param base the base Configuration
- * @param parent the parent Configuration
+ * @param parent the parent Configuration
*/
- public CascadingConfiguration( final Configuration base , final Configuration parent )
+ public CascadingConfiguration( final Configuration base, final Configuration parent )
{
- if( base == null )
+ if( base == null )
{
m_base = new DefaultConfiguration( "-", null );
}
@@ -66,7 +66,7 @@
{
m_base = base;
}
- if( parent == null )
+ if( parent == null )
{
m_parent = new DefaultConfiguration( "-", null );
}
@@ -132,19 +132,19 @@
* @param child The name of the child node.
* @param createNew If <code>true</code>, a new <code>Configuration</code>
* will be created and returned if the specified child does not exist in either
- * the base or parent configuratioin. If <code>false</code>, <code>null</code>
- * will be returned when the specified child doesn't exist in either the base or
+ * the base or parent configuratioin. If <code>false</code>, <code>null</code>
+ * will be returned when the specified child doesn't exist in either the base or
* the parent.
* @return Configuration
*/
public Configuration getChild( String child, boolean createNew )
{
- if( createNew )
+ if( createNew )
{
return getChild( child );
}
Configuration c = m_base.getChild( child, false );
- if( child != null )
+ if( child != null )
{
return c;
}
@@ -153,27 +153,27 @@
/**
* Return an <code>Array</code> of <code>Configuration</code>
- * elements containing all node children of both base and parent configurations.
+ * elements containing all node children of both base and parent configurations.
* The array order will reflect the order in the source config file, commencing
* with the base configuration.
*
- * @return All child nodes
+ * @return All child nodes
*/
public Configuration[] getChildren()
{
- Configuration[] b = m_base.getChildren( );
- Configuration[] p = m_parent.getChildren( );
+ Configuration[] b = m_base.getChildren();
+ Configuration[] p = m_parent.getChildren();
Configuration[] result = new Configuration[ b.length + p.length ];
- System.arraycopy(b, 0, result, 0, b.length );
- System.arraycopy(p, 0, result, b.length, p.length );
+ System.arraycopy( b, 0, result, 0, b.length );
+ System.arraycopy( p, 0, result, b.length, p.length );
return result;
}
/**
* Return an <code>Array</code> of <code>Configuration</code>
- * elements containing all node children with the specified name from
+ * elements containing all node children with the specified name from
* both base and parent configurations. The array
- * order will reflect the order in the source config file commencing
+ * order will reflect the order in the source config file commencing
* with the base configuration.
*
* @param name The name of the children to get.
@@ -184,8 +184,8 @@
Configuration[] b = m_base.getChildren( name );
Configuration[] p = m_parent.getChildren( name );
Configuration[] result = new Configuration[ b.length + p.length ];
- System.arraycopy(b, 0, result, 0, b.length );
- System.arraycopy(p, 0, result, b.length, p.length );
+ System.arraycopy( b, 0, result, 0, b.length );
+ System.arraycopy( p, 0, result, b.length, p.length );
return result;
}
@@ -198,30 +198,30 @@
* <tt>conf.getAttributeNames()[0]</tt>, then it is liable to break if a
* different XML parser is used.
* </p>
- * @return an array of all attribute names
+ * @return an array of all attribute names
*/
public String[] getAttributeNames()
{
java.util.Vector vector = new java.util.Vector();
String[] names = m_base.getAttributeNames();
String[] names2 = m_parent.getAttributeNames();
- for( int i=0; i<names.length; i++ )
+ for( int i = 0; i < names.length; i++ )
{
- vector.add( names[i] );
+ vector.add( names[ i ] );
}
- for( int i=0; i<names2.length; i++ )
+ for( int i = 0; i < names2.length; i++ )
{
- if( vector.indexOf( names2[i] ) < 0 )
+ if( vector.indexOf( names2[ i ] ) < 0 )
{
- vector.add( names2[i] );
+ vector.add( names2[ i ] );
}
}
- return (String[]) vector.toArray( new String[0] );
+ return (String[])vector.toArray( new String[ 0 ] );
}
/**
* Return the value of specified attribute. If the base configuration
- * does not contain the attribute, the equivialent operation is applied to
+ * does not contain the attribute, the equivialent operation is applied to
* the parent configuration.
*
* @param paramName The name of the parameter you ask the value of.
@@ -281,7 +281,6 @@
}
}
-
/**
* Return the <code>float</code> value of the specified parameter contained
* in this node.
@@ -302,7 +301,6 @@
}
}
-
/**
* Return the <code>boolean</code> value of the specified parameter contained
* in this node.<br>
@@ -328,7 +326,7 @@
* Return the <code>String</code> value of the node.
*
* @return the value of the node.
- * @exception ConfigurationException May be raised by underlying
+ * @exception ConfigurationException May be raised by underlying
* base or parent configuration.
*/
public String getValue() throws ConfigurationException
@@ -343,7 +341,6 @@
}
}
-
/**
* Return the <code>int</code> value of the node.
* @return int the value as an integer
@@ -436,7 +433,6 @@
}
}
-
/**
* Returns the value of the configuration element as an <code>int</code>.
* If the configuration value is not set, the default value will be
@@ -458,7 +454,6 @@
}
}
-
/**
* Returns the value of the configuration element as a <code>long</code>.
* If the configuration value is not set, the default value will be
@@ -480,7 +475,6 @@
}
}
-
/**
* Returns the value of the configuration element as a <code>float</code>.
* If the configuration value is not set, the default value will be
@@ -502,7 +496,6 @@
}
}
-
/**
* Returns the value of the configuration element as a <code>boolean</code>.
* If the configuration value is not set, the default value will be
@@ -523,7 +516,6 @@
return m_parent.getValueAsBoolean( defaultValue );
}
}
-
/**
* Returns the value of the attribute specified by its name as a
1.2 +20 -20 jakarta-avalon-excalibur/configuration/src/java/org/apache/excalibur/configuration/ConfigurationUtil.java
Index: ConfigurationUtil.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/configuration/src/java/org/apache/excalibur/configuration/ConfigurationUtil.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ConfigurationUtil.java 10 May 2002 03:37:20 -0000 1.1
+++ ConfigurationUtil.java 13 May 2002 12:17:41 -0000 1.2
@@ -13,24 +13,24 @@
import org.apache.avalon.framework.configuration.Configuration;
/**
- * General utility supporting static operations for generating string
+ * General utility supporting static operations for generating string
* representations of a configuration suitable for debugging.
* @author Stephen McConnell <mc...@osm.net>
*/
-public class ConfigurationUtil
+public class ConfigurationUtil
{
- /**
- * Returns a simple string representation of the the supplied configuration.
- * @param config a configuration
- * @return a simplified text representation of a configuration suitable
- * for debugging
- */
+ /**
+ * Returns a simple string representation of the the supplied configuration.
+ * @param config a configuration
+ * @return a simplified text representation of a configuration suitable
+ * for debugging
+ */
public static String list( Configuration config )
{
final StringBuffer buffer = new StringBuffer();
list( buffer, " ", config );
- buffer.append("\n");
- return buffer.toString();
+ buffer.append( "\n" );
+ return buffer.toString();
}
private static void list( StringBuffer buffer, String lead, Configuration config )
@@ -40,32 +40,32 @@
String[] names = config.getAttributeNames();
if( names.length > 0 )
{
- for( int i=0; i<names.length; i++ )
+ for( int i = 0; i < names.length; i++ )
{
- buffer.append( " "
- + names[i] + "=\""
- + config.getAttribute( names[i], "???" ) + "\"" );
+ buffer.append( " "
+ + names[ i ] + "=\""
+ + config.getAttribute( names[ i ], "???" ) + "\"" );
}
}
Configuration[] children = config.getChildren();
if( children.length > 0 )
{
- buffer.append(">");
- for( int j=0; j<children.length; j++ )
+ buffer.append( ">" );
+ for( int j = 0; j < children.length; j++ )
{
- list( buffer, lead + " ", children[j] );
+ list( buffer, lead + " ", children[ j ] );
}
- buffer.append( "\n" + lead + "</" + config.getName() + ">");
+ buffer.append( "\n" + lead + "</" + config.getName() + ">" );
}
else
{
if( config.getValue( null ) != null )
{
- buffer.append( ">...</" + config.getName() + ">");
+ buffer.append( ">...</" + config.getName() + ">" );
}
else
{
- buffer.append( "/>");
+ buffer.append( "/>" );
}
}
}
1.2 +2 -2 jakarta-avalon-excalibur/component/src/java/org/apache/avalon/excalibur/component/ComponentHandler.java
Index: ComponentHandler.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/component/src/java/org/apache/avalon/excalibur/component/ComponentHandler.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ComponentHandler.java 4 Apr 2002 05:09:02 -0000 1.1
+++ ComponentHandler.java 13 May 2002 12:17:41 -0000 1.2
@@ -26,7 +26,7 @@
* @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
* @author <a href="mailto:ryan@silveregg.co.jp">Ryan Shaw</a>
* @author <a href="mailto:leif@tanukisoftware.com">Leif Mortenson</a>
- * @version CVS $Revision: 1.1 $ $Date: 2002/04/04 05:09:02 $
+ * @version CVS $Revision: 1.2 $ $Date: 2002/05/13 12:17:41 $
* @since 4.0
*/
public abstract class ComponentHandler extends AbstractLoggable
@@ -206,7 +206,7 @@
// This method is not abstract to make the class backwards compatible.
throw new IllegalStateException( "This method must be overridden." );
}
-
+
/**
* Returns the current number of references.
*
1.5 +3 -3 jakarta-avalon-excalibur/component/src/java/org/apache/avalon/excalibur/component/ExcaliburComponentManager.java
Index: ExcaliburComponentManager.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/component/src/java/org/apache/avalon/excalibur/component/ExcaliburComponentManager.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- ExcaliburComponentManager.java 24 Apr 2002 10:04:05 -0000 1.4
+++ ExcaliburComponentManager.java 13 May 2002 12:17:41 -0000 1.5
@@ -32,7 +32,7 @@
* @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
* @author <a href="mailto:paul@luminas.co.uk">Paul Russell</a>
* @author <a href="mailto:ryan@silveregg.co.jp">Ryan Shaw</a>
- * @version CVS $Revision: 1.4 $ $Date: 2002/04/24 10:04:05 $
+ * @version CVS $Revision: 1.5 $ $Date: 2002/05/13 12:17:41 $
* @since 4.0
*/
public class ExcaliburComponentManager
@@ -277,7 +277,7 @@
if( getLogger().isWarnEnabled() )
{
final String message =
- "ComponentManager exception from parent CM during lookup.";
+ "ComponentManager exception from parent CM during lookup.";
getLogger().warn( message, e );
}
// ignore. If the exception is thrown, we try to
@@ -547,7 +547,7 @@
else
{
getLogger().warn( "Attempted to release a " + component.getClass().getName() +
- " but its handler could not be located." );
+ " but its handler could not be located." );
}
}
1.4 +2 -2 jakarta-avalon-excalibur/component/src/java/org/apache/avalon/excalibur/component/ExcaliburComponentSelector.java
Index: ExcaliburComponentSelector.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/component/src/java/org/apache/avalon/excalibur/component/ExcaliburComponentSelector.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- ExcaliburComponentSelector.java 25 Apr 2002 14:40:23 -0000 1.3
+++ ExcaliburComponentSelector.java 13 May 2002 12:17:41 -0000 1.4
@@ -33,7 +33,7 @@
*
* @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
* @author <a href="mailto:paul@luminas.co.uk">Paul Russell</a>
- * @version CVS $Revision: 1.3 $ $Date: 2002/04/25 14:40:23 $
+ * @version CVS $Revision: 1.4 $ $Date: 2002/05/13 12:17:41 $
* @since 4.0
*/
public class ExcaliburComponentSelector
@@ -407,7 +407,7 @@
if( null == handler )
{
getLogger().warn( "Attempted to release a " + component.getClass().getName() +
- " but its handler could not be located." );
+ " but its handler could not be located." );
return;
}
1.3 +2 -2 jakarta-avalon-excalibur/component/src/java/org/apache/avalon/excalibur/component/PoolableComponentHandler.java
Index: PoolableComponentHandler.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/component/src/java/org/apache/avalon/excalibur/component/PoolableComponentHandler.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- PoolableComponentHandler.java 10 Apr 2002 05:37:02 -0000 1.2
+++ PoolableComponentHandler.java 13 May 2002 12:17:41 -0000 1.3
@@ -82,7 +82,7 @@
* @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
* @author <a href="mailto:leif@tanukisoftware.com">Leif Mortenson</a>
* @author <a href="mailto:ryan@silveregg.co.jp">Ryan Shaw</a>
- * @version CVS $Revision: 1.2 $ $Date: 2002/04/10 05:37:02 $
+ * @version CVS $Revision: 1.3 $ $Date: 2002/05/13 12:17:41 $
* @since 4.0
*/
public class PoolableComponentHandler extends ComponentHandler
@@ -223,7 +223,7 @@
m_disposed = true;
}
-
+
/**
* Gives subclasses access to the pool.
*
1.13 +5 -5 jakarta-avalon-excalibur/cli/src/java/org/apache/avalon/excalibur/cli/CLOptionDescriptor.java
Index: CLOptionDescriptor.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/cli/src/java/org/apache/avalon/excalibur/cli/CLOptionDescriptor.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- CLOptionDescriptor.java 21 Mar 2002 11:00:40 -0000 1.12
+++ CLOptionDescriptor.java 13 May 2002 12:17:41 -0000 1.13
@@ -13,7 +13,7 @@
* and passes it to {@link CLArgsParser#CLArgsParser(String[], CLOptionDescriptor[])}.
*
* @author <a href="mailto:peter@apache.org">Peter Donald</a>
- * @version $Revision: 1.12 $ $Date: 2002/03/21 11:00:40 $
+ * @version $Revision: 1.13 $ $Date: 2002/05/13 12:17:41 $
* @since 4.0
* @see CLArgsParser
* @see CLUtil
@@ -77,19 +77,19 @@
m_incompatible = incompatable;
int modeCount = 0;
- if( (ARGUMENT_REQUIRED & flags) == ARGUMENT_REQUIRED )
+ if( ( ARGUMENT_REQUIRED & flags ) == ARGUMENT_REQUIRED )
{
modeCount++;
}
- if( (ARGUMENT_OPTIONAL & flags) == ARGUMENT_OPTIONAL )
+ if( ( ARGUMENT_OPTIONAL & flags ) == ARGUMENT_OPTIONAL )
{
modeCount++;
}
- if( (ARGUMENT_DISALLOWED & flags) == ARGUMENT_DISALLOWED )
+ if( ( ARGUMENT_DISALLOWED & flags ) == ARGUMENT_DISALLOWED )
{
modeCount++;
}
- if( (ARGUMENTS_REQUIRED_2 & flags) == ARGUMENTS_REQUIRED_2 )
+ if( ( ARGUMENTS_REQUIRED_2 & flags ) == ARGUMENTS_REQUIRED_2 )
{
modeCount++;
}
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>