You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@avalon.apache.org by bl...@apache.org on 2002/08/06 21:41:19 UTC
cvs commit: jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/util AbstractRoleManager.java ConfigurableRoleManager.java ContextBuilder.java ContextManager.java ContextManagerConstants.java ExcaliburRoleManager.java OverridableContext.java RoleManager.java
bloritsch 2002/08/06 12:41:19
Modified: fortress/src/java/org/apache/excalibur/fortress
AbstractContainer.java Container.java
ContainerConstants.java ContainerManager.java
ContainerManagerConstants.java
DefaultContainerManager.java
InitializationException.java
fortress/src/java/org/apache/excalibur/fortress/container
DefaultContainer.java
fortress/src/java/org/apache/excalibur/fortress/handler
AbstractComponentHandler.java ComponentFactory.java
ComponentHandler.java FactoryComponentHandler.java
PerThreadComponentHandler.java
PoolableComponentHandler.java
ThreadSafeComponentHandler.java
fortress/src/java/org/apache/excalibur/fortress/lifecycle
AbstractLifecycleExtension.java
AbstractLifecycleExtensionManager.java
LifecycleExtension.java
LifecycleExtensionManager.java
fortress/src/java/org/apache/excalibur/fortress/lookup
ComponentServiceManager.java
FortressServiceManager.java
FortressServiceSelector.java
ServiceComponentManager.java
ServiceComponentSelector.java
fortress/src/java/org/apache/excalibur/fortress/util
AbstractRoleManager.java
ConfigurableRoleManager.java ContextBuilder.java
ContextManager.java ContextManagerConstants.java
ExcaliburRoleManager.java OverridableContext.java
RoleManager.java
Log:
Update the comments to fit the printable width--and updated to the correct source file headers.
Revision Changes Path
1.53 +80 -35 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.52
retrieving revision 1.53
diff -u -r1.52 -r1.53
--- AbstractContainer.java 5 Aug 2002 04:40:40 -0000 1.52
+++ AbstractContainer.java 6 Aug 2002 19:41:17 -0000 1.53
@@ -1,10 +1,52 @@
/*
- * Copyright (C) The Apache Software Foundation. All rights reserved.
- *
- * This software is published under the terms of the Apache Software License
- * version 1.1, a copy of which has been included with this distribution in
- * the LICENSE.txt file.
- */
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) @year@ The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Jakarta", "Avalon", "Excalibur" and "Apache Software Foundation"
+ must not be used to endorse or promote products derived from this software
+ without prior written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation. For more information on the
+ Apache Software Foundation, please see <http://www.apache.org/>.
+
+*/
package org.apache.excalibur.fortress;
import java.lang.reflect.Constructor;
@@ -42,8 +84,8 @@
import org.apache.excalibur.mpool.PoolManager;
/**
- * The Container is an interface used to mark the Containers in your system. It
- * exposes a protected getServiceManager() method so that the
+ * The Container is an interface used to mark the Containers in your system.
+ * It exposes a protected getServiceManager() method so that the
* Container's Manager can expose that to the instantiating class.
*
* @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
@@ -78,8 +120,8 @@
}
/**
- * Pull the manager items from the context so we can use them to set up the
- * system.
+ * Pull the manager items from the context so we can use them to set up
+ * the system.
*/
public void contextualize( Context containerContext )
throws ContextException
@@ -132,16 +174,16 @@
{
m_roleManager = new ExcaliburRoleManager();
}
-
+
m_instrumentManager = (InstrumentManager)m_context.get( Container.INSTRUMENT_MANAGER );
}
/**
- * Handles when a configuration name is used that is not "component", so it
- * makes it easier to handle ComponentSelector hierarchies. It is meant to
- * either return a ComponentHandler or a ComponentSelector. Override this
- * so that your container can translate the container's config to the default
- * standard config.
+ * Handles when a configuration name is used that is not "component", so
+ * it makes it easier to handle ComponentSelector hierarchies. It is
+ * meant to either return a ComponentHandler or a ComponentSelector.
+ * Override this so that your container can translate the container's
+ * config to the default standard config.
*/
protected abstract Configuration rewriteConfiguration( final Configuration configItem )
throws ConfigurationException;
@@ -193,14 +235,16 @@
}
/**
- * Helper method to determine whether a given component handler configuration
- * requests a lazy or startup based initialization policy.
+ * Helper method to determine whether a given component handler
+ * configuration requests a lazy or startup based initialization policy.
*
* @param component <code>Configuration</code>
- * @return true if the given handler configuration specifies a lazy init policy,
- * false otherwise
+ *
+ * @return true if the given handler configuration specifies a lazy init
+ * policy, false otherwise
+ *
* @throws IllegalArgumentException if the handler specifies an unknown init
- * policy
+ * policy
*/
private boolean isLazyComponentHandler( Configuration component )
{
@@ -224,8 +268,8 @@
}
/**
- * Get a ComponentHandler with the standard <code>HANDLER_CONSTRUCTOR</code>
- * for the component class passed in.
+ * Get a ComponentHandler with the standard
+ * <code>HANDLER_CONSTRUCTOR</code> for the component class passed in.
*/
private ComponentHandler getComponentHandler( final String handlerClassName,
final String className,
@@ -248,7 +292,7 @@
m_extManager,
new Boolean( isLazy )
} );
-
+
if ( handler instanceof Instrumentable )
{
Instrumentable instrumentable = (Instrumentable)handler;
@@ -279,16 +323,16 @@
}
/**
- * This is the method that the ContainerComponentManager and Selector use to gain
- * access to the ComponentHandlers and ComponentSelectors. The actual access of
- * the ComponentHandler is delegated to the Container.
+ * This is the method that the ContainerComponentManager and Selector use
+ * to gain access to the ComponentHandlers and ComponentSelectors. The
+ * actual access of the ComponentHandler is delegated to the Container.
*
* @param role The role we intend to access a Component for.
* @param hint The hint that we use as a qualifier
* (note: if null, the default implementation is returned).
*
- * @return Object a reference to the ComponentHandler or ComponentSelector for the
- * role/hint combo.
+ * @return Object a reference to the ComponentHandler or
+ * ComponentSelector for the role/hint combo.
*/
public Object get( final String role, final Object hint )
throws ServiceException
@@ -324,9 +368,9 @@
}
/**
- * This is the method that the ContainerComponentManager and Selector use to gain
- * access to the ComponentHandlers and ComponentSelectors. The actual access of
- * the ComponentHandler is delegated to the Container.
+ * This is the method that the ContainerComponentManager and Selector use
+ * to gain access to the ComponentHandlers and ComponentSelectors. The
+ * actual access of the ComponentHandler is delegated to the Container.
*
* @param role The role we intend to access a Component for.
* @param hint The hint that we use as a qualifier
@@ -357,8 +401,9 @@
}
/**
- * Root ServiceManager. The Container may choose to have it's ServiceManager
- * delegate to the root manager, or it may choose to be entirely self contained.
+ * Root ServiceManager. The Container may choose to have it's
+ * ServiceManager delegate to the root manager, or it may choose to be
+ * entirely self contained.
*/
public void service( final ServiceManager parent )
throws ServiceException
1.13 +51 -9 jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/Container.java
Index: Container.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/Container.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- Container.java 18 Jun 2002 18:45:36 -0000 1.12
+++ Container.java 6 Aug 2002 19:41:17 -0000 1.13
@@ -1,17 +1,59 @@
/*
- * Copyright (C) The Apache Software Foundation. All rights reserved.
- *
- * This software is published under the terms of the Apache Software License
- * version 1.1, a copy of which has been included with this distribution in
- * the LICENSE.txt file.
- */
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) @year@ The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Jakarta", "Avalon", "Excalibur" and "Apache Software Foundation"
+ must not be used to endorse or promote products derived from this software
+ without prior written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation. For more information on the
+ Apache Software Foundation, please see <http://www.apache.org/>.
+
+*/
package org.apache.excalibur.fortress;
import org.apache.avalon.framework.service.ServiceException;
/**
- * The Container is an interface used to assist Container developers to obtain
- * the desired object from the Context. All communication from the
+ * The Container is an interface used to assist Container developers to
+ * obtain the desired object from the Context. All communication from the
* ContainerManager to the Container is through the Context object.
*
* @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
1.7 +51 -9 jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/ContainerConstants.java
Index: ContainerConstants.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/ContainerConstants.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- ContainerConstants.java 9 Jul 2002 13:32:36 -0000 1.6
+++ ContainerConstants.java 6 Aug 2002 19:41:17 -0000 1.7
@@ -1,16 +1,58 @@
/*
- * Copyright (C) The Apache Software Foundation. All rights reserved.
- *
- * This software is published under the terms of the Apache Software License
- * version 1.1, a copy of which has been included with this distribution in
- * the LICENSE.txt file.
- */
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) @year@ The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Jakarta", "Avalon", "Excalibur" and "Apache Software Foundation"
+ must not be used to endorse or promote products derived from this software
+ without prior written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation. For more information on the
+ Apache Software Foundation, please see <http://www.apache.org/>.
+
+*/
package org.apache.excalibur.fortress;
/**
* Provides constants used to access the Context object for containers.
- * A container should allow these values to propagate down to child containers,
- * so that they may create child containers in turn.
+ * A container should allow these values to propagate down to child
+ * containers, so that they may create child containers in turn.
*
* @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
* @version CVS $Revision$ $Date$
1.39 +49 -7 jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/ContainerManager.java
Index: ContainerManager.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/ContainerManager.java,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -r1.38 -r1.39
--- ContainerManager.java 30 Jul 2002 13:41:22 -0000 1.38
+++ ContainerManager.java 6 Aug 2002 19:41:17 -0000 1.39
@@ -1,10 +1,52 @@
/*
- * Copyright (C) The Apache Software Foundation. All rights reserved.
- *
- * This software is published under the terms of the Apache Software License
- * version 1.1, a copy of which has been included with this distribution in
- * the LICENSE.txt file.
- */
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) @year@ The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Jakarta", "Avalon", "Excalibur" and "Apache Software Foundation"
+ must not be used to endorse or promote products derived from this software
+ without prior written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation. For more information on the
+ Apache Software Foundation, please see <http://www.apache.org/>.
+
+*/
package org.apache.excalibur.fortress;
import org.apache.avalon.framework.activity.Disposable;
1.8 +52 -10 jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/ContainerManagerConstants.java
Index: ContainerManagerConstants.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/ContainerManagerConstants.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- ContainerManagerConstants.java 25 Jun 2002 13:39:37 -0000 1.7
+++ ContainerManagerConstants.java 6 Aug 2002 19:41:18 -0000 1.8
@@ -1,16 +1,58 @@
/*
- * Copyright (C) The Apache Software Foundation. All rights reserved.
- *
- * This software is published under the terms of the Apache Software License
- * version 1.1, a copy of which has been included with this distribution in
- * the LICENSE.txt file.
- */
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) @year@ The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Jakarta", "Avalon", "Excalibur" and "Apache Software Foundation"
+ must not be used to endorse or promote products derived from this software
+ without prior written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation. For more information on the
+ Apache Software Foundation, please see <http://www.apache.org/>.
+
+*/
package org.apache.excalibur.fortress;
/**
- * Provides constants used to access the Context object for container managers.
- * A container manager can assume that all these elements are present in
- * the initial context.
+ * Provides constants used to access the Context object for container
+ * managers. A container manager can assume that all these elements are
+ * present in the initial context.
*
* @author <a href="mailto:leo.sutic@inspireinfrastructure.com">Leo Sutic</a>
* @version CVS $Revision$ $Date$
1.16 +53 -10 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.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- DefaultContainerManager.java 22 Jul 2002 17:46:58 -0000 1.15
+++ DefaultContainerManager.java 6 Aug 2002 19:41:18 -0000 1.16
@@ -1,10 +1,52 @@
/*
- * Copyright (C) The Apache Software Foundation. All rights reserved.
- *
- * This software is published under the terms of the Apache Software License
- * version 1.1, a copy of which has been included with this distribution in
- * the LICENSE.txt file.
- */
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) @year@ The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Jakarta", "Avalon", "Excalibur" and "Apache Software Foundation"
+ must not be used to endorse or promote products derived from this software
+ without prior written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation. For more information on the
+ Apache Software Foundation, please see <http://www.apache.org/>.
+
+*/
package org.apache.excalibur.fortress;
import org.apache.avalon.excalibur.logger.LoggerManager;
@@ -38,9 +80,10 @@
*
* <p>
* The ContainerManager provides some constants used in the initial
- * <code>Parameters</code> passed into the ContainerManager. The ContainerManager
- * uses these values to create all the pieces necessary for the Container.
- * Below is a table that describes what those options are.
+ * <code>Parameters</code> passed into the ContainerManager. The
+ * ContainerManager uses these values to create all the pieces necessary
+ * for the Container. Below is a table that describes what those options
+ * are.
* </p>
*
* @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
1.5 +51 -8 jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/InitializationException.java
Index: InitializationException.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/InitializationException.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- InitializationException.java 4 Apr 2002 16:04:28 -0000 1.4
+++ InitializationException.java 6 Aug 2002 19:41:18 -0000 1.5
@@ -1,17 +1,60 @@
/*
- * Copyright (C) The Apache Software Foundation. All rights reserved.
- *
- * This software is published under the terms of the Apache Software License
- * version 1.1, a copy of which has been included with this distribution in
- * the LICENSE.txt file.
- */
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) @year@ The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Jakarta", "Avalon", "Excalibur" and "Apache Software Foundation"
+ must not be used to endorse or promote products derived from this software
+ without prior written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation. For more information on the
+ Apache Software Foundation, please see <http://www.apache.org/>.
+
+*/
package org.apache.excalibur.fortress;
import org.apache.avalon.framework.CascadingException;
/**
* This exception is used to indicate something went horribly wrong in the
- * ContainerManager, and it is unable to create a new instance of your Container.
+ * ContainerManager, and it is unable to create a new instance of your
+ * Container.
*
* @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
* @version CVS $Revision$ $Date$
1.3 +77 -21 jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/container/DefaultContainer.java
Index: DefaultContainer.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/container/DefaultContainer.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- DefaultContainer.java 6 Aug 2002 18:09:44 -0000 1.2
+++ DefaultContainer.java 6 Aug 2002 19:41:18 -0000 1.3
@@ -1,10 +1,52 @@
/*
- * Copyright (C) The Apache Software Foundation. All rights reserved.
- *
- * This software is published under the terms of the Apache Software License
- * version 1.1, a copy of which has been included with this distribution in
- * the LICENSE.txt file.
- */
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) @year@ The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Jakarta", "Avalon", "Excalibur" and "Apache Software Foundation"
+ must not be used to endorse or promote products derived from this software
+ without prior written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation. For more information on the
+ Apache Software Foundation, please see <http://www.apache.org/>.
+
+*/
package org.apache.excalibur.fortress.container;
import org.apache.excalibur.fortress.AbstractContainer;
@@ -15,7 +57,8 @@
import org.apache.avalon.framework.component.ComponentManager;
/**
- * This is the default container, and it marks the default markup for configurations.
+ * This is the default container, and it marks the default markup for
+ * configurations.
*
* @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
* @author <a href="mailto:proyal@apache.org">Peter Royal</a>
@@ -27,16 +70,17 @@
implements Configurable
{
/**
- * Process the configuration and set up the components and their mappings.
- * At this point, all components are prepared and all mappings are made.
- * However, nothing is initialized.
- *
- * <p>The native Configuration format follows a specific convention. If you
- * use a RoleManager to map roles and implementations to more helpful names,
- * we will internally rewrite the configuration to match this format. Please
- * note: If a configuration element does *not* have a unique id, it will not
- * be treated as a Component. That ID is used as the hint when there is more
- * than one implementation of a role.</p>
+ * <p>Process the configuration and set up the components and their
+ * mappings. At this point, all components are prepared and all mappings
+ * are made. However, nothing is initialized.</p>
+ *
+ * <p>The native Configuration format follows a specific convention. If
+ * you use a RoleManager to map roles and implementations to more helpful
+ * names, we will internally rewrite the configuration to match this
+ * format. Please note: If a configuration element does
+ * <strong>not</strong> have a unique id, it will not be treated as a
+ * Component. That ID is used as the hint when there is more than one
+ * implementation of a role.</p>
*
* <pre>
* <component role="org.apache.avalon.excalibur.datasource.DataSourceComponent"
@@ -48,6 +92,11 @@
*
* </component>
* </pre>
+ *
+ * @param configElement The configuration element to translate into the
+ * list of components this container managers.
+ *
+ * @throws ConfigurationException if the configuration is not valid
*/
public void configure( Configuration configElement )
throws ConfigurationException
@@ -78,9 +127,16 @@
}
/**
- * Handles when a configuration name is used that is not "component", so it
- * makes it easier to handle ComponentSelector hierarchies. It is meant to
- * either return a ComponentHandler or a ComponentSelector
+ * Handles when a configuration name is used that is not "component", so
+ * it makes it easier to handle ComponentSelector hierarchies. It is
+ * meant to either return a ComponentHandler or a ServiceSelector.
+ *
+ * @param configItem The configuration snippet to translate into the
+ * standard format.
+ *
+ * @return <code>Configuration</code> representing the native format.
+ *
+ * @throws ConfigurationException if the configuration is invalid
*/
protected Configuration rewriteConfiguration( final Configuration configItem )
throws ConfigurationException
1.12 +92 -10 jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/handler/AbstractComponentHandler.java
Index: AbstractComponentHandler.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/handler/AbstractComponentHandler.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- AbstractComponentHandler.java 5 Aug 2002 04:40:40 -0000 1.11
+++ AbstractComponentHandler.java 6 Aug 2002 19:41:18 -0000 1.12
@@ -1,10 +1,52 @@
/*
- * Copyright (C) The Apache Software Foundation. All rights reserved.
- *
- * This software is published under the terms of the Apache Software License
- * version 1.1, a copy of which has been included with this distribution in
- * the LICENSE.txt file.
- */
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) @year@ The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Jakarta", "Avalon", "Excalibur" and "Apache Software Foundation"
+ must not be used to endorse or promote products derived from this software
+ without prior written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation. For more information on the
+ Apache Software Foundation, please see <http://www.apache.org/>.
+
+*/
package org.apache.excalibur.fortress.handler;
import org.apache.excalibur.instrument.AbstractInstrumentable;
@@ -33,13 +75,22 @@
extends AbstractInstrumentable
implements ComponentHandler, Disposable
{
- /** The instance of the ComponentFactory that creates and disposes of the Component */
+ /**
+ * The instance of the ComponentFactory that creates and disposes of the
+ * Component
+ */
protected final ComponentFactory m_factory;
- /** State management boolean stating whether the Handler is initialized or not */
+ /**
+ * State management boolean stating whether the Handler is initialized or
+ * not
+ */
protected boolean m_initialized = false;
- /** State management boolean stating whether the Handler is disposed or not */
+ /**
+ * State management boolean stating whether the Handler is disposed or
+ * not
+ */
protected boolean m_disposed = false;
/** Logger for factory */
@@ -58,6 +109,20 @@
* Create a ComponentHandler that takes care of hiding the details of
* whether a Component is ThreadSafe, Poolable, or SingleThreaded.
* It falls back to SingleThreaded if not specified.
+ *
+ * @param componentClass The class used to instantiate the component
+ * @param config The configuration to pass into a configurable
+ * component.
+ * @param service The Servicemanager to pass into a serviceable
+ * compoennt.
+ * @param context The Context to pass into a contextualizable
+ * component.
+ * @param extManager The lifecycle extension manager that is invoked
+ * for additional lifecycle stages.
+ * @param isLazy Determines whether this component will be
+ * instantiated on startup or on demand.
+ *
+ * @throws Exception if any of the passed in members are invalid.
*/
public AbstractComponentHandler( final Class componentClass,
final Configuration config,
@@ -77,11 +142,25 @@
m_isLazy = isLazy.booleanValue();
}
+ /**
+ * Determines whether or not the ComponentHandler has been initialized
+ * yet or not.
+ *
+ * @return <code>true</code> if the ComponentHandler has already been
+ * initialized.
+ */
public boolean isInitialized()
{
return m_initialized;
}
+ /**
+ * Determines whether or not the ComponentHandler has lazy initialization
+ * or not.
+ *
+ * @return <code>true</code> if the ComponentHandler has lazy
+ * initialization.
+ */
public boolean isLazy()
{
return m_isLazy;
@@ -153,6 +232,9 @@
m_disposed = true;
}
+ /**
+ * Represents the handler as a string.
+ */
public String toString()
{
return this.getClass().getName() + "[for: " + m_factory.getCreatedClass().getName() + "]";
1.21 +56 -13 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.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- ComponentFactory.java 5 Aug 2002 04:40:40 -0000 1.20
+++ ComponentFactory.java 6 Aug 2002 19:41:18 -0000 1.21
@@ -1,10 +1,52 @@
/*
- * Copyright (C) The Apache Software Foundation. All rights reserved.
- *
- * This software is published under the terms of the Apache Software License
- * version 1.1, a copy of which has been included with this distribution in
- * the LICENSE.txt file.
- */
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) @year@ The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Jakarta", "Avalon", "Excalibur" and "Apache Software Foundation"
+ must not be used to endorse or promote products derived from this software
+ without prior written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation. For more information on the
+ Apache Software Foundation, please see <http://www.apache.org/>.
+
+*/
package org.apache.excalibur.fortress.handler;
import org.apache.excalibur.instrument.CounterInstrument;
@@ -43,10 +85,11 @@
private CounterInstrument m_dispose;
/**
- * Name of the Instrumentable. Maps to the id of the component in the configuration.
+ * Name of the Instrumentable. Maps to the id of the component in the
+ * configuration.
*/
private String m_instrumentableName;
-
+
/** The class which this <code>ComponentFactory</code>
* should create.
*/
@@ -75,7 +118,7 @@
/** Lifecycle extensions manager
*/
private final LifecycleExtensionManager m_extManager;
-
+
/** InstrumentManager
*/
private final InstrumentManager m_instrumentManager;
@@ -137,7 +180,7 @@
( (LogEnabled)component ).enableLogging( m_logManager.getLoggerForCategory( logger ) );
}
}
-
+
if( component instanceof InstrumentManageable )
{
( (InstrumentManageable)component ).setInstrumentManager( m_instrumentManager );
@@ -157,7 +200,7 @@
m_extManager.executeCreationExtensions( component, m_context );
ContainerUtil.initialize( component );
-
+
if( component instanceof Instrumentable )
{
Instrumentable instrumentable = (Instrumentable)component;
@@ -165,7 +208,7 @@
m_instrumentManager.registerInstrumentable(
(Instrumentable)component, m_instrumentableName );
}
-
+
ContainerUtil.start( component );
if( m_newInstance.isActive() )
1.13 +55 -12 jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/handler/ComponentHandler.java
Index: ComponentHandler.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/handler/ComponentHandler.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- ComponentHandler.java 22 Jul 2002 17:46:58 -0000 1.12
+++ ComponentHandler.java 6 Aug 2002 19:41:18 -0000 1.13
@@ -1,10 +1,52 @@
/*
- * Copyright (C) The Apache Software Foundation. All rights reserved.
- *
- * This software is published under the terms of the Apache Software License
- * version 1.1, a copy of which has been included with this distribution in
- * the LICENSE.txt file.
- */
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) @year@ The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Jakarta", "Avalon", "Excalibur" and "Apache Software Foundation"
+ must not be used to endorse or promote products derived from this software
+ without prior written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation. For more information on the
+ Apache Software Foundation, please see <http://www.apache.org/>.
+
+*/
package org.apache.excalibur.fortress.handler;
import org.apache.avalon.framework.activity.Disposable;
@@ -16,7 +58,8 @@
/**
* The ComponentHandler interface marks the ComponentHandler implementations.
- * The desire for a ComponentHandler is to manage the instances of a Component.
+ * The desire for a ComponentHandler is to manage the instances of a
+ * Component.
*
* @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
* @version CVS $Revision$ $Date$
@@ -51,14 +94,14 @@
boolean isLazy();
/**
- * Gets the current reference to a Component according to the policy of the
- * implementation.
+ * Gets the current reference to a Component according to the policy of
+ * the implementation.
*/
Object get() throws Exception;
/**
- * Puts the reference back in the ComponentHandler according to the policy
- * of the implementation.
+ * Puts the reference back in the ComponentHandler according to the
+ * policy of the implementation.
*/
void put( Object component );
}
1.23 +51 -8 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.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- FactoryComponentHandler.java 5 Aug 2002 04:40:40 -0000 1.22
+++ FactoryComponentHandler.java 6 Aug 2002 19:41:18 -0000 1.23
@@ -1,10 +1,52 @@
/*
- * Copyright (C) The Apache Software Foundation. All rights reserved.
- *
- * This software is published under the terms of the Apache Software License
- * version 1.1, a copy of which has been included with this distribution in
- * the LICENSE.txt file.
- */
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) @year@ The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Jakarta", "Avalon", "Excalibur" and "Apache Software Foundation"
+ must not be used to endorse or promote products derived from this software
+ without prior written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation. For more information on the
+ Apache Software Foundation, please see <http://www.apache.org/>.
+
+*/
package org.apache.excalibur.fortress.handler;
import org.apache.avalon.framework.configuration.Configuration;
@@ -54,7 +96,8 @@
if( m_logger.isDebugEnabled() )
{
- m_logger.debug( "ComponentHandler initialized for: " + this.m_factory.getCreatedClass().getName() );
+ m_logger.debug( "ComponentHandler initialized for: "
+ + this.m_factory.getCreatedClass().getName() );
}
m_initialized = true;
}
1.24 +55 -10 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.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- PerThreadComponentHandler.java 5 Aug 2002 04:40:40 -0000 1.23
+++ PerThreadComponentHandler.java 6 Aug 2002 19:41:18 -0000 1.24
@@ -1,10 +1,52 @@
/*
- * Copyright (C) The Apache Software Foundation. All rights reserved.
- *
- * This software is published under the terms of the Apache Software License
- * version 1.1, a copy of which has been included with this distribution in
- * the LICENSE.txt file.
- */
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) @year@ The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Jakarta", "Avalon", "Excalibur" and "Apache Software Foundation"
+ must not be used to endorse or promote products derived from this software
+ without prior written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation. For more information on the
+ Apache Software Foundation, please see <http://www.apache.org/>.
+
+*/
package org.apache.excalibur.fortress.handler;
import org.apache.avalon.framework.configuration.Configuration;
@@ -60,11 +102,13 @@
{
if( this.m_factory != null )
{
- m_logger.debug( "ComponentHandler initialized for: " + this.m_factory.getCreatedClass().getName() );
+ m_logger.debug( "ComponentHandler initialized for: "
+ + this.m_factory.getCreatedClass().getName() );
}
else
{
- m_logger.debug( "ComponentHandler initialized for: " + this.m_instance.getClass().getName() );
+ m_logger.debug( "ComponentHandler initialized for: "
+ + this.m_instance.getClass().getName() );
}
}
@@ -91,7 +135,8 @@
}
/**
- * Dispose of the ComponentHandler and any associated Pools and Factories.
+ * Dispose of the ComponentHandler and any associated Pools and
+ * Factories.
*/
public void dispose()
{
1.27 +49 -7 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.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- PoolableComponentHandler.java 5 Aug 2002 04:40:40 -0000 1.26
+++ PoolableComponentHandler.java 6 Aug 2002 19:41:18 -0000 1.27
@@ -1,10 +1,52 @@
/*
- * Copyright (C) The Apache Software Foundation. All rights reserved.
- *
- * This software is published under the terms of the Apache Software License
- * version 1.1, a copy of which has been included with this distribution in
- * the LICENSE.txt file.
- */
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) @year@ The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Jakarta", "Avalon", "Excalibur" and "Apache Software Foundation"
+ must not be used to endorse or promote products derived from this software
+ without prior written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation. For more information on the
+ Apache Software Foundation, please see <http://www.apache.org/>.
+
+*/
package org.apache.excalibur.fortress.handler;
import org.apache.avalon.framework.configuration.Configuration;
1.24 +53 -9 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.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- ThreadSafeComponentHandler.java 5 Aug 2002 04:40:40 -0000 1.23
+++ ThreadSafeComponentHandler.java 6 Aug 2002 19:41:18 -0000 1.24
@@ -1,10 +1,52 @@
/*
- * Copyright (C) The Apache Software Foundation. All rights reserved.
- *
- * This software is published under the terms of the Apache Software License
- * version 1.1, a copy of which has been included with this distribution in
- * the LICENSE.txt file.
- */
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) @year@ The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Jakarta", "Avalon", "Excalibur" and "Apache Software Foundation"
+ must not be used to endorse or promote products derived from this software
+ without prior written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation. For more information on the
+ Apache Software Foundation, please see <http://www.apache.org/>.
+
+*/
package org.apache.excalibur.fortress.handler;
import org.apache.avalon.framework.activity.Disposable;
@@ -66,11 +108,13 @@
{
if( this.m_factory != null )
{
- m_logger.debug( "ComponentHandler initialized for: " + this.m_factory.getCreatedClass().getName() );
+ m_logger.debug( "ComponentHandler initialized for: "
+ + this.m_factory.getCreatedClass().getName() );
}
else
{
- m_logger.debug( "ComponentHandler initialized for: " + this.m_instance.getClass().getName() );
+ m_logger.debug( "ComponentHandler initialized for: "
+ + this.m_instance.getClass().getName() );
}
}
1.2 +50 -8 jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/lifecycle/AbstractLifecycleExtension.java
Index: AbstractLifecycleExtension.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/lifecycle/AbstractLifecycleExtension.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- AbstractLifecycleExtension.java 9 Jul 2002 13:32:36 -0000 1.1
+++ AbstractLifecycleExtension.java 6 Aug 2002 19:41:18 -0000 1.2
@@ -1,9 +1,51 @@
/*
-* Copyright (C) The Apache Software Foundation. All rights reserved.
-*
-* This software is published under the terms of the Apache Software License
-* version 1.1, a copy of which has been included with this distribution in
-* the LICENSE.txt file.
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) @year@ The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Jakarta", "Avalon", "Excalibur" and "Apache Software Foundation"
+ must not be used to endorse or promote products derived from this software
+ without prior written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation. For more information on the
+ Apache Software Foundation, please see <http://www.apache.org/>.
+
*/
package org.apache.excalibur.fortress.lifecycle;
@@ -18,11 +60,11 @@
* @version CVS $Revision$ $Date$
*/
public abstract class AbstractLifecycleExtension
- extends AbstractLogEnabled
+ extends AbstractLogEnabled
implements LifecycleExtension
{
/**
- * Create, called when the given component is being
+ * Create, called when the given component is being
* instantiated.
*
* @param component a <code>Component</code> instance
1.3 +55 -12 jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/lifecycle/AbstractLifecycleExtensionManager.java
Index: AbstractLifecycleExtensionManager.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/lifecycle/AbstractLifecycleExtensionManager.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- AbstractLifecycleExtensionManager.java 22 Jul 2002 17:39:13 -0000 1.2
+++ AbstractLifecycleExtensionManager.java 6 Aug 2002 19:41:18 -0000 1.3
@@ -1,10 +1,52 @@
/*
- * Copyright (C) The Apache Software Foundation. All rights reserved.
- *
- * This software is published under the terms of the Apache Software License
- * version 1.1, a copy of which has been included with this distribution in
- * the LICENSE.txt file.
- */
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) @year@ The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Jakarta", "Avalon", "Excalibur" and "Apache Software Foundation"
+ must not be used to endorse or promote products derived from this software
+ without prior written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation. For more information on the
+ Apache Software Foundation, please see <http://www.apache.org/>.
+
+*/
package org.apache.excalibur.fortress.lifecycle;
import java.lang.reflect.Method;
@@ -52,13 +94,14 @@
}
/**
- * <code>executeExtensions</code> method, executes a given array of lifecycle interfaces
- * on a given component.
+ * <code>executeExtensions</code> method, executes a given array of
+ * lifecycle interfaces on a given component.
*
* @param component a <code>Component</code> instance
- * @param context a <code>Context</code> instance
- * @param type a <code>Method</code> instance, referencing which phase the
- * extensions array adheres to
+ * @param context a <code>Context</code> instance
+ * @param type a <code>Method</code> instance, referencing which phase the
+ * extensions array adheres to
+ *
* @exception Exception if an error occurs
*/
protected void executeExtensions(
1.2 +52 -10 jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/lifecycle/LifecycleExtension.java
Index: LifecycleExtension.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/lifecycle/LifecycleExtension.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- LifecycleExtension.java 9 Jul 2002 13:32:36 -0000 1.1
+++ LifecycleExtension.java 6 Aug 2002 19:41:18 -0000 1.2
@@ -1,18 +1,60 @@
/*
-* Copyright (C) The Apache Software Foundation. All rights reserved.
-*
-* This software is published under the terms of the Apache Software License
-* version 1.1, a copy of which has been included with this distribution in
-* the LICENSE.txt file.
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) @year@ The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Jakarta", "Avalon", "Excalibur" and "Apache Software Foundation"
+ must not be used to endorse or promote products derived from this software
+ without prior written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation. For more information on the
+ Apache Software Foundation, please see <http://www.apache.org/>.
+
*/
package org.apache.excalibur.fortress.lifecycle;
import org.apache.avalon.framework.context.Context;
/**
- * <code>LifecycleExtension</code> interface. This interface defines the methods that
- * a <code>LifecycleExtensionManager</code> can call on a particular concrete
- * <code>LifecycleExtensionMarker</code> class.
+ * <code>LifecycleExtension</code> interface. This interface defines the
+ * methods that a <code>LifecycleExtensionManager</code> can call on a
+ * particular concrete <code>LifecycleExtensionMarker</code> class.
*
* @author <a href="mailto:crafterm@apache.org">Marcus Crafter</a>
* @version CVS $Revision$ $Date$
@@ -20,7 +62,7 @@
public interface LifecycleExtension
{
/**
- * Create, called when the given component is being
+ * Create, called when the given component is being
* instantiated.
*
* @param component a <code>Component</code> instance
1.5 +67 -22 jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/lifecycle/LifecycleExtensionManager.java
Index: LifecycleExtensionManager.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/lifecycle/LifecycleExtensionManager.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- LifecycleExtensionManager.java 16 Jul 2002 12:25:36 -0000 1.4
+++ LifecycleExtensionManager.java 6 Aug 2002 19:41:18 -0000 1.5
@@ -1,10 +1,52 @@
/*
- * Copyright (C) The Apache Software Foundation. All rights reserved.
- *
- * This software is published under the terms of the Apache Software License
- * version 1.1, a copy of which has been included with this distribution in
- * the LICENSE.txt file.
- */
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) @year@ The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Jakarta", "Avalon", "Excalibur" and "Apache Software Foundation"
+ must not be used to endorse or promote products derived from this software
+ without prior written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation. For more information on the
+ Apache Software Foundation, please see <http://www.apache.org/>.
+
+*/
package org.apache.excalibur.fortress.lifecycle;
import java.util.ArrayList;
@@ -42,8 +84,8 @@
private final CachedArrayList m_extensions = new CachedArrayList();
/**
- * <code>executeAccessExtensions</code> method, executes all access level
- * extensions on the given component.
+ * <code>executeAccessExtensions</code> method, executes all access
+ * level extensions on the given component.
*
* @param component a <code>Component</code> instance
* @param context a <code>Context</code> instance
@@ -56,8 +98,8 @@
}
/**
- * <code>executeReleaseExtensions</code> method, executes all release level
- * extensions on the given component.
+ * <code>executeReleaseExtensions</code> method, executes all release
+ * level extensions on the given component.
*
* @param component a <code>Component</code> instance
* @param context a <code>Context</code> instance
@@ -70,8 +112,8 @@
}
/**
- * <code>executeCreationExtensions</code> method, executes all creation level
- * extensions on the given component.
+ * <code>executeCreationExtensions</code> method, executes all creation
+ * level extensions on the given component.
*
* @param component a <code>Component</code> instance
* @param context a <code>Context</code> instance
@@ -84,8 +126,8 @@
}
/**
- * <code>executeDestructionExtensions</code> method, executes all destruction
- * level extensions on the given component.
+ * <code>executeDestructionExtensions</code> method, executes all
+ * destruction level extensions on the given component.
*
* @param component a <code>Component</code> instance
* @param context a <code>Context</code> instance
@@ -201,18 +243,21 @@
*
* <p>
* This class wraps a synchronized ArrayList to provide an optimized
- * <code>toArray()</code> method that returns an internally cached array, rather
- * than a new array generated per <code>toArray()</code> invocation.
+ * <code>toArray()</code> method that returns an internally cached array,
+ * rather than a new array generated per <code>toArray()</code>
+ * invocation.
* </p>
*
* <p>
- * Use of the class by the Manager results in <code>toArray()</code> being invoked
- * far more often than any other method. Caching the value <code>toArray</code>
- * normally returns is intended to be a performance optimization.
+ * Use of the class by the Manager results in <code>toArray()</code>
+ * being invoked far more often than any other method. Caching the value
+ * <code>toArray</code> normally returns is intended to be a performance
+ * optimization.
* </p>
*
* <p>
- * The cached array value is updated upon each write operation to the List.
+ * The cached array value is updated upon each write operation to the
+ * List.
* </p>
*
* <p>
@@ -227,7 +272,7 @@
// Actual list for storing elements
private final List m_proxy = Collections.synchronizedList( new ArrayList() );
- // Proxy cache, saves unnecessary conversions from List to Array
+ // Proxy cache, saves unnecessary conversions from List to Array
private Object[] m_cache = EMPTY_ARRAY;
/**
1.3 +51 -8 jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/lookup/ComponentServiceManager.java
Index: ComponentServiceManager.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/lookup/ComponentServiceManager.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ComponentServiceManager.java 8 Jul 2002 11:58:58 -0000 1.2
+++ ComponentServiceManager.java 6 Aug 2002 19:41:18 -0000 1.3
@@ -1,10 +1,52 @@
/*
- * Copyright (C) The Apache Software Foundation. All rights reserved.
- *
- * This software is published under the terms of the Apache Software License
- * version 1.1, a copy of which has been included with this distribution in
- * the LICENSE.txt file.
- */
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) @year@ The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Jakarta", "Avalon", "Excalibur" and "Apache Software Foundation"
+ must not be used to endorse or promote products derived from this software
+ without prior written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation. For more information on the
+ Apache Software Foundation, please see <http://www.apache.org/>.
+
+*/
package org.apache.excalibur.fortress.lookup;
import org.apache.avalon.framework.component.Component;
@@ -44,7 +86,8 @@
}
catch( ComponentException ce )
{
- throw new ServiceException( role, "Could not return a reference to the Component", ce );
+ throw new ServiceException( role,
+ "Could not return a reference to the Component", ce );
}
return temp;
1.8 +73 -17 jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/lookup/FortressServiceManager.java
Index: FortressServiceManager.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/lookup/FortressServiceManager.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- FortressServiceManager.java 30 Jul 2002 17:37:26 -0000 1.7
+++ FortressServiceManager.java 6 Aug 2002 19:41:18 -0000 1.8
@@ -1,10 +1,52 @@
/*
- * Copyright (C) The Apache Software Foundation. All rights reserved.
- *
- * This software is published under the terms of the Apache Software License
- * version 1.1, a copy of which has been included with this distribution in
- * the LICENSE.txt file.
- */
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) @year@ The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Jakarta", "Avalon", "Excalibur" and "Apache Software Foundation"
+ must not be used to endorse or promote products derived from this software
+ without prior written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation. For more information on the
+ Apache Software Foundation, please see <http://www.apache.org/>.
+
+*/
package org.apache.excalibur.fortress.lookup;
import org.apache.avalon.excalibur.collections.BucketMap;
@@ -38,7 +80,9 @@
* This constructor is for a ContainerComponentManager with no parent
* ComponentLocator
*/
- public FortressServiceManager( final Container container, final LifecycleExtensionManager extManager, final Context context )
+ public FortressServiceManager( final Container container,
+ final LifecycleExtensionManager extManager,
+ final Context context )
{
this( container, (ServiceManager)null, extManager, context );
}
@@ -47,16 +91,26 @@
* This constructor is for a ContainerComponentManager with no parent
* ComponentLocator
*/
- public FortressServiceManager( final Container container, final ComponentManager parent, final LifecycleExtensionManager extManager, final Context context )
- {
- this( container, (parent != null) ? new ComponentServiceManager( parent ) : null, extManager, context );
+ public FortressServiceManager( final Container container,
+ final ComponentManager parent,
+ final LifecycleExtensionManager extManager,
+ final Context context )
+ {
+ this( container, (parent != null) ?
+ new ComponentServiceManager( parent ) :
+ null,
+ extManager,
+ context );
}
/**
* This constructor is for a ContainerComponentManager with a parent
* ComponentLocator
*/
- public FortressServiceManager( final Container container, final ServiceManager parent, final LifecycleExtensionManager extManager, final Context context )
+ public FortressServiceManager( final Container container,
+ final ServiceManager parent,
+ final LifecycleExtensionManager extManager,
+ final Context context )
{
m_parent = parent;
m_components = container;
@@ -82,7 +136,8 @@
catch( ServiceException ce )
{
/* Logic is thus:
- * If we have the component and the get threw an exception, we need to report that.
+ * If we have the component and the get threw an exception, we
+ * need to report that.
* Otherwise, do the lookup on our parent
* Otherwise, just throw the exception
*/
@@ -171,10 +226,11 @@
{
if ( null == m_parent )
{
- /* This is a purplexing problem. SOmetimes the m_used hash returns
- * null for the component--usually a ThreadSafe component. When there
- * is no handler and no parent, that is an error condition--but if the
- * component is usually ThreadSafe, the impact is essentially nill.
+ /* This is a purplexing problem. SOmetimes the m_used hash
+ * returns null for the component--usually a ThreadSafe
+ * component. When there is no handler and no parent, that
+ * is an error condition--but if the component is usually
+ * ThreadSafe, the impact is essentially nill.
*/
}
else
1.6 +57 -10 jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/lookup/FortressServiceSelector.java
Index: FortressServiceSelector.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/lookup/FortressServiceSelector.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- FortressServiceSelector.java 15 Jul 2002 17:35:22 -0000 1.5
+++ FortressServiceSelector.java 6 Aug 2002 19:41:19 -0000 1.6
@@ -1,10 +1,52 @@
/*
- * Copyright (C) The Apache Software Foundation. All rights reserved.
- *
- * This software is published under the terms of the Apache Software License
- * version 1.1, a copy of which has been included with this distribution in
- * the LICENSE.txt file.
- */
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) @year@ The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Jakarta", "Avalon", "Excalibur" and "Apache Software Foundation"
+ must not be used to endorse or promote products derived from this software
+ without prior written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation. For more information on the
+ Apache Software Foundation, please see <http://www.apache.org/>.
+
+*/
package org.apache.excalibur.fortress.lookup;
import org.apache.avalon.excalibur.collections.BucketMap;
@@ -31,7 +73,10 @@
private final Context m_context;
private final LifecycleExtensionManager m_extManager;
- public FortressServiceSelector( final Container container, final String role, final LifecycleExtensionManager extManager, final Context context )
+ public FortressServiceSelector( final Container container,
+ final String role,
+ final LifecycleExtensionManager extManager,
+ final Context context )
{
m_role = role;
m_components = container;
@@ -52,7 +97,8 @@
if( null == handler )
{
- throw new ServiceException( m_role + "/" + hint.toString(), "The hint does not exist in the ComponentSelector" );
+ throw new ServiceException( m_role + "/" + hint.toString(),
+ "The hint does not exist in the ComponentSelector" );
}
final Object component;
@@ -74,7 +120,8 @@
}
catch( Exception e )
{
- throw new ServiceException( m_role + "/" + hint.toString(), "Could not return a reference to the Component", e );
+ throw new ServiceException( m_role + "/" + hint.toString(),
+ "Could not return a reference to the Component", e );
}
m_used.put( component, handler );
1.4 +52 -10 jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/lookup/ServiceComponentManager.java
Index: ServiceComponentManager.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/lookup/ServiceComponentManager.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- ServiceComponentManager.java 30 Jul 2002 16:49:52 -0000 1.3
+++ ServiceComponentManager.java 6 Aug 2002 19:41:19 -0000 1.4
@@ -1,10 +1,52 @@
/*
- * Copyright (C) The Apache Software Foundation. All rights reserved.
- *
- * This software is published under the terms of the Apache Software License
- * version 1.1, a copy of which has been included with this distribution in
- * the LICENSE.txt file.
- */
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) @year@ The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Jakarta", "Avalon", "Excalibur" and "Apache Software Foundation"
+ must not be used to endorse or promote products derived from this software
+ without prior written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation. For more information on the
+ Apache Software Foundation, please see <http://www.apache.org/>.
+
+*/
package org.apache.excalibur.fortress.lookup;
import org.apache.avalon.framework.component.Component;
@@ -53,14 +95,14 @@
else
{
throw new ComponentException( role,
- "The requested component does not implement Component" );
+ "The requested component does not implement Component" );
}
}
catch( ServiceException ce )
{
throw new ComponentException( role,
- "Could not return a reference to the Component",
- ce );
+ "Could not return a reference to the Component",
+ ce );
}
}
1.2 +6 -5 jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/lookup/ServiceComponentSelector.java
Index: ServiceComponentSelector.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/lookup/ServiceComponentSelector.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ServiceComponentSelector.java 30 Jul 2002 16:49:52 -0000 1.1
+++ ServiceComponentSelector.java 6 Aug 2002 19:41:19 -0000 1.2
@@ -46,13 +46,14 @@
catch( ServiceException ce )
{
throw new ComponentException( ce.getRole(),
- "Could not return a reference to the Component",
- ce );
+ "Could not return a reference to the Component",
+ ce );
}
catch( ClassCastException cce )
{
- throw new ComponentException( "The requested component does not implement Component",
- cce );
+ throw new ComponentException(
+ "The requested component does not implement Component",
+ cce );
}
return temp;
1.10 +56 -14 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.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- AbstractRoleManager.java 17 Jul 2002 20:44:33 -0000 1.9
+++ AbstractRoleManager.java 6 Aug 2002 19:41:19 -0000 1.10
@@ -1,10 +1,52 @@
/*
- * Copyright (C) The Apache Software Foundation. All rights reserved.
- *
- * This software is published under the terms of the Apache Software License
- * version 1.1, a copy of which has been included with this distribution in
- * the LICENSE.txt file.
- */
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) @year@ The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Jakarta", "Avalon", "Excalibur" and "Apache Software Foundation"
+ must not be used to endorse or promote products derived from this software
+ without prior written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation. For more information on the
+ Apache Software Foundation, please see <http://www.apache.org/>.
+
+*/
package org.apache.excalibur.fortress.util;
import java.util.ArrayList;
@@ -12,8 +54,8 @@
import java.util.Map;
/**
- * The Excalibur Role Manager is used for Excalibur Role Mappings. All of the
- * information is hard-coded.
+ * The Excalibur Role Manager is used for Excalibur Role Mappings. All of
+ * the information is hard-coded.
*
* @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
* @version CVS $Revision$ $Date$
@@ -123,9 +165,9 @@
/**
* Find the Class for the given shorthand name. If there is no
* correspondence between the class and the shorthand name, the method
- * returns <code>null</code>. If this RoleManager does not have the match,
- * and there is a parent RoleManager, the parent will be asked to resolve
- * the request.
+ * returns <code>null</code>. If this RoleManager does not have the
+ * match, and there is a parent RoleManager, the parent will be asked to
+ * resolve the request.
*/
public final Class getClassForName( final String shorthandName )
{
@@ -165,8 +207,8 @@
/**
* Retrieves the handler class name for the specified class name. This
* is called for every ComponentImplementation. If this RoleManager does
- * not have the match, and there is a parent RoleManager, the parent will be
- * asked to resolve the handler's class name.
+ * not have the match, and there is a parent RoleManager, the parent will
+ * be asked to resolve the handler's class name.
*
* @param role The role that has a default implementation.
* @return the Fully Qualified Class Name (FQCN) for the role.
1.10 +49 -7 jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/util/ConfigurableRoleManager.java
Index: ConfigurableRoleManager.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/util/ConfigurableRoleManager.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- ConfigurableRoleManager.java 12 May 2002 11:13:45 -0000 1.9
+++ ConfigurableRoleManager.java 6 Aug 2002 19:41:19 -0000 1.10
@@ -1,10 +1,52 @@
/*
- * Copyright (C) The Apache Software Foundation. All rights reserved.
- *
- * This software is published under the terms of the Apache Software License
- * version 1.1, a copy of which has been included with this distribution in
- * the LICENSE.txt file.
- */
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) @year@ The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Jakarta", "Avalon", "Excalibur" and "Apache Software Foundation"
+ must not be used to endorse or promote products derived from this software
+ without prior written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation. For more information on the
+ Apache Software Foundation, please see <http://www.apache.org/>.
+
+*/
package org.apache.excalibur.fortress.util;
import java.util.Collections;
1.20 +49 -0 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.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- ContextBuilder.java 6 Aug 2002 00:52:25 -0000 1.19
+++ ContextBuilder.java 6 Aug 2002 19:41:19 -0000 1.20
@@ -1,3 +1,52 @@
+/*
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) @year@ The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Jakarta", "Avalon", "Excalibur" and "Apache Software Foundation"
+ must not be used to endorse or promote products derived from this software
+ without prior written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation. For more information on the
+ Apache Software Foundation, please see <http://www.apache.org/>.
+
+*/
package org.apache.excalibur.fortress.util;
import java.io.File;
1.29 +198 -59 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.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- ContextManager.java 6 Aug 2002 00:52:25 -0000 1.28
+++ ContextManager.java 6 Aug 2002 19:41:19 -0000 1.29
@@ -1,10 +1,52 @@
/*
- * Copyright (C) The Apache Software Foundation. All rights reserved.
- *
- * This software is published under the terms of the Apache Software License
- * version 1.1, a copy of which has been included with this distribution in
- * the LICENSE.txt file.
- */
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) @year@ The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Jakarta", "Avalon", "Excalibur" and "Apache Software Foundation"
+ must not be used to endorse or promote products derived from this software
+ without prior written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation. For more information on the
+ Apache Software Foundation, please see <http://www.apache.org/>.
+
+*/
package org.apache.excalibur.fortress.util;
import java.util.ArrayList;
@@ -42,27 +84,28 @@
import org.apache.excalibur.source.impl.SourceResolverImpl;
/**
- * The ContextManager is used to manage the values in a Container's Context.
- * Use this helper class to create the initial context to pass into the
- * ContainerManager. Its purpose is to add the default values, and give
- * convenient methods to override those defaults. Once you get an instance
- * of the Context, it is made read-only and returned. No further operations
- * will be possible on it.
+ * <p>The ContextManager is used to manage the values in a Container's
+ * Context. The ContainerManager uses this helper class to create the
+ * initial context for the Container. Its purpose is to add the default
+ * values, and give convenient methods to override those defaults. Once you
+ * get an instance of the Context, it is made read-only and returned. No
+ * further operations will be possible on it.</p>
*
* <p>You can get two different contexts from the ContextManager: the child
- * context and the container manager context. The former contains all managers,
- * such as the pool manager etc. necessary for a child container to create
- * additional child containers. The container manager context contains all
- * of the child context, but also initialization parameters for the
+ * context and the container manager context. The former contains all
+ * managers, such as the pool manager etc. necessary for a child container to
+ * create additional child containers. The container manager context contains
+ * all of the child context, but also initialization parameters for the
* container, such as a Configuration object, a ComponentLocator, etc., that
- * the container wants, but does not want to pass on to its children.
+ * the container wants, but does not want to pass on to its children.</p>
*
* <p>You would typically use the container manager context to initialize
- * the container manager, and let it pass the child context on to the container.
+ * the container manager, and let it pass the child context on to the
+ * container.</p>
*
- * <p>The ContextManager will sometimes create new components, such as a component
- * manager, a pool manager, etc. It will manage these components and dispose
- * of them properly when it itself is disposed .
+ * <p>The ContextManager will sometimes create new components, such as a
+ * component manager, a pool manager, etc. It will manage these components
+ * and dispose of them properly when it itself is disposed .</p>
*
* @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
* @author <a href="mailto:leo.sutic@inspireinfrastructure.com">Leo Sutic</a>
@@ -77,7 +120,8 @@
static
{
- DefaultConfiguration config = new DefaultConfiguration( "", "", "", "" );
+ DefaultConfiguration config =
+ new DefaultConfiguration( "", "", "", "" );
config.makeReadOnly();
EMPTY_CONFIG = config;
}
@@ -119,10 +163,12 @@
*/
private final ArrayList ownedComponents = new ArrayList();
- /** The ConfigurationBuilder is instantiated lazilly in getConfiguration
- * to avoid LinkageErrors in some environments. */
+ /**
+ * The ConfigurationBuilder is instantiated lazilly in getConfiguration
+ * to avoid LinkageErrors in some environments.
+ */
private DefaultConfigurationBuilder configBuilder;
-
+
private final DefaultConfigurationSerializer configSerializer =
new DefaultConfigurationSerializer();
@@ -130,8 +176,9 @@
* Create a new ContextManager.
*
* @param rootContext the default values.
- * @param overrides values to be overridden in the root context. This parameter is typically
- * created with a ContextBuilder.
+ * @param overrides values to be overridden in the root context. This
+ * parameter is typically created with a
+ * ContextBuilder.
* @param logger logger to use when creating new components.
*/
public ContextManager( Context rootContext, Logger logger )
@@ -144,6 +191,19 @@
this.primordialLogger = new ConsoleLogger();
}
+ /**
+ * Method to assume ownership of one of the managers the
+ * <code>ContextManager</code> created. Ownership means that the
+ * <code>ContextManager</code> is responsible for destroying the
+ * manager when the <code>ContextManager</code> is destroyed.
+ *
+ * FIXME: Should this really be public? Also, we should throw a
+ * NullPointerException instead.
+ *
+ * @param object The object being claimed
+ *
+ * @throws IllegalArgumentException if the object is null.
+ */
public void assumeOwnership( Object o )
{
if( o == null )
@@ -153,6 +213,13 @@
ownedComponents.add( o );
}
+ /**
+ * Initialize the <code>ContextManager</code>. This will cause the
+ * <code>ContextManager</code> to create any managers it needs.
+ *
+ * @throws Exception if there is a problem at any point in the
+ * initialization.
+ */
public void initialize() throws Exception
{
initializeOwnComponentManager();
@@ -170,6 +237,11 @@
containerManagerContext.makeReadOnly();
}
+ /**
+ * Load the configuration file that the Container will need to operate.
+ *
+ * @throws Exception if the configuration cannot be loaded
+ */
protected void initializeConfiguration() throws Exception
{
try
@@ -203,21 +275,31 @@
}
}
+ /**
+ * Initialize the context that will be passed into the container.
+ *
+ * @throws Exception if any of the parameters cannot be copied properly.
+ */
protected void initializeContext() throws Exception
{
copyEntry( CONTAINER_CLASS );
- copyEntry( PARAMETERS );
- }
- protected void copyEntry( String key ) throws Exception
- {
try
{
- containerManagerContext.put( key, rootContext.get( key ) );
- }
- catch( ContextException ce )
- {
+ copyEntry( PARAMETERS );
}
+ catch ( ContextException ce ) {/* ignore this exception */}
+ }
+
+ /**
+ * Copies the specified entry from the <code>rootContext</code> to the
+ * <code>containerManagerContext</code>.
+ *
+ * @throws ContextException if the parameter does not exist
+ */
+ protected void copyEntry( String key ) throws ContextException
+ {
+ containerManagerContext.put( key, rootContext.get( key ) );
}
/**
@@ -245,12 +327,22 @@
}
catch( Exception e )
{
- getLogger().warn( "Unable to dispose of owned component " + o.getClass().getName(), e );
+ getLogger().warn( "Unable to dispose of owned component "
+ + o.getClass().getName(), e );
}
}
ownedComponents.clear();
}
+ /**
+ * Convenience method to obtain a value, or defer to a default if it does
+ * not exist.
+ *
+ * @param context The context object we intend to get a value from.
+ * @param key The key we want to use to get the value.
+ * @param defaultValue The default value we return if the key does not
+ * exist.
+ */
protected Object get( Context context, String key, Object defaultValue )
{
try
@@ -266,8 +358,12 @@
/**
* Will set up a ComponentLocator if none is supplied.
*
- * The postcondition is that childContext.get( Container.COMPONENT_MANAGER )
- * should return a valid logger manager.
+ * <p>The postcondition is that
+ * <code>childContext.get( Container.COMPONENT_MANAGER )</code>
+ * should return a valid logger manager.</p>
+ *
+ * @throws Exception if the <code>ComponentManager</code> cannot be
+ * created.
*/
protected void initializeComponentManager() throws Exception
{
@@ -293,12 +389,14 @@
// No ComponentLocator available anywhere. (Set one up.)
}
- //
- // TODO: Load configuration from COMPONENT_MANAGER_CONFIGURATION or COMPONENT_MANAGER_CONFIGURATION_URI
- // and create a proper CM from those (ECM?). Need a container CM for that, though. /LS
- //
- // No, if there is no parent CM, then there is no parent Container. Therefore, there is
- // no need for a new CM here. -BL
+ /*
+ * TODO: Load configuration from COMPONENT_MANAGER_CONFIGURATION or
+ * COMPONENT_MANAGER_CONFIGURATION_URI and create a proper CM
+ * from those (ECM?). Need a container CM for that, though. /LS
+ *
+ * No, if there is no parent CM, then there is no parent Container.
+ * Therefore, there is no need for a new CM here. -BL
+ */
final ComponentManager parent = (ComponentManager)get( rootContext, COMPONENT_MANAGER_PARENT, null );
if( null != parent ) //Don't waste time if we don't have a parent
@@ -312,8 +410,11 @@
/**
* Will set up a ServiceLocator if none is supplied.
*
- * The postcondition is that childContext.get( Container.SERVICE_MANAGER )
- * should return a valid logger manager.
+ * <p>The postcondition is that
+ * <code>childContext.get( Container.SERVICE_MANAGER )</code> should
+ * return a valid logger manager.</p>
+ *
+ * @throws Exception if the ServiceManager could not be instantiated.
*/
protected void initializeServiceManager() throws Exception
{
@@ -349,6 +450,12 @@
}
}
+ /**
+ * Set up the CommandQueue to enable asynchronous management.
+ *
+ * @throws Exception if the <code>CommandQueue</code> could not be
+ * created.
+ */
protected void initializeCommandQueue() throws Exception
{
try
@@ -374,10 +481,10 @@
}
/**
- * Helper method for creating a default Command Queue
+ * Helper method for creating a default CommandQueue
*
- * @return a default command <code>Queue</code>
- * @exception Exception if an error occurs
+ * @return a default <code>CommandQueue</code>
+ * @throws Exception if an error occurs
*/
private Queue createCommandQueue() throws Exception
{
@@ -399,7 +506,8 @@
/**
* Helper method for creating ThreadManager configuration.
*
- * @return ThreadManager configuration as a <code>Parameters</code> instance
+ * @return ThreadManager configuration as a <code>Parameters</code>
+ * instance
*/
private Parameters buildCommandQueueConfig()
{
@@ -432,6 +540,11 @@
return p;
}
+ /**
+ * Set up the Pool Manager for the managed pool.
+ *
+ * @throws Exception if there is an error.
+ */
protected void initializePoolManager() throws Exception
{
try
@@ -448,6 +561,11 @@
childContext.put( POOL_MANAGER, pm );
}
+ /**
+ * Set up the RoleManager for the Container.
+ *
+ * @throws Exception if there is an error.
+ */
protected void initializeRoleManager() throws Exception
{
try
@@ -493,9 +611,11 @@
}
/**
- * Get a reference to the initial ComponentLocator used by the ContainerManager
- * to hold the Components used for parsing the config files and setting up the
- * environment.
+ * Get a reference to the initial ComponentLocator used by the
+ * ContainerManager to hold the Components used for parsing the config
+ * files and setting up the environment.
+ *
+ * @throws Exception when there is an error.
*/
protected void initializeOwnComponentManager() throws Exception
{
@@ -522,6 +642,13 @@
this.manager = manager;
}
+ /**
+ * Get a configuration based on a config and URI key.
+ *
+ * @param configKey Get the <code>Configuration</code> object directly
+ * from the context.
+ * @param uriKey Get the uri from the context.
+ */
protected Configuration getConfiguration( String configKey, String uriKey )
{
Configuration config = null;
@@ -554,7 +681,7 @@
{
configBuilder = new DefaultConfigurationBuilder();
}
-
+
return configBuilder.build( src.getInputStream() );
}
catch( Exception e )
@@ -571,6 +698,8 @@
/**
* Finalizes and returns the context.
+ *
+ * @return a <code>Context</code>
*/
public Context getContainerManagerContext()
{
@@ -579,6 +708,8 @@
/**
* Finalizes and returns the context.
+ *
+ * @return a <code>Context</code>
*/
public Context getChildContext()
{
@@ -587,6 +718,8 @@
/**
* Get a reference the Logger.
+ *
+ * @return a <code>Logger</code>
*/
protected Logger getLogger()
{
@@ -604,8 +737,11 @@
* Will set up a LogKitLoggerManager if none is supplied. This can be
* overridden if you don't want a LogKitLoggerManager.
*
- * The postcondition is that childContext.get( Container.LOGGER_MANAGER )
- * should return a valid logger manager.
+ * <p>The postcondition is that
+ * <code>childContext.get( Container.LOGGER_MANAGER )</code> should
+ * return a valid logger manager.</p>
+ *
+ * @throws Exception if it cannot instantiate the LoggerManager
*/
protected void initializeLoggerManager() throws Exception
{
@@ -664,8 +800,11 @@
* Will set up a LogKitLoggerManager if none is supplied. This can be
* overridden if you don't want a LogKitLoggerManager.
*
- * The postcondition is that childContext.get( Container.LOGGER_MANAGER )
- * should return a valid logger manager.
+ * <p>The postcondition is that
+ * <code>childContext.get( Container.LOGGER_MANAGER )</code> should
+ * return a valid logger manager.</p>
+ *
+ * @throws Exception if it cannot instantiate the LoggerManager
*/
protected void initializeInstrumentManager() throws Exception
{
1.9 +49 -7 jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/util/ContextManagerConstants.java
Index: ContextManagerConstants.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/util/ContextManagerConstants.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- ContextManagerConstants.java 5 Aug 2002 04:40:40 -0000 1.8
+++ ContextManagerConstants.java 6 Aug 2002 19:41:19 -0000 1.9
@@ -1,10 +1,52 @@
/*
- * Copyright (C) The Apache Software Foundation. All rights reserved.
- *
- * This software is published under the terms of the Apache Software License
- * version 1.1, a copy of which has been included with this distribution in
- * the LICENSE.txt file.
- */
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) @year@ The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Jakarta", "Avalon", "Excalibur" and "Apache Software Foundation"
+ must not be used to endorse or promote products derived from this software
+ without prior written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation. For more information on the
+ Apache Software Foundation, please see <http://www.apache.org/>.
+
+*/
package org.apache.excalibur.fortress.util;
import org.apache.excalibur.fortress.ContainerManagerConstants;
1.13 +51 -9 jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/util/ExcaliburRoleManager.java
Index: ExcaliburRoleManager.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/util/ExcaliburRoleManager.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- ExcaliburRoleManager.java 23 Jul 2002 12:41:37 -0000 1.12
+++ ExcaliburRoleManager.java 6 Aug 2002 19:41:19 -0000 1.13
@@ -1,18 +1,60 @@
/*
- * Copyright (C) The Apache Software Foundation. All rights reserved.
- *
- * This software is published under the terms of the Apache Software License
- * version 1.1, a copy of which has been included with this distribution in
- * the LICENSE.txt file.
- */
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) @year@ The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Jakarta", "Avalon", "Excalibur" and "Apache Software Foundation"
+ must not be used to endorse or promote products derived from this software
+ without prior written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation. For more information on the
+ Apache Software Foundation, please see <http://www.apache.org/>.
+
+*/
package org.apache.excalibur.fortress.util;
import java.util.Collections;
import java.util.HashMap;
/**
- * The Excalibur Role Manager is used for Excalibur Role Mappings. All of the
- * information is hard-coded.
+ * The Excalibur Role Manager is used for Excalibur Role Mappings. All of
+ * the information is hard-coded.
*
* @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
* @author <a href="mailto:proyal@apache.org">Peter Royal</a>
1.8 +49 -7 jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/util/OverridableContext.java
Index: OverridableContext.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/util/OverridableContext.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- OverridableContext.java 24 Apr 2002 18:33:18 -0000 1.7
+++ OverridableContext.java 6 Aug 2002 19:41:19 -0000 1.8
@@ -1,10 +1,52 @@
/*
- * Copyright (C) The Apache Software Foundation. All rights reserved.
- *
- * This software is published under the terms of the Apache Software License
- * version 1.1, a copy of which has been included with this distribution in
- * the LICENSE.txt file.
- */
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) @year@ The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Jakarta", "Avalon", "Excalibur" and "Apache Software Foundation"
+ must not be used to endorse or promote products derived from this software
+ without prior written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation. For more information on the
+ Apache Software Foundation, please see <http://www.apache.org/>.
+
+*/
package org.apache.excalibur.fortress.util;
import org.apache.avalon.framework.context.Context;
1.5 +67 -24 jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/util/RoleManager.java
Index: RoleManager.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/util/RoleManager.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- RoleManager.java 4 Apr 2002 16:04:28 -0000 1.4
+++ RoleManager.java 6 Aug 2002 19:41:19 -0000 1.5
@@ -1,10 +1,52 @@
/*
- * Copyright (C) The Apache Software Foundation. All rights reserved.
- *
- * This software is published under the terms of the Apache Software License
- * version 1.1, a copy of which has been included with this distribution in
- * the LICENSE.txt file.
- */
+
+ ============================================================================
+ The Apache Software License, Version 1.1
+ ============================================================================
+
+ Copyright (C) @year@ The Apache Software Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modifica-
+ tion, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ 3. The end-user documentation included with the redistribution, if any, must
+ include the following acknowledgment: "This product includes software
+ developed by the Apache Software Foundation (http://www.apache.org/)."
+ Alternately, this acknowledgment may appear in the software itself, if
+ and wherever such third-party acknowledgments normally appear.
+
+ 4. The names "Jakarta", "Avalon", "Excalibur" and "Apache Software Foundation"
+ must not be used to endorse or promote products derived from this software
+ without prior written permission. For written permission, please contact
+ apache@apache.org.
+
+ 5. Products derived from this software may not be called "Apache", nor may
+ "Apache" appear in their name, without prior written permission of the
+ Apache Software Foundation.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This software consists of voluntary contributions made by many individuals
+ on behalf of the Apache Software Foundation. For more information on the
+ Apache Software Foundation, please see <http://www.apache.org/>.
+
+*/
package org.apache.excalibur.fortress.util;
/**
@@ -21,40 +63,41 @@
/**
* Find the Class for the given shorthand name. If there is no
* correspondence between the class and the shorthand name, the method
- * returns <code>null</code>. If this RoleManager does not have the match,
- * and there is a parent RoleManager, the parent will be asked to resolve
- * the request.
+ * returns <code>null</code>. If this RoleManager does not have the
+ * match, and there is a parent RoleManager, the parent will be asked to
+ * resolve the request.
*/
Class getClassForName( final String shorthandName );
/**
- * This method is merely a hint for serialization. If this RoleManager does
- * not have the match, and there is a parent RoleManager, the parent will be
- * asked to resolve the request.
+ * This method is merely a hint for serialization. If this RoleManager
+ * does not have the match, and there is a parent RoleManager, the parent
+ * will be asked to resolve the request.
*/
String getNameForClass( final Class component );
/**
- * Get the Role name for a specific class. If the class does not belong to
- * a Component, or the Role is not easily determinable, this method will return
- * <code>null</code>. If this RoleManager does not have the match, and
- * there is a parent RoleManager, the parent will be asked to resolve the
- * request.
+ * Get the Role name for a specific class. If the class does not belong
+ * to a Component, or the Role is not easily determinable, this method
+ * will return <code>null</code>. If this RoleManager does not have the
+ * match, and there is a parent RoleManager, the parent will be asked to
+ * resolve the request.
*/
String getRoleForClass( final Class component );
/**
- * Get an array of classes registered with the role manager that implement a
- * role. If this RoleManager does not have the match, and there is a parent
- * RoleManager, the parent will be asked to resolve the request.
+ * Get an array of classes registered with the role manager that
+ * implement a role. If this RoleManager does not have the match, and
+ * there is a parent RoleManager, the parent will be asked to resolve the
+ * request.
*/
Class[] getClassesForRole( final String role );
/**
* Retrieves the handler class name for the specified class. This
- * is called for every Component Implementation. If this RoleManager does
- * not have the match, and there is a parent RoleManager, the parent will be
- * asked to resolve the handler's class name.
+ * is called for every Component Implementation. If this RoleManager
+ * does not have the match, and there is a parent RoleManager, the parent
+ * will be asked to resolve the handler's class name.
*
* @param class The class of the Component in question.
* @return the Class instance of the ComponentHandler.
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>