avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From co...@apache.org
Subject cvs commit: jakarta-avalon-phoenix/src/schema assembly.dtd
Date Sun, 18 Aug 2002 08:23:34 GMT
colus       2002/08/18 01:23:34

  Modified:    src/java/org/apache/avalon/phoenix/components/application
                        BlockEntry.java
               src/java/org/apache/avalon/phoenix/metadata
                        BlockMetaData.java
               src/java/org/apache/avalon/phoenix/tools/assembler
                        Assembler.java
               src/schema assembly.dtd
  Log:
  Support disabling export block via proxy.
  TODO: update DTD.
  
  No support export additional interfaces.
  No support interceptors.
  
  PR: 9270
  
  Revision  Changes    Path
  1.20      +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.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- BlockEntry.java	6 Aug 2002 11:57:39 -0000	1.19
  +++ BlockEntry.java	18 Aug 2002 08:23:33 -0000	1.20
  @@ -49,7 +49,7 @@
       {
           invalidate();
   
  -        if( null != object )
  +        if( null != object && ! getMetaData().isDisableProxy() )
           {
               final BlockInfo blockInfo = getMetaData().getBlockInfo();
               final Class[] interfaces = getServiceClasses( object, blockInfo.getServices()
);
  @@ -60,13 +60,20 @@
   
       public synchronized Object getProxy()
       {
  -        if( null != m_invocationHandler )
  +        if ( getMetaData().isDisableProxy() )
           {
  -            return m_invocationHandler.getProxy();
  +            return m_object;
           }
           else
           {
  -            return null;
  +            if( null != m_invocationHandler )
  +            {
  +                return m_invocationHandler.getProxy();
  +            }
  +            else
  +            {
  +                return null;
  +            }
           }
       }
   
  
  
  
  1.13      +10 -1     jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/metadata/BlockMetaData.java
  
  Index: BlockMetaData.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/metadata/BlockMetaData.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- BlockMetaData.java	6 Aug 2002 11:57:41 -0000	1.12
  +++ BlockMetaData.java	18 Aug 2002 08:23:33 -0000	1.13
  @@ -20,14 +20,18 @@
   
       private final DependencyMetaData[] m_dependencies;
   
  -    private BlockInfo m_blockInfo;
  +    private final boolean m_disableProxy;
  +
  +    private final BlockInfo m_blockInfo;
   
       public BlockMetaData( final String name,
                             final DependencyMetaData[] dependencies,
  +                          final boolean disableProxy, 
                             final BlockInfo blockInfo )
       {
           m_name = name;
           m_dependencies = dependencies;
  +        m_disableProxy = disableProxy;
           m_blockInfo = blockInfo;
       }
   
  @@ -62,5 +66,10 @@
       public DependencyMetaData[] getDependencies()
       {
           return m_dependencies;
  +    }
  +
  +    public boolean isDisableProxy()
  +    {
  +        return m_disableProxy;
       }
   }
  
  
  
  1.19      +5 -2      jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/tools/assembler/Assembler.java
  
  Index: Assembler.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/tools/assembler/Assembler.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- Assembler.java	6 Aug 2002 11:57:42 -0000	1.18
  +++ Assembler.java	18 Aug 2002 08:23:34 -0000	1.19
  @@ -119,12 +119,15 @@
               final String name = block.getAttribute( "name" );
               final String classname = block.getAttribute( "class" );
               final Configuration[] provides = block.getChildren( "provide" );
  +            final Configuration proxy = block.getChild( "proxy" );
  +            final boolean disableProxy =
  +                proxy.getAttributeAsBoolean( "disable", false );
   
               final DependencyMetaData[] roles = buildDependencyMetaDatas( provides );
               final BlockInfo info = getBlockInfo( name, classname, classLoader );
   
   
  -            return new BlockMetaData( name, roles, info );
  +            return new BlockMetaData( name, roles, disableProxy, info );
           }
           catch( final ConfigurationException ce )
           {
  
  
  
  1.4       +10 -1     jakarta-avalon-phoenix/src/schema/assembly.dtd
  
  Index: assembly.dtd
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-phoenix/src/schema/assembly.dtd,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- assembly.dtd	6 Aug 2002 11:13:42 -0000	1.3
  +++ assembly.dtd	18 Aug 2002 08:23:34 -0000	1.4
  @@ -35,8 +35,9 @@
   
   provide         declare that particular blocks that will provide
                   the block with particular services
  +proxy           TODO:description
   -->
  -<!ELEMENT block (provide*)>
  +<!ELEMENT block (provide*,proxy?)>
     <!ATTLIST block class CDATA #REQUIRED>
     <!ATTLIST block name CDATA #REQUIRED>
   
  @@ -50,6 +51,14 @@
   <!ELEMENT provide EMPTY>
     <!ATTLIST provide role CDATA #REQUIRED>
     <!ATTLIST provide name CDATA #REQUIRED>
  +
  +<!--
  +TODO:description
  +
  +disable TODO:description
  +-->
  +<!ELEMENT proxy EMPTY>
  +  <!ATTLIST proxy disable CDATA #REQUIRED>
   
   <!--
   The block element declares a listener exists in the application.
  
  
  

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