You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@avalon.apache.org by le...@apache.org on 2002/08/21 07:04:36 UTC

cvs commit: jakarta-avalon-excalibur/component/src/java/org/apache/avalon/excalibur/component DefaultComponentHandler.java

leif        2002/08/20 22:04:36

  Modified:    component/src/java/org/apache/avalon/excalibur/component
                        DefaultComponentHandler.java
  Log:
  Checkstyle fixes.
  
  Revision  Changes    Path
  1.3       +31 -8     jakarta-avalon-excalibur/component/src/java/org/apache/avalon/excalibur/component/DefaultComponentHandler.java
  
  Index: DefaultComponentHandler.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/component/src/java/org/apache/avalon/excalibur/component/DefaultComponentHandler.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DefaultComponentHandler.java	2 Jun 2002 06:03:01 -0000	1.2
  +++ DefaultComponentHandler.java	21 Aug 2002 05:04:36 -0000	1.3
  @@ -39,6 +39,17 @@
        * 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 Class of the component of the handler being
  +     *                       created.
  +     * @param config The configuration for the component.
  +     * @param manager The ComponentManager which will be managing the
  +     *                Component.
  +     * @param context The current context.
  +     * @param roles The current RoleManager.
  +     * @param logkit The current LogKitLoggerManager.
  +     *
  +     * @throws Exception If there are any problems creating the handler.
        */
       protected DefaultComponentHandler( final Class componentClass,
                                          final Configuration config,
  @@ -60,6 +71,8 @@
        * @param factory The factory object which is responsible for creating the components
        *                managed by the ComponentHandler.
        * @param config The configuration to use to configure the pool.
  +     *
  +     * @throws Exception If there are any problems creating the handler.
        */
       public DefaultComponentHandler( final DefaultComponentFactory factory,
                                       final Configuration config )
  @@ -82,20 +95,27 @@
   
           if( getLogger().isDebugEnabled() )
           {
  -            getLogger().debug( "ComponentHandler initialized for: " + m_factory.getCreatedClass().getName() );
  +            getLogger().debug( "ComponentHandler initialized for: "
  +                + m_factory.getCreatedClass().getName() );
           }
           m_initialized = true;
       }
   
       /**
        * Get a reference of the desired Component
  +     *
  +     * @return A component instance.
  +     *
  +     * @throws Exception If there are any problems encountered acquiring a
  +     *                   component instance.
        */
       protected Component doGet()
           throws Exception
       {
           if( !m_initialized )
           {
  -            throw new IllegalStateException( "You cannot get a component from an uninitialized holder." );
  +            throw new IllegalStateException(
  +                "You cannot get a component from an uninitialized holder." );
           }
   
           if( m_disposed )
  @@ -108,12 +128,15 @@
   
       /**
        * Return a reference of the desired Component
  +     *
  +     * @param component Component to be be put/released back to the handler.
        */
       protected void doPut( final Component component )
       {
           if( !m_initialized )
           {
  -            throw new IllegalStateException( "You cannot put a component in an uninitialized holder." );
  +            throw new IllegalStateException(
  +                "You cannot put a component in an uninitialized holder." );
           }
   
           try
  @@ -124,8 +147,8 @@
           {
               if( getLogger().isWarnEnabled() )
               {
  -                getLogger().warn( "Error decommissioning component: " +
  -                                  m_factory.getCreatedClass().getName(), e );
  +                getLogger().warn( "Error decommissioning component: "
  +                    + m_factory.getCreatedClass().getName(), e );
               }
           }
       }
  @@ -148,8 +171,8 @@
           {
               if( getLogger().isWarnEnabled() )
               {
  -                getLogger().warn( "Error decommissioning component: " +
  -                                  m_factory.getCreatedClass().getName(), e );
  +                getLogger().warn( "Error decommissioning component: "
  +                    + m_factory.getCreatedClass().getName(), e );
               }
           }
   
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>