avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcconn...@apache.org
Subject cvs commit: jakarta-avalon/src/java/org/apache/avalon/framework/service DefaultServiceManager.java
Date Thu, 21 Feb 2002 17:03:47 GMT
mcconnell    02/02/21 09:03:47

  Modified:    src/java/org/apache/avalon/framework/service
                        DefaultServiceManager.java
  Log:
  purged "component" in doc and replaced getComponent with getObjects
  
  Revision  Changes    Path
  1.2       +18 -18    jakarta-avalon/src/java/org/apache/avalon/framework/service/DefaultServiceManager.java
  
  Index: DefaultServiceManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon/src/java/org/apache/avalon/framework/service/DefaultServiceManager.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DefaultServiceManager.java	21 Feb 2002 04:36:35 -0000	1.1
  +++ DefaultServiceManager.java	21 Feb 2002 17:03:47 -0000	1.2
  @@ -23,7 +23,7 @@
   public class DefaultServiceManager
       implements ServiceManager
   {
  -    private final HashMap               m_components = new HashMap();
  +    private final HashMap               m_objects = new HashMap();
       private final ServiceManager        m_parent;
       private boolean                     m_readOnly;
   
  @@ -56,11 +56,11 @@
       public Object lookup( final String role )
           throws ServiceException
       {
  -        final Object component = m_components.get( role );
  +        final Object object = m_objects.get( role );
   
  -        if( null != component )
  +        if( null != object )
           {
  -            return component;
  +            return object;
           }
           else if( null != m_parent )
           {
  @@ -73,22 +73,22 @@
       }
   
       public boolean hasService( final String role ) {
  -        boolean componentExists = false;
  +        boolean objectExists = false;
   
           try
           {
               this.lookup(role);
  -            componentExists = true;
  +            objectExists = true;
           }
           catch (Throwable t)
           {
               // Ignore all throwables--we want a yes or no answer.
           }
  -        return componentExists;
  +        return objectExists;
       }
   
       /**
  -     * Place Component into ComponentManager.
  +     * Place Object into ComponentManager.
        *
        * @param role the components role
        * @param component the component
  @@ -96,24 +96,24 @@
       public void put( final String role, final Object object )
       {
           checkWriteable();
  -        m_components.put( role, object );
  +        m_objects.put( role, object );
       }
   
       /**
  -     * Build a human readable representation of ComponentManager2.
  +     * Build a human readable representation of the ServiceManager.
        *
  -     * @return the description of ComponentManager2
  +     * @return the description of the ServiceManager
        */
       public String toString()
       {
           final StringBuffer buffer = new StringBuffer();
  -        final Iterator components = m_components.keySet().iterator();
  +        final Iterator objects = m_objects.keySet().iterator();
           buffer.append( "Services:" );
   
  -        while( components.hasNext() )
  +        while( objects.hasNext() )
           {
               buffer.append( "[" );
  -            buffer.append( components.next() );
  +            buffer.append( objects.next() );
               buffer.append( "]" );
           }
   
  @@ -131,13 +131,13 @@
       }
   
       /**
  -     * Helper method for subclasses to retrieve component map.
  +     * Helper method for subclasses to retrieve object map.
        *
  -     * @return the component map
  +     * @return the object map
        */
  -    protected final Map getComponentMap()
  +    protected final Map getObjectMap()
       {
  -        return m_components;
  +        return m_objects;
       }
   
       public void makeReadOnly()
  
  
  

--
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