felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r567699 - /felix/trunk/eventadmin/impl/src/main/java/org/apache/felix/eventadmin/impl/Activator.java
Date Mon, 20 Aug 2007 13:29:15 GMT
Author: cziegeler
Date: Mon Aug 20 06:29:14 2007
New Revision: 567699

URL: http://svn.apache.org/viewvc?rev=567699&view=rev
Log:
Move object creation to separate method to allow easier sub classing.

Modified:
    felix/trunk/eventadmin/impl/src/main/java/org/apache/felix/eventadmin/impl/Activator.java

Modified: felix/trunk/eventadmin/impl/src/main/java/org/apache/felix/eventadmin/impl/Activator.java
URL: http://svn.apache.org/viewvc/felix/trunk/eventadmin/impl/src/main/java/org/apache/felix/eventadmin/impl/Activator.java?rev=567699&r1=567698&r2=567699&view=diff
==============================================================================
--- felix/trunk/eventadmin/impl/src/main/java/org/apache/felix/eventadmin/impl/Activator.java
(original)
+++ felix/trunk/eventadmin/impl/src/main/java/org/apache/felix/eventadmin/impl/Activator.java
Mon Aug 20 06:29:14 2007
@@ -224,9 +224,9 @@
         m_asyncQueue = new TaskHandler();
 
         m_syncQueue = new TaskHandler();
-        
-        m_admin = new EventAdminImpl(handlerTasks, 
-            createAsyncExecuters(m_asyncQueue, m_syncQueue, scheduler, m_pool), 
+
+        m_admin = createEventAdmin(handlerTasks,
+            createAsyncExecuters(m_asyncQueue, m_syncQueue, scheduler, m_pool),
             createSyncExecuters(m_syncQueue, scheduler, m_pool));
 
         // register the admin wrapped in a service factory (SecureEventAdminFactory)
@@ -291,7 +291,22 @@
 
         m_pool = null;
     }
-    
+
+
+    /**
+     * Create a event admin implementation.
+     * @param handlerTasks
+     * @param asyncExecuters
+     * @param syncExecuters
+     * @return
+     */
+    protected EventAdminImpl createEventAdmin(HandlerTasks handlerTasks,
+                                              DeliverTasks asyncExecuters,
+                                              DeliverTasks syncExecuters)
+    {
+        return new EventAdminImpl(handlerTasks, asyncExecuters, syncExecuters);
+    }
+
     /*
      * Create an AsyncDeliverTasks object that is used to dispatch asynchronous
      * events. Additionally, the asynchronous dispatch queue is initialized and



Mime
View raw message