avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@apache.org
Subject cvs commit: jakarta-avalon-excalibur/fortress/src/test/org/apache/excalibur/fortress/test ContainerProfile.java
Date Fri, 08 Nov 2002 01:58:32 GMT
donaldp     2002/11/07 17:58:31

  Modified:    fortress/src/java/org/apache/excalibur/fortress
                        AbstractContainer.java Container.java
                        ContainerManager.java
               fortress/src/java/org/apache/excalibur/fortress/container
                        MetaDataContainer.java
               fortress/src/java/org/apache/excalibur/fortress/handler
                        AbstractComponentHandler.java
                        PoolableComponentHandler.java
               fortress/src/test/org/apache/excalibur/fortress/test
                        ContainerProfile.java
  Log:
  Rework the Container interface so that it does not extend ContainerConstants.
  
  Revision  Changes    Path
  1.65      +8 -8      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.64
  retrieving revision 1.65
  diff -u -r1.64 -r1.65
  --- AbstractContainer.java	8 Nov 2002 00:54:14 -0000	1.64
  +++ AbstractContainer.java	8 Nov 2002 01:58:31 -0000	1.65
  @@ -122,12 +122,12 @@
       {
           m_context = containerContext;
   
  -        m_logManager = (LoggerManager)m_context.get( Container.LOGGER_MANAGER );
  -        m_poolManager = (PoolManager)m_context.get( Container.POOL_MANAGER );
  +        m_logManager = (LoggerManager)m_context.get( ContainerConstants.LOGGER_MANAGER
);
  +        m_poolManager = (PoolManager)m_context.get( ContainerConstants.POOL_MANAGER );
   
           try
           {
  -            m_extManager = (LifecycleExtensionManager)m_context.get( Container.EXTENSION_MANAGER
);
  +            m_extManager = (LifecycleExtensionManager)m_context.get( ContainerConstants.EXTENSION_MANAGER
);
           }
           catch( ContextException ce )
           {
  @@ -144,7 +144,7 @@
   
           try
           {
  -            m_classLoader = (ClassLoader)m_context.get( Container.CONTEXT_CLASSLOADER );
  +            m_classLoader = (ClassLoader)m_context.get( ContainerConstants.CONTEXT_CLASSLOADER
);
           }
           catch( ContextException ce )
           {
  @@ -153,7 +153,7 @@
   
           try
           {
  -            m_commandQueue = (Queue)m_context.get( Container.COMMAND_QUEUE );
  +            m_commandQueue = (Queue)m_context.get( ContainerConstants.COMMAND_QUEUE );
           }
           catch( ContextException ce )
           {
  @@ -164,7 +164,7 @@
   
           try
           {
  -            m_roleManager = (RoleManager)m_context.get( Container.ROLE_MANAGER );
  +            m_roleManager = (RoleManager)m_context.get( ContainerConstants.ROLE_MANAGER
);
           }
           catch( ContextException ce )
           {
  @@ -180,7 +180,7 @@
               }
           }
   
  -        m_instrumentManager = (InstrumentManager)m_context.get( Container.INSTRUMENT_MANAGER
);
  +        m_instrumentManager = (InstrumentManager)m_context.get( ContainerConstants.INSTRUMENT_MANAGER
);
       }
   
       /**
  
  
  
  1.17      +2 -2      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.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- Container.java	2 Oct 2002 01:46:59 -0000	1.16
  +++ Container.java	8 Nov 2002 01:58:31 -0000	1.17
  @@ -59,7 +59,7 @@
    * @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
    * @version CVS $Revision$ $Date$
    */
  -public interface Container extends ContainerConstants
  +public interface Container
   {
       Object get( String role, Object hint ) throws ServiceException;
   
  
  
  
  1.43      +3 -2      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.42
  retrieving revision 1.43
  diff -u -r1.42 -r1.43
  --- ContainerManager.java	13 Aug 2002 07:57:26 -0000	1.42
  +++ ContainerManager.java	8 Nov 2002 01:58:31 -0000	1.43
  @@ -94,7 +94,8 @@
    * @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
    * @version CVS $Revision$ $Date$
    */
  -public interface ContainerManager extends Disposable, Initializable
  +public interface ContainerManager
  +    extends Disposable, Initializable
   {
       /**
        * Get a reference to your Container.  Typically, you would cast this to
  
  
  
  1.10      +9 -7      jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/container/MetaDataContainer.java
  
  Index: MetaDataContainer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/container/MetaDataContainer.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- MetaDataContainer.java	3 Oct 2002 03:21:14 -0000	1.9
  +++ MetaDataContainer.java	8 Nov 2002 01:58:31 -0000	1.10
  @@ -70,6 +70,7 @@
   import org.apache.excalibur.event.command.Command;
   import org.apache.excalibur.fortress.Container;
   import org.apache.excalibur.fortress.ContainerManagerConstants;
  +import org.apache.excalibur.fortress.ContainerConstants;
   import org.apache.excalibur.fortress.container.commands.CheckTypeInfoCommand;
   import org.apache.excalibur.fortress.container.commands.CommandFinishedListener;
   import org.apache.excalibur.fortress.lifecycle.LifecycleExtensionManager;
  @@ -135,7 +136,7 @@
   
           try
           {
  -            m_loader = (ClassLoader)m_context.get( Container.CONTEXT_CLASSLOADER );
  +            m_loader = (ClassLoader)m_context.get( ContainerConstants.CONTEXT_CLASSLOADER
);
           }
           catch( ContextException ce )
           {
  @@ -147,12 +148,13 @@
               m_jarEntries.merge( ( (ComponentClassLoader)m_loader ).getEntries() );
           }
   
  -        m_logManager = (LoggerManager)m_context.get( Container.LOGGER_MANAGER );
  -        m_poolManager = (PoolManager)m_context.get( Container.POOL_MANAGER );
  +        m_logManager = (LoggerManager)m_context.get( ContainerConstants.LOGGER_MANAGER
);
  +        m_poolManager = (PoolManager)m_context.get( ContainerConstants.POOL_MANAGER );
   
           try
           {
  -            m_extManager = (LifecycleExtensionManager)m_context.get( Container.EXTENSION_MANAGER
);
  +            m_extManager =
  +                (LifecycleExtensionManager)m_context.get( ContainerConstants.EXTENSION_MANAGER
);
           }
           catch( ContextException ce )
           {
  @@ -169,7 +171,7 @@
   
           try
           {
  -            m_commandQueue = (Queue)m_context.get( Container.COMMAND_QUEUE );
  +            m_commandQueue = (Queue)m_context.get( ContainerConstants.COMMAND_QUEUE );
   
               m_commandQueue.enqueue( new CheckTypeInfoCommand( m_jarEntries,
                                                                 m_services, m_types, m_loader,
this,
  @@ -185,7 +187,7 @@
               getLogger().error( "The CommandQueue is unable to enqueue the command", se
);
           }
   
  -        m_instrumentManager = (InstrumentManager)m_context.get( Container.INSTRUMENT_MANAGER
);
  +        m_instrumentManager = (InstrumentManager)m_context.get( ContainerConstants.INSTRUMENT_MANAGER
);
       }
   
       public void service( ServiceManager manager ) throws ServiceException
  
  
  
  1.26      +4 -3      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.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- AbstractComponentHandler.java	8 Nov 2002 00:33:41 -0000	1.25
  +++ AbstractComponentHandler.java	8 Nov 2002 01:58:31 -0000	1.26
  @@ -58,6 +58,7 @@
   import org.apache.avalon.framework.logger.Logger;
   import org.apache.avalon.framework.service.ServiceManager;
   import org.apache.excalibur.fortress.Container;
  +import org.apache.excalibur.fortress.ContainerConstants;
   import org.apache.excalibur.fortress.lifecycle.LifecycleExtensionManager;
   import org.apache.excalibur.instrument.AbstractInstrumentable;
   import org.apache.excalibur.instrument.InstrumentManager;
  @@ -132,9 +133,9 @@
                                        final Boolean isLazy )
           throws Exception
       {
  -        m_logkit = (LoggerManager)context.get( Container.LOGGER_MANAGER );
  +        m_logkit = (LoggerManager)context.get( ContainerConstants.LOGGER_MANAGER );
           InstrumentManager instrumentManager =
  -            (InstrumentManager)context.get( Container.INSTRUMENT_MANAGER );
  +            (InstrumentManager)context.get( ContainerConstants.INSTRUMENT_MANAGER );
           m_factory = new ComponentFactory( componentClass, config, service, context, m_logkit,
                                             extManager, instrumentManager );
           addChildInstrumentable( m_factory );
  
  
  
  1.36      +3 -2      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.35
  retrieving revision 1.36
  diff -u -r1.35 -r1.36
  --- PoolableComponentHandler.java	8 Nov 2002 00:23:18 -0000	1.35
  +++ PoolableComponentHandler.java	8 Nov 2002 01:58:31 -0000	1.36
  @@ -53,6 +53,7 @@
   import org.apache.avalon.framework.context.Context;
   import org.apache.avalon.framework.service.ServiceManager;
   import org.apache.excalibur.fortress.Container;
  +import org.apache.excalibur.fortress.ContainerConstants;
   import org.apache.excalibur.fortress.lifecycle.LifecycleExtensionManager;
   import org.apache.excalibur.mpool.Pool;
   import org.apache.excalibur.mpool.PoolManager;
  @@ -94,7 +95,7 @@
           super( componentClass, config, service, context, extManager, isLazy );
           m_poolMin = config.getAttributeAsInteger( "pool-min", 10 );
           m_logger = m_logkit.getLoggerForCategory( "system.handler.poolable" );
  -        m_poolManager = (PoolManager)context.get( Container.POOL_MANAGER );
  +        m_poolManager = (PoolManager)context.get( ContainerConstants.POOL_MANAGER );
           setInstrumentableName( "PoolableComponentHandler" );
       }
   
  
  
  
  1.29      +2 -2      jakarta-avalon-excalibur/fortress/src/test/org/apache/excalibur/fortress/test/ContainerProfile.java
  
  Index: ContainerProfile.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/fortress/src/test/org/apache/excalibur/fortress/test/ContainerProfile.java,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- ContainerProfile.java	7 Nov 2002 08:42:22 -0000	1.28
  +++ ContainerProfile.java	8 Nov 2002 01:58:31 -0000	1.29
  @@ -143,7 +143,7 @@
               .setLoggerManagerConfiguration( "resource://org/apache/excalibur/fortress/test/ContainerProfile.xlog"
)
               .setRoleManagerConfiguration( "resource://org/apache/excalibur/fortress/test/ContainerProfile.roles"
);
   
  -        ContainerManager cm = new DefaultContainerManager( contextBuilder.getContext(),
new NullLogger() );
  +        final ContainerManager cm = new DefaultContainerManager( contextBuilder.getContext(),
new NullLogger() );
           cm.initialize();
           DefaultContainer container = (DefaultContainer)cm.getContainer();
           assertNotNull( container );
  
  
  

--
To unsubscribe, e-mail:   <mailto:avalon-cvs-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-cvs-help@jakarta.apache.org>


Mime
View raw message