avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcconn...@apache.org
Subject svn commit: rev 22819 - in avalon/trunk/runtime/composition: impl/src/java/org/apache/avalon/composition/model/impl spi/src/java/org/apache/avalon/composition/provider
Date Sun, 11 Jul 2004 17:24:02 GMT
Author: mcconnell
Date: Sun Jul 11 10:24:02 2004
New Revision: 22819

Modified:
   avalon/trunk/runtime/composition/impl/src/java/org/apache/avalon/composition/model/impl/DefaultContainmentModel.java
   avalon/trunk/runtime/composition/impl/src/java/org/apache/avalon/composition/model/impl/DefaultSystemContext.java
   avalon/trunk/runtime/composition/impl/src/java/org/apache/avalon/composition/model/impl/DefaultSystemContextFactory.java
   avalon/trunk/runtime/composition/spi/src/java/org/apache/avalon/composition/provider/SystemContext.java
   avalon/trunk/runtime/composition/spi/src/java/org/apache/avalon/composition/provider/SystemContextFactory.java
Log:
add proxy enablement flag support

Modified: avalon/trunk/runtime/composition/impl/src/java/org/apache/avalon/composition/model/impl/DefaultContainmentModel.java
==============================================================================
--- avalon/trunk/runtime/composition/impl/src/java/org/apache/avalon/composition/model/impl/DefaultContainmentModel.java
(original)
+++ avalon/trunk/runtime/composition/impl/src/java/org/apache/avalon/composition/model/impl/DefaultContainmentModel.java
Sun Jul 11 10:24:02 2004
@@ -46,6 +46,7 @@
 import org.apache.avalon.composition.model.ClassLoaderModel;
 import org.apache.avalon.composition.model.ContainmentModel;
 import org.apache.avalon.composition.model.DependencyGraph;
+import org.apache.avalon.composition.model.DuplicateNameException;
 import org.apache.avalon.composition.model.ComponentModel;
 import org.apache.avalon.composition.model.DeploymentModel;
 import org.apache.avalon.composition.model.ModelException;
@@ -831,7 +832,7 @@
     //--------------------------------------------------------------
 
     private DeploymentModel addModel( 
-      String name, DeploymentModel model )
+      String name, DeploymentModel model ) throws DuplicateNameException
     {
         if( model.equals( this ) ) 
             return model;

Modified: avalon/trunk/runtime/composition/impl/src/java/org/apache/avalon/composition/model/impl/DefaultSystemContext.java
==============================================================================
--- avalon/trunk/runtime/composition/impl/src/java/org/apache/avalon/composition/model/impl/DefaultSystemContext.java
(original)
+++ avalon/trunk/runtime/composition/impl/src/java/org/apache/avalon/composition/model/impl/DefaultSystemContext.java
Sun Jul 11 10:24:02 2004
@@ -89,6 +89,8 @@
 
     private final boolean m_secure;
 
+    private final boolean m_proxies;
+
     //--------------------------------------------------------------
     // mutable state
     //--------------------------------------------------------------
@@ -116,6 +118,7 @@
     *   resource directives
     * @param category the kernel logging category name
     * @param trace flag indicating if internal logging is enabled
+    * @param proxies flag indicating if proxy creation is enabled
     * @param timeout a system wide default deployment timeout
     * @param security the security profiles
     */
@@ -133,6 +136,7 @@
       Repository repository, 
       String category, 
       boolean trace, 
+      boolean proxies, 
       long timeout, 
       boolean secure, 
       SecurityProfile[] security,
@@ -160,7 +164,8 @@
         m_home = home;
         m_temp = temp;
         m_anchor = anchor;
-        m_trace = trace;
+        m_trace = trace;
+        m_proxies = proxies;
         m_repository = repository;
         m_logging = logging;
         m_timeout = timeout;
@@ -308,6 +313,16 @@
         return m_trace;
     }
 
