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 BlockEntry.java
Date Sat, 18 May 2002 09:03:49 GMT
donaldp     02/05/18 02:03:49

  Modified:    src/java/org/apache/avalon/phoenix/components/application
                        BlockEntry.java
  Log:
  Dont force entry to return a Block for proxy via the interface. However silently behind
the scenes it proxies using Block interface (but does not require implementaitons to use interface).
This will remain around while ComponentManager is supported in Phoenix.
  
  Revision  Changes    Path
  1.11      +11 -4     jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/components/application/BlockEntry.java
  
  Index: BlockEntry.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/components/application/BlockEntry.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- BlockEntry.java	15 May 2002 08:46:47 -0000	1.10
  +++ BlockEntry.java	18 May 2002 09:03:49 -0000	1.11
  @@ -7,7 +7,6 @@
    */
   package org.apache.avalon.phoenix.components.application;
   
  -import org.apache.avalon.phoenix.Block;
   import org.apache.avalon.phoenix.components.lifecycle.ComponentEntry;
   import org.apache.avalon.phoenix.metadata.BlockMetaData;
   import org.apache.avalon.phoenix.metainfo.BlockInfo;
  @@ -48,11 +47,11 @@
           super.setObject( object );
       }
   
  -    public synchronized Block getProxy()
  +    public synchronized Object getProxy()
       {
           if( null != m_invocationHandler )
           {
  -            return (Block)m_invocationHandler.getProxy();
  +            return m_invocationHandler.getProxy();
           }
           else
           {
  @@ -86,7 +85,15 @@
               }
           }
   
  -        classes[ services.length ] = Block.class;
  +        //Note that the proxy is still built using the
  +        //Block interface so that ComponentManaers can
  +        //still be used to provide blocks with services.
  +        //Block extends Component and thus the proxy
  +        //extends Component. The magic is that the Block
  +        //interface has no methods and thus will never cause
  +        //any issues for Proxy class.
  +        classes[ services.length ] =
  +            org.apache.avalon.phoenix.Block.class;
           return classes;
       }
   }
  
  
  

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