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-phoenix/src/java/org/apache/avalon/phoenix/components/application ListenerAccessor.java
Date Sun, 19 May 2002 02:03:03 GMT
donaldp     02/05/18 19:03:02

  Modified:    src/java/org/apache/avalon/phoenix/components/application
                        ListenerAccessor.java
  Log:
  Add convenience method to retrieve metadata from entry
  
  Revision  Changes    Path
  1.2       +14 -3     jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/components/application/ListenerAccessor.java
  
  Index: ListenerAccessor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/components/application/ListenerAccessor.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ListenerAccessor.java	19 May 2002 02:00:43 -0000	1.1
  +++ ListenerAccessor.java	19 May 2002 02:03:02 -0000	1.2
  @@ -27,7 +27,7 @@
    * Block or Listener.
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.1 $ $Date: 2002/05/19 02:00:43 $
  + * @version $Revision: 1.2 $ $Date: 2002/05/19 02:03:02 $
    */
   public class ListenerAccessor
       extends AbstractLogEnabled
  @@ -78,7 +78,7 @@
       public Logger createLogger( final Object entry )
           throws Exception
       {
  -        final BlockListenerMetaData metaData = (BlockListenerMetaData)entry;
  +        final BlockListenerMetaData metaData = getMetaData( entry );
           final String name = metaData.getName();
           return new LogKitLogger( m_context.getLogger( name ) );
       }
  @@ -113,7 +113,7 @@
       public Configuration createConfiguration( final Object entry )
           throws Exception
       {
  -        final BlockListenerMetaData metaData = (BlockListenerMetaData)entry;
  +        final BlockListenerMetaData metaData = getMetaData( entry );
           final String name = metaData.getName();
           try
           {
  @@ -138,5 +138,16 @@
               Parameters.fromConfiguration( configuration );
           parameters.makeReadOnly();
           return parameters;
  +    }
  +
  +    /**
  +     * Get meta data for entry.
  +     *
  +     * @param entry the entry
  +     * @return the metadata
  +     */
  +    private BlockListenerMetaData getMetaData( final Object entry )
  +    {
  +        return (BlockListenerMetaData)entry;
       }
   }
  
  
  

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