+   /**
+    * Return the system proxy enablement flag.
+    *
+    * @return the proxy flag
+    */
+    public boolean isProxyEnabled()
+    {
+        return m_proxies;
+    }
+
    /**
     * Set the system trace flag.
     *

Modified: avalon/trunk/runtime/composition/impl/src/java/org/apache/avalon/composition/model/impl/DefaultSystemContextFactory.java
==============================================================================
--- avalon/trunk/runtime/composition/impl/src/java/org/apache/avalon/composition/model/impl/DefaultSystemContextFactory.java
(original)
+++ avalon/trunk/runtime/composition/impl/src/java/org/apache/avalon/composition/model/impl/DefaultSystemContextFactory.java
Sun Jul 11 10:24:02 2004
@@ -99,7 +99,9 @@
 
     private Context m_parent;
 
-    private boolean m_secure = false;
+    private boolean m_secure = false;
+
+    private boolean m_proxies = true;
 
     //--------------------------------------------------------------
     // constructor
@@ -130,6 +132,19 @@
     {
         m_secure = secure;
     }
+
+   /**
+    * Set the system wide default for proxy creation.  The default value
+    * is TRUE enabling automation of component finalization and improved
+    * memory management.
+    *
+    * @param flag if TRUE (the default) proxy generation is enabled on
+    *   all components otherwise proxy creation is disabled.
+    */
+    public void setDefaultProxyPolicy( boolean flag )
+    {
+        m_proxies = flag;
+    }
 
    /**
     * Set the parent context of the system context.  If undefined
@@ -255,6 +270,7 @@
           getRepository(), 
           getName(), 
           isTraceEnabled(), 
+          isProxyEnabled(),
           getDefaultDeploymentTimeout(), 
           getSecurityEnabled(),
           getSecurityProfiles(), 
@@ -391,7 +407,17 @@
     {
         return m_trace;
     }
-
+
+   /**
+    * Return the proxy enabled flag.
+    *
+    * @return the proxy enablement flag
+    */
+    public boolean isProxyEnabled()
+    {
+        return m_proxies;
+    }
+
    /**
     * Return the logging manager.
     *

Modified: avalon/trunk/runtime/composition/spi/src/java/org/apache/avalon/composition/provider/SystemContext.java
==============================================================================
--- avalon/trunk/runtime/composition/spi/src/java/org/apache/avalon/composition/provider/SystemContext.java
(original)
+++ avalon/trunk/runtime/composition/spi/src/java/org/apache/avalon/composition/provider/SystemContext.java
Sun Jul 11 10:24:02 2004
@@ -88,7 +88,14 @@
     *
     * @return the trace flag
     */
-    boolean isTraceEnabled();
+    boolean isTraceEnabled();
+
+   /**
+    * Return the system proxy enablement flag.
+    *
+    * @return the proxy flag
+    */
+    boolean isProxyEnabled();
 
    /**
     * Return the SPI classloader.

Modified: avalon/trunk/runtime/composition/spi/src/java/org/apache/avalon/composition/provider/SystemContextFactory.java
==============================================================================
--- avalon/trunk/runtime/composition/spi/src/java/org/apache/avalon/composition/provider/SystemContextFactory.java
(original)
+++ avalon/trunk/runtime/composition/spi/src/java/org/apache/avalon/composition/provider/SystemContextFactory.java
Sun Jul 11 10:24:02 2004
@@ -92,6 +92,16 @@
     * @param timeout the timeout value in milliseconds
     */
     void setDefaultDeploymentTimeout( long timeout );
+
+   /**
+    * Set the system wide default for proxy creation.  The default value
+    * is TRUE enabling automation of component finalization and improved
+    * memory management.
+    *
+    * @param flag if TRUE (the default) proxy generation is enabled on
+    *   all components otherwise proxy creation is disabled.
+    */
+    void setDefaultProxyPolicy( boolean flag );
 
    /**
     * Set the system trace flag.

---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@avalon.apache.org
For additional commands, e-mail: cvs-help@avalon.apache.org


Mime
View raw message