sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tomm...@apache.org
Subject svn commit: r1638734 - in /sling/trunk/contrib/extensions/distribution: api/src/main/java/org/apache/sling/distribution/component/ api/src/main/java/org/apache/sling/distribution/queue/ core/src/main/java/org/apache/sling/distribution/agent/impl/ core/...
Date Wed, 12 Nov 2014 10:28:06 GMT
Author: tommaso
Date: Wed Nov 12 10:28:06 2014
New Revision: 1638734

URL: http://svn.apache.org/r1638734
Log:
SLING-4153 - ManagedDC extending from DC, renaming DQueueDistributionStrategy to DQueueDispatchingStrategy

Added:
    sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/queue/DistributionQueueDispatchingStrategy.java
      - copied, changed from r1638130, sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/queue/DistributionQueueDistributionStrategy.java
    sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/queue/impl/ErrorAwareQueueDispatchingStrategy.java
      - copied, changed from r1638130, sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/queue/impl/ErrorAwareQueueDistributionStrategy.java
    sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/queue/impl/PriorityPathQueueDispatchingStrategy.java
      - copied, changed from r1638130, sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/queue/impl/PriorityPathDistributionStrategy.java
    sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/queue/impl/SingleQueueDispatchingStrategy.java
      - copied, changed from r1638130, sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/queue/impl/SingleQueueDistributionStrategy.java
Removed:
    sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/queue/DistributionQueueDistributionStrategy.java
    sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/queue/impl/ErrorAwareQueueDistributionStrategy.java
    sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/queue/impl/PriorityPathDistributionStrategy.java
    sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/queue/impl/SingleQueueDistributionStrategy.java
Modified:
    sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/component/ManagedDistributionComponent.java
    sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/agent/impl/CoordinatingDistributionAgentFactory.java
    sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/agent/impl/SimpleDistributionAgent.java
    sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/agent/impl/SimpleDistributionAgentFactory.java
    sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/component/impl/DefaultDistributionComponentFactory.java
    sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/component/impl/DefaultDistributionComponentProvider.java
    sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/servlet/DistributionAgentQueueServlet.java
    sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/trigger/impl/AbstractJcrEventTrigger.java
    sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/trigger/impl/ResourceEventDistributionTrigger.java
    sling/trunk/contrib/extensions/distribution/core/src/test/java/org/apache/sling/distribution/agent/impl/SimpleDistributionAgentTest.java
    sling/trunk/contrib/extensions/distribution/core/src/test/java/org/apache/sling/distribution/queue/impl/ErrorAwareQueueDistributionStrategyTest.java
    sling/trunk/contrib/extensions/distribution/core/src/test/java/org/apache/sling/distribution/queue/impl/PriorityPathQueueDistributionStrategyTest.java
    sling/trunk/contrib/extensions/distribution/core/src/test/java/org/apache/sling/distribution/queue/impl/SingleQueueDistributionStrategyTest.java

Modified: sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/component/ManagedDistributionComponent.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/component/ManagedDistributionComponent.java?rev=1638734&r1=1638733&r2=1638734&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/component/ManagedDistributionComponent.java (original)
+++ sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/component/ManagedDistributionComponent.java Wed Nov 12 10:28:06 2014
@@ -25,7 +25,7 @@ import aQute.bnd.annotation.ConsumerType
  * initialization and releasing of its underlying (and implementation specific) resources.
  */
 @ConsumerType
-public interface ManagedDistributionComponent {
+public interface ManagedDistributionComponent extends DistributionComponent {
 
     /**
      * Enable the component

Copied: sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/queue/DistributionQueueDispatchingStrategy.java (from r1638130, sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/queue/DistributionQueueDistributionStrategy.java)
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/queue/DistributionQueueDispatchingStrategy.java?p2=sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/queue/DistributionQueueDispatchingStrategy.java&p1=sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/queue/DistributionQueueDistributionStrategy.java&r1=1638130&r2=1638734&rev=1638734&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/queue/DistributionQueueDistributionStrategy.java (original)
+++ sling/trunk/contrib/extensions/distribution/api/src/main/java/org/apache/sling/distribution/queue/DistributionQueueDispatchingStrategy.java Wed Nov 12 10:28:06 2014
@@ -26,11 +26,11 @@ import org.apache.sling.distribution.com
 import org.apache.sling.distribution.packaging.DistributionPackage;
 
 /**
- * a {@link DistributionQueueDistributionStrategy} implements an algorithm for the distribution of
+ * a {@link DistributionQueueDispatchingStrategy} implements an algorithm for dispatching
  * {@link org.apache.sling.distribution.packaging.DistributionPackage}s among the available queues
  */
 @ConsumerType
-public interface DistributionQueueDistributionStrategy extends DistributionComponent {
+public interface DistributionQueueDispatchingStrategy extends DistributionComponent {
     String DEFAULT_QUEUE_NAME = "default";
 
     /**

Modified: sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/agent/impl/CoordinatingDistributionAgentFactory.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/agent/impl/CoordinatingDistributionAgentFactory.java?rev=1638734&r1=1638733&r2=1638734&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/agent/impl/CoordinatingDistributionAgentFactory.java (original)
+++ sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/agent/impl/CoordinatingDistributionAgentFactory.java Wed Nov 12 10:28:06 2014
@@ -39,9 +39,9 @@ import org.apache.sling.distribution.com
 import org.apache.sling.distribution.component.ManagedDistributionComponent;
 import org.apache.sling.distribution.component.impl.SettingsUtils;
 import org.apache.sling.distribution.event.impl.DistributionEventFactory;
-import org.apache.sling.distribution.queue.DistributionQueueDistributionStrategy;
+import org.apache.sling.distribution.queue.DistributionQueueDispatchingStrategy;
 import org.apache.sling.distribution.queue.DistributionQueueProvider;
-import org.apache.sling.distribution.queue.impl.SingleQueueDistributionStrategy;
+import org.apache.sling.distribution.queue.impl.SingleQueueDispatchingStrategy;
 import org.apache.sling.distribution.queue.impl.jobhandling.JobHandlingDistributionQueueProvider;
 import org.apache.sling.distribution.resources.impl.OsgiUtils;
 import org.apache.sling.distribution.transport.authentication.TransportAuthenticationProvider;
@@ -196,8 +196,8 @@ public class CoordinatingDistributionAge
                                                                                    @Nullable String componentName) {
         if (type.isAssignableFrom(DistributionQueueProvider.class)) {
             return (ComponentType) new JobHandlingDistributionQueueProvider(agentName, jobManager, savedContext);
-        } else if (type.isAssignableFrom(DistributionQueueDistributionStrategy.class)) {
-            return (ComponentType) new SingleQueueDistributionStrategy();
+        } else if (type.isAssignableFrom(DistributionQueueDispatchingStrategy.class)) {
+            return (ComponentType) new SingleQueueDispatchingStrategy();
         } else if (type.isAssignableFrom(TransportAuthenticationProvider.class)) {
             return (ComponentType) transportAuthenticationProvider;
         }

Modified: sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/agent/impl/SimpleDistributionAgent.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/agent/impl/SimpleDistributionAgent.java?rev=1638734&r1=1638733&r2=1638734&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/agent/impl/SimpleDistributionAgent.java (original)
+++ sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/agent/impl/SimpleDistributionAgent.java Wed Nov 12 10:28:06 2014
@@ -47,7 +47,7 @@ import org.apache.sling.distribution.pac
 import org.apache.sling.distribution.packaging.DistributionPackageImporter;
 import org.apache.sling.distribution.packaging.SharedDistributionPackage;
 import org.apache.sling.distribution.queue.DistributionQueue;
-import org.apache.sling.distribution.queue.DistributionQueueDistributionStrategy;
+import org.apache.sling.distribution.queue.DistributionQueueDispatchingStrategy;
 import org.apache.sling.distribution.queue.DistributionQueueException;
 import org.apache.sling.distribution.queue.DistributionQueueItem;
 import org.apache.sling.distribution.queue.DistributionQueueItemState;
@@ -72,7 +72,7 @@ public class SimpleDistributionAgent imp
     private final DistributionPackageImporter distributionPackageImporter;
     private final DistributionPackageExporter distributionPackageExporter;
 
-    private final DistributionQueueDistributionStrategy queueDistributionStrategy;
+    private final DistributionQueueDispatchingStrategy queueDistributionStrategy;
 
     private final DistributionEventFactory distributionEventFactory;
 
@@ -92,7 +92,7 @@ public class SimpleDistributionAgent imp
                                    DistributionPackageExporter distributionPackageExporter,
                                    DistributionRequestAuthorizationStrategy distributionRequestAuthorizationStrategy,
                                    DistributionQueueProvider queueProvider,
-                                   DistributionQueueDistributionStrategy queueDistributionStrategy,
+                                   DistributionQueueDispatchingStrategy queueDistributionStrategy,
                                    DistributionEventFactory distributionEventFactory,
                                    ResourceResolverFactory resourceResolverFactory,
                                    List<DistributionTrigger> triggers) {
@@ -210,7 +210,7 @@ public class SimpleDistributionAgent imp
             if (queueName.length() > 0) {
                 queue = queueProvider.getQueue(queueName);
             } else {
-                queue = queueProvider.getQueue(DistributionQueueDistributionStrategy.DEFAULT_QUEUE_NAME);
+                queue = queueProvider.getQueue(DistributionQueueDispatchingStrategy.DEFAULT_QUEUE_NAME);
             }
         } catch (DistributionQueueException e) {
             throw new DistributionAgentException(e);

Modified: sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/agent/impl/SimpleDistributionAgentFactory.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/agent/impl/SimpleDistributionAgentFactory.java?rev=1638734&r1=1638733&r2=1638734&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/agent/impl/SimpleDistributionAgentFactory.java (original)
+++ sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/agent/impl/SimpleDistributionAgentFactory.java Wed Nov 12 10:28:06 2014
@@ -41,9 +41,9 @@ import org.apache.sling.distribution.com
 import org.apache.sling.distribution.component.ManagedDistributionComponent;
 import org.apache.sling.distribution.component.impl.SettingsUtils;
 import org.apache.sling.distribution.event.impl.DistributionEventFactory;
-import org.apache.sling.distribution.queue.DistributionQueueDistributionStrategy;
+import org.apache.sling.distribution.queue.DistributionQueueDispatchingStrategy;
 import org.apache.sling.distribution.queue.DistributionQueueProvider;
-import org.apache.sling.distribution.queue.impl.SingleQueueDistributionStrategy;
+import org.apache.sling.distribution.queue.impl.SingleQueueDispatchingStrategy;
 import org.apache.sling.distribution.queue.impl.jobhandling.JobHandlingDistributionQueueProvider;
 import org.apache.sling.distribution.resources.impl.OsgiUtils;
 import org.apache.sling.distribution.transport.authentication.TransportAuthenticationProvider;
@@ -197,8 +197,8 @@ public class SimpleDistributionAgentFact
         if (type.isAssignableFrom(DistributionQueueProvider.class)) {
             return (ComponentType) new JobHandlingDistributionQueueProvider(agentName, jobManager, savedContext);
         }
-        else if (type.isAssignableFrom(DistributionQueueDistributionStrategy.class)) {
-            return (ComponentType) new SingleQueueDistributionStrategy();
+        else if (type.isAssignableFrom(DistributionQueueDispatchingStrategy.class)) {
+            return (ComponentType) new SingleQueueDispatchingStrategy();
         }
         else if (type.isAssignableFrom(TransportAuthenticationProvider.class)) {
             return (ComponentType) transportAuthenticationProvider;

Modified: sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/component/impl/DefaultDistributionComponentFactory.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/component/impl/DefaultDistributionComponentFactory.java?rev=1638734&r1=1638733&r2=1638734&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/component/impl/DefaultDistributionComponentFactory.java (original)
+++ sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/component/impl/DefaultDistributionComponentFactory.java Wed Nov 12 10:28:06 2014
@@ -24,7 +24,6 @@ import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
-import java.util.Random;
 
 import org.apache.felix.scr.annotations.Activate;
 import org.apache.felix.scr.annotations.Component;
@@ -50,10 +49,10 @@ import org.apache.sling.distribution.pac
 import org.apache.sling.distribution.packaging.impl.exporter.RemoteDistributionPackageExporter;
 import org.apache.sling.distribution.packaging.impl.importer.LocalDistributionPackageImporter;
 import org.apache.sling.distribution.packaging.impl.importer.RemoteDistributionPackageImporter;
-import org.apache.sling.distribution.queue.DistributionQueueDistributionStrategy;
+import org.apache.sling.distribution.queue.DistributionQueueDispatchingStrategy;
 import org.apache.sling.distribution.queue.DistributionQueueProvider;
-import org.apache.sling.distribution.queue.impl.PriorityPathDistributionStrategy;
-import org.apache.sling.distribution.queue.impl.SingleQueueDistributionStrategy;
+import org.apache.sling.distribution.queue.impl.PriorityPathQueueDispatchingStrategy;
+import org.apache.sling.distribution.queue.impl.SingleQueueDispatchingStrategy;
 import org.apache.sling.distribution.queue.impl.jobhandling.JobHandlingDistributionQueueProvider;
 import org.apache.sling.distribution.queue.impl.simple.SimpleDistributionQueueProvider;
 import org.apache.sling.distribution.serialization.DistributionPackageBuilder;
@@ -159,7 +158,7 @@ public class DefaultDistributionComponen
             DistributionRequestAuthorizationStrategy packageExporterStrategy = createAuthorizationStrategy(authorizationStrategyProperties, componentProvider);
 
             Map<String, Object> queueDistributionStrategyProperties = extractMap(COMPONENT_QUEUE_DISTRIBUTION_STRATEGY, properties);
-            DistributionQueueDistributionStrategy queueDistributionStrategy = createDistributionStrategy(queueDistributionStrategyProperties, componentProvider);
+            DistributionQueueDispatchingStrategy queueDistributionStrategy = createDistributionStrategy(queueDistributionStrategyProperties, componentProvider);
 
             Map<String, Object> queueProviderProperties = extractMap(COMPONENT_QUEUE_PROVIDER, properties);
             queueProviderProperties.put(QUEUE_PROVIDER_PROPERTY_QUEUE_PREFIX, agentName);
@@ -281,20 +280,20 @@ public class DefaultDistributionComponen
         return null;
     }
 
-    DistributionQueueDistributionStrategy createDistributionStrategy(Map<String, Object> properties, DistributionComponentProvider componentProvider) {
+    DistributionQueueDispatchingStrategy createDistributionStrategy(Map<String, Object> properties, DistributionComponentProvider componentProvider) {
         String factory = PropertiesUtil.toString(properties.get(COMPONENT_TYPE), COMPONENT_TYPE_SERVICE);
 
         if (COMPONENT_TYPE_SERVICE.equals(factory)) {
             String name = PropertiesUtil.toString(properties.get(COMPONENT_NAME), null);
-            return componentProvider.getComponent(DistributionQueueDistributionStrategy.class, name);
+            return componentProvider.getComponent(DistributionQueueDispatchingStrategy.class, name);
         }
         else if (QUEUE_DISTRIBUTION_STRATEGY_SINGLE.equals(factory)) {
-            return new SingleQueueDistributionStrategy();
+            return new SingleQueueDispatchingStrategy();
         }
         else if (QUEUE_DISTRIBUTION_STRATEGY_PRIORITY.equals(factory)) {
             String[] priorityPaths = PropertiesUtil.toStringArray(properties.get(QUEUE_DISTRIBUTION_STRATEGY_PRIORITY_PROPERTY_PATHS), null);
 
-            return new PriorityPathDistributionStrategy(priorityPaths);
+            return new PriorityPathQueueDispatchingStrategy(priorityPaths);
         }
 
         return null;

Modified: sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/component/impl/DefaultDistributionComponentProvider.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/component/impl/DefaultDistributionComponentProvider.java?rev=1638734&r1=1638733&r2=1638734&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/component/impl/DefaultDistributionComponentProvider.java (original)
+++ sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/component/impl/DefaultDistributionComponentProvider.java Wed Nov 12 10:28:06 2014
@@ -35,7 +35,7 @@ import org.apache.sling.distribution.com
 import org.apache.sling.distribution.component.DistributionComponentProvider;
 import org.apache.sling.distribution.packaging.DistributionPackageExporter;
 import org.apache.sling.distribution.packaging.DistributionPackageImporter;
-import org.apache.sling.distribution.queue.DistributionQueueDistributionStrategy;
+import org.apache.sling.distribution.queue.DistributionQueueDispatchingStrategy;
 import org.apache.sling.distribution.queue.DistributionQueueProvider;
 import org.apache.sling.distribution.transport.authentication.TransportAuthenticationProvider;
 import org.osgi.framework.BundleContext;
@@ -53,7 +53,7 @@ import org.slf4j.LoggerFactory;
         @Reference(name = "distributionPackageImporter", referenceInterface = DistributionPackageImporter.class, cardinality = ReferenceCardinality.OPTIONAL_MULTIPLE, policy = ReferencePolicy.DYNAMIC),
         @Reference(name = "distributionPackageExporter", referenceInterface = DistributionPackageExporter.class, cardinality = ReferenceCardinality.OPTIONAL_MULTIPLE, policy = ReferencePolicy.DYNAMIC),
         @Reference(name = "distributionQueueProvider", referenceInterface = DistributionQueueProvider.class, cardinality = ReferenceCardinality.OPTIONAL_MULTIPLE, policy = ReferencePolicy.DYNAMIC),
-        @Reference(name = "distributionQueueDistributionStrategy", referenceInterface = DistributionQueueDistributionStrategy.class, cardinality = ReferenceCardinality.OPTIONAL_MULTIPLE, policy = ReferencePolicy.DYNAMIC),
+        @Reference(name = "distributionQueueDistributionStrategy", referenceInterface = DistributionQueueDispatchingStrategy.class, cardinality = ReferenceCardinality.OPTIONAL_MULTIPLE, policy = ReferencePolicy.DYNAMIC),
         @Reference(name = "transportAuthenticationProvider", referenceInterface = TransportAuthenticationProvider.class, cardinality = ReferenceCardinality.OPTIONAL_MULTIPLE, policy = ReferencePolicy.DYNAMIC)
 })
 public class DefaultDistributionComponentProvider implements DistributionComponentProvider {
@@ -65,7 +65,7 @@ public class DefaultDistributionComponen
 
     private Map<String, DistributionAgent> distributionAgentMap = new ConcurrentHashMap<String, DistributionAgent>();
     private Map<String, DistributionQueueProvider> distributionQueueProviderMap = new ConcurrentHashMap<String, DistributionQueueProvider>();
-    private Map<String, DistributionQueueDistributionStrategy> distributionQueueDistributionStrategyMap = new ConcurrentHashMap<String, DistributionQueueDistributionStrategy>();
+    private Map<String, DistributionQueueDispatchingStrategy> distributionQueueDistributionStrategyMap = new ConcurrentHashMap<String, DistributionQueueDispatchingStrategy>();
     private Map<String, TransportAuthenticationProvider> transportAuthenticationProviderMap = new ConcurrentHashMap<String, TransportAuthenticationProvider>();
     private Map<String, DistributionPackageImporter> distributionPackageImporterMap = new ConcurrentHashMap<String, DistributionPackageImporter>();
     private Map<String, DistributionPackageExporter> distributionPackageExporterMap = new ConcurrentHashMap<String, DistributionPackageExporter>();
@@ -79,7 +79,7 @@ public class DefaultDistributionComponen
             return (ComponentType) distributionPackageImporterMap.get(componentName);
         } else if (type.isAssignableFrom(DistributionQueueProvider.class)) {
             return (ComponentType) distributionQueueProviderMap.get(componentName);
-        } else if (type.isAssignableFrom(DistributionQueueDistributionStrategy.class)) {
+        } else if (type.isAssignableFrom(DistributionQueueDispatchingStrategy.class)) {
             return (ComponentType) distributionQueueDistributionStrategyMap.get(componentName);
         } else if (type.isAssignableFrom(TransportAuthenticationProvider.class)) {
             return (ComponentType) transportAuthenticationProviderMap.get(componentName);
@@ -104,15 +104,15 @@ public class DefaultDistributionComponen
         }
     }
 
-    private void bindDistributionQueueDistributionStrategy(DistributionQueueDistributionStrategy distributionQueueDistributionStrategy, Map<String, Object> config) {
+    private void bindDistributionQueueDistributionStrategy(DistributionQueueDispatchingStrategy distributionQueueDispatchingStrategy, Map<String, Object> config) {
 
         String name = (String) config.get("name");
         if (name != null) {
-            distributionQueueDistributionStrategyMap.put(name, distributionQueueDistributionStrategy);
+            distributionQueueDistributionStrategyMap.put(name, distributionQueueDispatchingStrategy);
         }
     }
 
-    private void unbindDistributionQueueDistributionStrategy(DistributionQueueDistributionStrategy distributionQueueDistributionStrategy, Map<String, Object> config) {
+    private void unbindDistributionQueueDistributionStrategy(DistributionQueueDispatchingStrategy distributionQueueDispatchingStrategy, Map<String, Object> config) {
 
         String name = (String) config.get("name");
         if (name != null) {

Copied: sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/queue/impl/ErrorAwareQueueDispatchingStrategy.java (from r1638130, sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/queue/impl/ErrorAwareQueueDistributionStrategy.java)
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/queue/impl/ErrorAwareQueueDispatchingStrategy.java?p2=sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/queue/impl/ErrorAwareQueueDispatchingStrategy.java&p1=sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/queue/impl/ErrorAwareQueueDistributionStrategy.java&r1=1638130&r2=1638734&rev=1638734&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/queue/impl/ErrorAwareQueueDistributionStrategy.java (original)
+++ sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/queue/impl/ErrorAwareQueueDispatchingStrategy.java Wed Nov 12 10:28:06 2014
@@ -29,7 +29,7 @@ import org.apache.felix.scr.annotations.
 import org.apache.sling.commons.osgi.PropertiesUtil;
 import org.apache.sling.distribution.packaging.DistributionPackage;
 import org.apache.sling.distribution.queue.DistributionQueue;
-import org.apache.sling.distribution.queue.DistributionQueueDistributionStrategy;
+import org.apache.sling.distribution.queue.DistributionQueueDispatchingStrategy;
 import org.apache.sling.distribution.queue.DistributionQueueException;
 import org.apache.sling.distribution.queue.DistributionQueueItem;
 import org.apache.sling.distribution.queue.DistributionQueueItemState;
@@ -43,7 +43,7 @@ import org.slf4j.LoggerFactory;
  * delivering packages with an error queue which can be used when an item is stuck in the default
  * queue for too much time, then the stuck item is moved to the error queue or dropped.
  */
-public class ErrorAwareQueueDistributionStrategy implements DistributionQueueDistributionStrategy {
+public class ErrorAwareQueueDispatchingStrategy implements DistributionQueueDispatchingStrategy {
 
     protected static final String ERROR_QUEUE_NAME = "error";
 

Copied: sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/queue/impl/PriorityPathQueueDispatchingStrategy.java (from r1638130, sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/queue/impl/PriorityPathDistributionStrategy.java)
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/queue/impl/PriorityPathQueueDispatchingStrategy.java?p2=sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/queue/impl/PriorityPathQueueDispatchingStrategy.java&p1=sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/queue/impl/PriorityPathDistributionStrategy.java&r1=1638130&r2=1638734&rev=1638734&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/queue/impl/PriorityPathDistributionStrategy.java (original)
+++ sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/queue/impl/PriorityPathQueueDispatchingStrategy.java Wed Nov 12 10:28:06 2014
@@ -24,7 +24,7 @@ import java.util.List;
 
 import org.apache.sling.distribution.packaging.DistributionPackage;
 import org.apache.sling.distribution.queue.DistributionQueue;
-import org.apache.sling.distribution.queue.DistributionQueueDistributionStrategy;
+import org.apache.sling.distribution.queue.DistributionQueueDispatchingStrategy;
 import org.apache.sling.distribution.queue.DistributionQueueException;
 import org.apache.sling.distribution.queue.DistributionQueueItem;
 import org.apache.sling.distribution.queue.DistributionQueueProvider;
@@ -35,13 +35,13 @@ import org.slf4j.LoggerFactory;
  * Distribution algorithm which keeps one specific queue to handle specific paths and another queue
  * for handling all the other paths
  */
-public class PriorityPathDistributionStrategy implements DistributionQueueDistributionStrategy {
+public class PriorityPathQueueDispatchingStrategy implements DistributionQueueDispatchingStrategy {
 
     private final Logger log = LoggerFactory.getLogger(getClass());
 
     private final String[] priorityPaths;
 
-    public PriorityPathDistributionStrategy(String[] priorityPaths) {
+    public PriorityPathQueueDispatchingStrategy(String[] priorityPaths) {
         this.priorityPaths = priorityPaths;
 
     }

Copied: sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/queue/impl/SingleQueueDispatchingStrategy.java (from r1638130, sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/queue/impl/SingleQueueDistributionStrategy.java)
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/queue/impl/SingleQueueDispatchingStrategy.java?p2=sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/queue/impl/SingleQueueDispatchingStrategy.java&p1=sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/queue/impl/SingleQueueDistributionStrategy.java&r1=1638130&r2=1638734&rev=1638734&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/queue/impl/SingleQueueDistributionStrategy.java (original)
+++ sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/queue/impl/SingleQueueDispatchingStrategy.java Wed Nov 12 10:28:06 2014
@@ -24,7 +24,7 @@ import java.util.List;
 
 import org.apache.sling.distribution.packaging.DistributionPackage;
 import org.apache.sling.distribution.queue.DistributionQueue;
-import org.apache.sling.distribution.queue.DistributionQueueDistributionStrategy;
+import org.apache.sling.distribution.queue.DistributionQueueDispatchingStrategy;
 import org.apache.sling.distribution.queue.DistributionQueueException;
 import org.apache.sling.distribution.queue.DistributionQueueItem;
 import org.apache.sling.distribution.queue.DistributionQueueProvider;
@@ -35,7 +35,7 @@ import org.slf4j.LoggerFactory;
  * The default strategy for delivering packages to queues. Each agent just manages a single queue,
  * no failure / stuck handling where each package is put regardless of anything.
  */
-public class SingleQueueDistributionStrategy implements DistributionQueueDistributionStrategy {
+public class SingleQueueDispatchingStrategy implements DistributionQueueDispatchingStrategy {
 
     private final Logger log = LoggerFactory.getLogger(getClass());
 

Modified: sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/servlet/DistributionAgentQueueServlet.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/servlet/DistributionAgentQueueServlet.java?rev=1638734&r1=1638733&r2=1638734&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/servlet/DistributionAgentQueueServlet.java (original)
+++ sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/servlet/DistributionAgentQueueServlet.java Wed Nov 12 10:28:06 2014
@@ -28,7 +28,7 @@ import org.apache.sling.api.servlets.Sli
 import org.apache.sling.distribution.agent.DistributionAgent;
 import org.apache.sling.distribution.communication.DistributionParameter;
 import org.apache.sling.distribution.queue.DistributionQueue;
-import org.apache.sling.distribution.queue.DistributionQueueDistributionStrategy;
+import org.apache.sling.distribution.queue.DistributionQueueDispatchingStrategy;
 import org.apache.sling.distribution.queue.DistributionQueueItem;
 import org.apache.sling.distribution.queue.DistributionQueueItemState;
 import org.apache.sling.distribution.resources.DistributionConstants;
@@ -50,7 +50,7 @@ public class DistributionAgentQueueServl
 
         if (agent != null) {
             try {
-                DistributionQueue queue = agent.getQueue(queueName != null ? queueName : DistributionQueueDistributionStrategy.DEFAULT_QUEUE_NAME);
+                DistributionQueue queue = agent.getQueue(queueName != null ? queueName : DistributionQueueDispatchingStrategy.DEFAULT_QUEUE_NAME);
                 response.getWriter().write(toJSoN(queue)); // TODO : use json writer
                 response.setStatus(200);
             } catch (Exception e) {

Modified: sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/trigger/impl/AbstractJcrEventTrigger.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/trigger/impl/AbstractJcrEventTrigger.java?rev=1638734&r1=1638733&r2=1638734&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/trigger/impl/AbstractJcrEventTrigger.java (original)
+++ sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/trigger/impl/AbstractJcrEventTrigger.java Wed Nov 12 10:28:06 2014
@@ -28,6 +28,7 @@ import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
 
 import org.apache.sling.distribution.communication.DistributionRequest;
+import org.apache.sling.distribution.component.ManagedDistributionComponent;
 import org.apache.sling.distribution.trigger.DistributionRequestHandler;
 import org.apache.sling.distribution.trigger.DistributionTrigger;
 import org.apache.sling.distribution.trigger.DistributionTriggerException;
@@ -40,11 +41,11 @@ import org.slf4j.LoggerFactory;
  * Abstract implementation of a {@link org.apache.sling.distribution.trigger.DistributionTrigger} that listens for 'safe'
  * events and triggers a {@link org.apache.sling.distribution.communication.DistributionRequest} from that.
  */
-public abstract class AbstractJcrEventTrigger implements DistributionTrigger {
+public abstract class AbstractJcrEventTrigger implements DistributionTrigger, ManagedDistributionComponent {
 
     private final Logger log = LoggerFactory.getLogger(getClass());
 
-    private final Map<String, JcrEventdistributionTriggerListener> registeredListeners = new ConcurrentHashMap<String, JcrEventdistributionTriggerListener>();
+    private final Map<String, JcrEventDistributionTriggerListener> registeredListeners = new ConcurrentHashMap<String, JcrEventDistributionTriggerListener>();
 
     private final String path;
     private final String serviceUser;
@@ -63,7 +64,7 @@ public abstract class AbstractJcrEventTr
         Session session;
         try {
             session = getSession();
-            JcrEventdistributionTriggerListener listener = new JcrEventdistributionTriggerListener(requestHandler);
+            JcrEventDistributionTriggerListener listener = new JcrEventDistributionTriggerListener(requestHandler);
             registeredListeners.put(requestHandler.toString(), listener);
             session.getWorkspace().getObservationManager().addEventListener(
                     listener, getEventTypes(), path, true, null, null, false);
@@ -73,7 +74,7 @@ public abstract class AbstractJcrEventTr
     }
 
     public void unregister(@Nonnull DistributionRequestHandler requestHandler) throws DistributionTriggerException {
-        JcrEventdistributionTriggerListener listener = registeredListeners.get(requestHandler.toString());
+        JcrEventDistributionTriggerListener listener = registeredListeners.get(requestHandler.toString());
         if (listener != null) {
             Session session;
             try {
@@ -85,10 +86,10 @@ public abstract class AbstractJcrEventTr
         }
     }
 
-    private class JcrEventdistributionTriggerListener implements EventListener {
+    private class JcrEventDistributionTriggerListener implements EventListener {
         private final DistributionRequestHandler requestHandler;
 
-        public JcrEventdistributionTriggerListener(DistributionRequestHandler requestHandler) {
+        public JcrEventDistributionTriggerListener(DistributionRequestHandler requestHandler) {
             this.requestHandler = requestHandler;
         }
 
@@ -110,6 +111,17 @@ public abstract class AbstractJcrEventTr
         }
     }
 
+    public void enable() {
+
+    }
+
+    public void disable() {
+        if (cachedSession != null) {
+            cachedSession.logout();
+            cachedSession = null;
+        }
+    }
+
     /**
      * process the received event and generates a distribution request
      *

Modified: sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/trigger/impl/ResourceEventDistributionTrigger.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/trigger/impl/ResourceEventDistributionTrigger.java?rev=1638734&r1=1638733&r2=1638734&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/trigger/impl/ResourceEventDistributionTrigger.java (original)
+++ sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/trigger/impl/ResourceEventDistributionTrigger.java Wed Nov 12 10:28:06 2014
@@ -115,6 +115,9 @@ public class ResourceEventDistributionTr
             DistributionActionType action = SlingConstants.TOPIC_RESOURCE_REMOVED.equals(event.getTopic()) ?
                     DistributionActionType.DELETE : DistributionActionType.ADD;
             log.info("triggering distribution from event {}", event);
+            for (String pn : event.getPropertyNames()) {
+                log.info("property {} : {}", pn, event.getProperty(pn));
+            }
 
             Object pathProperty = event.getProperty("path");
             if (pathProperty != null) {

Modified: sling/trunk/contrib/extensions/distribution/core/src/test/java/org/apache/sling/distribution/agent/impl/SimpleDistributionAgentTest.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/distribution/core/src/test/java/org/apache/sling/distribution/agent/impl/SimpleDistributionAgentTest.java?rev=1638734&r1=1638733&r2=1638734&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/distribution/core/src/test/java/org/apache/sling/distribution/agent/impl/SimpleDistributionAgentTest.java (original)
+++ sling/trunk/contrib/extensions/distribution/core/src/test/java/org/apache/sling/distribution/agent/impl/SimpleDistributionAgentTest.java Wed Nov 12 10:28:06 2014
@@ -31,7 +31,7 @@ import org.apache.sling.distribution.pac
 import org.apache.sling.distribution.packaging.DistributionPackageExporter;
 import org.apache.sling.distribution.packaging.DistributionPackageImporter;
 import org.apache.sling.distribution.queue.DistributionQueue;
-import org.apache.sling.distribution.queue.DistributionQueueDistributionStrategy;
+import org.apache.sling.distribution.queue.DistributionQueueDispatchingStrategy;
 import org.apache.sling.distribution.queue.DistributionQueueProvider;
 import org.apache.sling.distribution.queue.impl.simple.SimpleDistributionQueue;
 import org.junit.Test;
@@ -56,7 +56,7 @@ public class SimpleDistributionAgentTest
         DistributionPackageExporter packageExporter = mock(DistributionPackageExporter.class);
         DistributionRequestAuthorizationStrategy packageExporterStrategy = mock(DistributionRequestAuthorizationStrategy.class);
         DistributionQueueProvider queueProvider = mock(DistributionQueueProvider.class);
-        DistributionQueueDistributionStrategy distributionHandler = mock(DistributionQueueDistributionStrategy.class);
+        DistributionQueueDispatchingStrategy distributionHandler = mock(DistributionQueueDispatchingStrategy.class);
         when(distributionHandler.add(any(DistributionPackage.class), any(DistributionQueueProvider.class))).thenReturn(false);
         DistributionEventFactory distributionEventFactory = mock(DistributionEventFactory.class);
         ResourceResolverFactory resolverFactory = mock(ResourceResolverFactory.class);
@@ -74,7 +74,7 @@ public class SimpleDistributionAgentTest
         when(distributionPackage.getPaths()).thenReturn(new String[]{"/"});
         when(packageExporter.exportPackages(any(ResourceResolver.class), any(DistributionRequest.class)))
                 .thenReturn(Arrays.asList(distributionPackage));
-        when(queueProvider.getQueue(DistributionQueueDistributionStrategy.DEFAULT_QUEUE_NAME)).thenReturn(
+        when(queueProvider.getQueue(DistributionQueueDispatchingStrategy.DEFAULT_QUEUE_NAME)).thenReturn(
                 new SimpleDistributionQueue(name, "name"));
         DistributionResponse response = agent.execute(resourceResolver, request);
         assertNotNull(response);
@@ -88,7 +88,7 @@ public class SimpleDistributionAgentTest
         DistributionPackageExporter packageExporter = mock(DistributionPackageExporter.class);
         DistributionRequestAuthorizationStrategy packageExporterStrategy = mock(DistributionRequestAuthorizationStrategy.class);
         DistributionQueueProvider queueProvider = mock(DistributionQueueProvider.class);
-        DistributionQueueDistributionStrategy distributionHandler = mock(DistributionQueueDistributionStrategy.class);
+        DistributionQueueDispatchingStrategy distributionHandler = mock(DistributionQueueDispatchingStrategy.class);
         DistributionEventFactory distributionEventFactory = mock(DistributionEventFactory.class);
         ResourceResolverFactory resolverFactory = mock(ResourceResolverFactory.class);
         SimpleDistributionAgent agent = new SimpleDistributionAgent(name,
@@ -105,7 +105,7 @@ public class SimpleDistributionAgentTest
         when(distributionHandler.add(any(DistributionPackage.class), eq(queueProvider))).thenReturn(true);
         when(packageExporter.exportPackages(any(ResourceResolver.class), any(DistributionRequest.class)))
                 .thenReturn(Arrays.asList(distributionPackage));
-        when(queueProvider.getQueue(DistributionQueueDistributionStrategy.DEFAULT_QUEUE_NAME)).thenReturn(
+        when(queueProvider.getQueue(DistributionQueueDispatchingStrategy.DEFAULT_QUEUE_NAME)).thenReturn(
                 new SimpleDistributionQueue(name, "name"));
         DistributionResponse response = agent.execute(resourceResolver, request);
         assertNotNull(response);
@@ -119,7 +119,7 @@ public class SimpleDistributionAgentTest
         DistributionPackageExporter packageExporter = mock(DistributionPackageExporter.class);
         DistributionRequestAuthorizationStrategy packageExporterStrategy = mock(DistributionRequestAuthorizationStrategy.class);
         DistributionQueueProvider queueProvider = mock(DistributionQueueProvider.class);
-        DistributionQueueDistributionStrategy distributionHandler = mock(DistributionQueueDistributionStrategy.class);
+        DistributionQueueDispatchingStrategy distributionHandler = mock(DistributionQueueDispatchingStrategy.class);
         DistributionEventFactory distributionEventFactory = mock(DistributionEventFactory.class);
         ResourceResolverFactory resolverFactory = mock(ResourceResolverFactory.class);
 
@@ -135,7 +135,7 @@ public class SimpleDistributionAgentTest
 
         when(distributionPackage.getPaths()).thenReturn(new String[]{"/"});
         when(packageExporter.exportPackages(resourceResolver, request)).thenReturn(Arrays.asList(distributionPackage));
-        when(queueProvider.getQueue(DistributionQueueDistributionStrategy.DEFAULT_QUEUE_NAME)).thenReturn(
+        when(queueProvider.getQueue(DistributionQueueDispatchingStrategy.DEFAULT_QUEUE_NAME)).thenReturn(
                 new SimpleDistributionQueue(name, "name"));
 
         agent.execute(resourceResolver, request);
@@ -149,7 +149,7 @@ public class SimpleDistributionAgentTest
         DistributionRequestAuthorizationStrategy packageExporterStrategy = mock(DistributionRequestAuthorizationStrategy.class);
 
         DistributionQueueProvider queueProvider = mock(DistributionQueueProvider.class);
-        DistributionQueueDistributionStrategy distributionHandler = mock(DistributionQueueDistributionStrategy.class);
+        DistributionQueueDispatchingStrategy distributionHandler = mock(DistributionQueueDispatchingStrategy.class);
         DistributionEventFactory distributionEventFactory = mock(DistributionEventFactory.class);
         ResourceResolverFactory resolverFactory = mock(ResourceResolverFactory.class);
 
@@ -159,7 +159,7 @@ public class SimpleDistributionAgentTest
                 queueProvider, distributionHandler,
                 distributionEventFactory, resolverFactory, null);
         DistributionQueue queue = mock(DistributionQueue.class);
-        when(queueProvider.getQueue(DistributionQueueDistributionStrategy.DEFAULT_QUEUE_NAME))
+        when(queueProvider.getQueue(DistributionQueueDispatchingStrategy.DEFAULT_QUEUE_NAME))
                 .thenReturn(queue);
         assertNotNull(agent.getQueue(""));
     }
@@ -172,7 +172,7 @@ public class SimpleDistributionAgentTest
         DistributionRequestAuthorizationStrategy packageExporterStrategy = mock(DistributionRequestAuthorizationStrategy.class);
 
         DistributionQueueProvider queueProvider = mock(DistributionQueueProvider.class);
-        DistributionQueueDistributionStrategy distributionHandler = mock(DistributionQueueDistributionStrategy.class);
+        DistributionQueueDispatchingStrategy distributionHandler = mock(DistributionQueueDispatchingStrategy.class);
         DistributionEventFactory distributionEventFactory = mock(DistributionEventFactory.class);
         ResourceResolverFactory resolverFactory = mock(ResourceResolverFactory.class);
 
@@ -194,7 +194,7 @@ public class SimpleDistributionAgentTest
         DistributionRequestAuthorizationStrategy packageExporterStrategy = mock(DistributionRequestAuthorizationStrategy.class);
 
         DistributionQueueProvider queueProvider = mock(DistributionQueueProvider.class);
-        DistributionQueueDistributionStrategy distributionHandler = mock(DistributionQueueDistributionStrategy.class);
+        DistributionQueueDispatchingStrategy distributionHandler = mock(DistributionQueueDispatchingStrategy.class);
         DistributionEventFactory distributionEventFactory = mock(DistributionEventFactory.class);
         ResourceResolverFactory resolverFactory = mock(ResourceResolverFactory.class);
 

Modified: sling/trunk/contrib/extensions/distribution/core/src/test/java/org/apache/sling/distribution/queue/impl/ErrorAwareQueueDistributionStrategyTest.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/distribution/core/src/test/java/org/apache/sling/distribution/queue/impl/ErrorAwareQueueDistributionStrategyTest.java?rev=1638734&r1=1638733&r2=1638734&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/distribution/core/src/test/java/org/apache/sling/distribution/queue/impl/ErrorAwareQueueDistributionStrategyTest.java (original)
+++ sling/trunk/contrib/extensions/distribution/core/src/test/java/org/apache/sling/distribution/queue/impl/ErrorAwareQueueDistributionStrategyTest.java Wed Nov 12 10:28:06 2014
@@ -22,7 +22,7 @@ import java.util.Dictionary;
 
 import org.apache.sling.distribution.packaging.DistributionPackage;
 import org.apache.sling.distribution.queue.DistributionQueue;
-import org.apache.sling.distribution.queue.DistributionQueueDistributionStrategy;
+import org.apache.sling.distribution.queue.DistributionQueueDispatchingStrategy;
 import org.apache.sling.distribution.queue.DistributionQueueItem;
 import org.apache.sling.distribution.queue.DistributionQueueItemState;
 import org.apache.sling.distribution.queue.DistributionQueueProvider;
@@ -36,17 +36,17 @@ import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.when;
 
 /**
- * Testcase for {@link org.apache.sling.distribution.queue.impl.ErrorAwareQueueDistributionStrategy}
+ * Testcase for {@link ErrorAwareQueueDispatchingStrategy}
  */
 public class ErrorAwareQueueDistributionStrategyTest {
 
     @Test
     public void testPackageAdditionWithSucceedingItemDelivery() throws Exception {
-        ErrorAwareQueueDistributionStrategy errorAwareDistributionStrategy = new ErrorAwareQueueDistributionStrategy();
+        ErrorAwareQueueDispatchingStrategy errorAwareDistributionStrategy = new ErrorAwareQueueDispatchingStrategy();
         DistributionPackage distributionPackage = mock(DistributionPackage.class);
         DistributionQueueProvider queueProvider = mock(DistributionQueueProvider.class);
         DistributionQueue queue = mock(DistributionQueue.class);
-        when(queueProvider.getQueue(DistributionQueueDistributionStrategy.DEFAULT_QUEUE_NAME)).thenReturn(queue);
+        when(queueProvider.getQueue(DistributionQueueDispatchingStrategy.DEFAULT_QUEUE_NAME)).thenReturn(queue);
         when(queue.add(any(DistributionQueueItem.class))).thenReturn(true);
 
         boolean returnedState = errorAwareDistributionStrategy.add(distributionPackage, queueProvider);
@@ -56,13 +56,13 @@ public class ErrorAwareQueueDistribution
 
     @Test
     public void testPackageAdditionWithFailingItemDelivery() throws Exception {
-        ErrorAwareQueueDistributionStrategy errorAwareDistributionStrategy = new ErrorAwareQueueDistributionStrategy();
+        ErrorAwareQueueDispatchingStrategy errorAwareDistributionStrategy = new ErrorAwareQueueDispatchingStrategy();
         DistributionPackage distributionPackage = mock(DistributionPackage.class);
         DistributionQueueProvider queueProvider = mock(DistributionQueueProvider.class);
         DistributionQueue queue = mock(DistributionQueue.class);
         DistributionQueueItem queueItem = mock(DistributionQueueItem.class);
 
-        when(queueProvider.getQueue(DistributionQueueDistributionStrategy.DEFAULT_QUEUE_NAME)).thenReturn(queue);
+        when(queueProvider.getQueue(DistributionQueueDispatchingStrategy.DEFAULT_QUEUE_NAME)).thenReturn(queue);
         when(queue.add(queueItem)).thenReturn(true);
         DistributionQueueItemState state = mock(DistributionQueueItemState.class);
         when(state.isSuccessful()).thenReturn(false);
@@ -73,7 +73,7 @@ public class ErrorAwareQueueDistribution
 
     @Test
     public void testPackageAdditionWithMultipleFailingItemsDeliveryAndErrorQueue() throws Exception {
-        ErrorAwareQueueDistributionStrategy errorAwareDistributionStrategy = new ErrorAwareQueueDistributionStrategy();
+        ErrorAwareQueueDispatchingStrategy errorAwareDistributionStrategy = new ErrorAwareQueueDispatchingStrategy();
         ComponentContext context = mock(ComponentContext.class);
         Dictionary properties = mock(Dictionary.class);
         when(properties.get("attempts.threshold")).thenReturn(new String[]{"1"});
@@ -85,12 +85,12 @@ public class ErrorAwareQueueDistribution
         DistributionQueue queue = mock(DistributionQueue.class);
         DistributionQueueItem queueItem = mock(DistributionQueueItem.class);
 
-        when(queueProvider.getQueue(DistributionQueueDistributionStrategy.DEFAULT_QUEUE_NAME)).thenReturn(queue);
+        when(queueProvider.getQueue(DistributionQueueDispatchingStrategy.DEFAULT_QUEUE_NAME)).thenReturn(queue);
         when(queue.add(queueItem)).thenReturn(true);
         when(queue.getHead()).thenReturn(queueItem);
         DistributionQueue errorQueue = mock(DistributionQueue.class);
         when(errorQueue.add(queueItem)).thenReturn(true);
-        when(queueProvider.getQueue(ErrorAwareQueueDistributionStrategy.ERROR_QUEUE_NAME)).thenReturn(errorQueue);
+        when(queueProvider.getQueue(ErrorAwareQueueDispatchingStrategy.ERROR_QUEUE_NAME)).thenReturn(errorQueue);
         DistributionQueueItemState state = mock(DistributionQueueItemState.class);
         when(state.isSuccessful()).thenReturn(false);
         when(state.getAttempts()).thenReturn(2);
@@ -101,7 +101,7 @@ public class ErrorAwareQueueDistribution
 
     @Test
     public void testPackageAdditionWithMultipleFailingItemsDeliveryAndDropFromQueue() throws Exception {
-        ErrorAwareQueueDistributionStrategy errorAwareDistributionStrategy = new ErrorAwareQueueDistributionStrategy();
+        ErrorAwareQueueDispatchingStrategy errorAwareDistributionStrategy = new ErrorAwareQueueDispatchingStrategy();
         ComponentContext context = mock(ComponentContext.class);
         Dictionary properties = mock(Dictionary.class);
         when(properties.get("attempts.threshold")).thenReturn(new String[]{"1"});
@@ -112,7 +112,7 @@ public class ErrorAwareQueueDistribution
         DistributionQueueProvider queueProvider = mock(DistributionQueueProvider.class);
         DistributionQueue queue = mock(DistributionQueue.class);
 
-        when(queueProvider.getQueue(DistributionQueueDistributionStrategy.DEFAULT_QUEUE_NAME)).thenReturn(queue);
+        when(queueProvider.getQueue(DistributionQueueDispatchingStrategy.DEFAULT_QUEUE_NAME)).thenReturn(queue);
         when(queue.add(any(DistributionQueueItem.class))).thenReturn(true);
         when(queue.getHead()).thenReturn(mock(DistributionQueueItem.class));
         DistributionQueueItemState state = mock(DistributionQueueItemState.class);
@@ -125,12 +125,12 @@ public class ErrorAwareQueueDistribution
 
     @Test
     public void testPackageAdditionWithNullItemStateFromTheQueue() throws Exception {
-        ErrorAwareQueueDistributionStrategy errorAwareDistributionStrategy = new ErrorAwareQueueDistributionStrategy();
+        ErrorAwareQueueDispatchingStrategy errorAwareDistributionStrategy = new ErrorAwareQueueDispatchingStrategy();
         DistributionPackage distributionPackage = mock(DistributionPackage.class);
         DistributionQueueProvider queueProvider = mock(DistributionQueueProvider.class);
         DistributionQueue queue = mock(DistributionQueue.class);
 
-        when(queueProvider.getQueue(DistributionQueueDistributionStrategy.DEFAULT_QUEUE_NAME)).thenReturn(queue);
+        when(queueProvider.getQueue(DistributionQueueDispatchingStrategy.DEFAULT_QUEUE_NAME)).thenReturn(queue);
         when(queue.add(any(DistributionQueueItem.class))).thenReturn(true);
         boolean returnedState = errorAwareDistributionStrategy.add(distributionPackage, queueProvider);
         assertTrue(returnedState);
@@ -138,11 +138,11 @@ public class ErrorAwareQueueDistribution
 
     @Test
     public void testPackageAdditionWithNotNullItemStateFromTheQueue() throws Exception {
-        ErrorAwareQueueDistributionStrategy errorAwareDistributionStrategy = new ErrorAwareQueueDistributionStrategy();
+        ErrorAwareQueueDispatchingStrategy errorAwareDistributionStrategy = new ErrorAwareQueueDispatchingStrategy();
         DistributionPackage distributionPackage = mock(DistributionPackage.class);
         DistributionQueueProvider queueProvider = mock(DistributionQueueProvider.class);
         DistributionQueue queue = mock(DistributionQueue.class);
-        when(queueProvider.getQueue(DistributionQueueDistributionStrategy.DEFAULT_QUEUE_NAME)).thenReturn(queue);
+        when(queueProvider.getQueue(DistributionQueueDispatchingStrategy.DEFAULT_QUEUE_NAME)).thenReturn(queue);
         when(queue.add(any(DistributionQueueItem.class))).thenReturn(true);
 
         boolean returnedState = errorAwareDistributionStrategy.add(distributionPackage, queueProvider);

Modified: sling/trunk/contrib/extensions/distribution/core/src/test/java/org/apache/sling/distribution/queue/impl/PriorityPathQueueDistributionStrategyTest.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/distribution/core/src/test/java/org/apache/sling/distribution/queue/impl/PriorityPathQueueDistributionStrategyTest.java?rev=1638734&r1=1638733&r2=1638734&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/distribution/core/src/test/java/org/apache/sling/distribution/queue/impl/PriorityPathQueueDistributionStrategyTest.java (original)
+++ sling/trunk/contrib/extensions/distribution/core/src/test/java/org/apache/sling/distribution/queue/impl/PriorityPathQueueDistributionStrategyTest.java Wed Nov 12 10:28:06 2014
@@ -20,7 +20,7 @@ package org.apache.sling.distribution.qu
 
 import org.apache.sling.distribution.packaging.DistributionPackage;
 import org.apache.sling.distribution.queue.DistributionQueue;
-import org.apache.sling.distribution.queue.DistributionQueueDistributionStrategy;
+import org.apache.sling.distribution.queue.DistributionQueueDispatchingStrategy;
 import org.apache.sling.distribution.queue.DistributionQueueItem;
 import org.apache.sling.distribution.queue.DistributionQueueProvider;
 import org.junit.Test;
@@ -31,19 +31,19 @@ import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.when;
 
 /**
- * Testcase for {@link org.apache.sling.distribution.queue.impl.PriorityPathDistributionStrategy}
+ * Testcase for {@link PriorityPathQueueDispatchingStrategy}
  */
 public class PriorityPathQueueDistributionStrategyTest {
 
     @Test
     public void testPackageAdditionWithSucceedingItemDelivery() throws Exception {
-        PriorityPathDistributionStrategy priorityPathDistributionStrategy = new PriorityPathDistributionStrategy(new String[]{"/content", "/apps"});
+        PriorityPathQueueDispatchingStrategy priorityPathDistributionStrategy = new PriorityPathQueueDispatchingStrategy(new String[]{"/content", "/apps"});
 
         DistributionPackage distributionPackage = mock(DistributionPackage.class);
         when(distributionPackage.getPaths()).thenReturn(new String[]{"/etc"});
         DistributionQueueProvider queueProvider = mock(DistributionQueueProvider.class);
         DistributionQueue queue = mock(DistributionQueue.class);
-        when(queueProvider.getQueue(DistributionQueueDistributionStrategy.DEFAULT_QUEUE_NAME)).thenReturn(queue);
+        when(queueProvider.getQueue(DistributionQueueDispatchingStrategy.DEFAULT_QUEUE_NAME)).thenReturn(queue);
         when(queue.add(any(DistributionQueueItem.class))).thenReturn(true);
 
         boolean returnedState = priorityPathDistributionStrategy.add(distributionPackage, queueProvider);
@@ -52,7 +52,7 @@ public class PriorityPathQueueDistributi
 
     @Test
     public void testPackageAdditionWithSucceedingItemDeliveryOnPriorityPath() throws Exception {
-        PriorityPathDistributionStrategy priorityPathDistributionStrategy = new PriorityPathDistributionStrategy(new String[]{"/content", "/apps"});
+        PriorityPathQueueDispatchingStrategy priorityPathDistributionStrategy = new PriorityPathQueueDispatchingStrategy(new String[]{"/content", "/apps"});
 
         DistributionPackage distributionPackage = mock(DistributionPackage.class);
         when(distributionPackage.getPaths()).thenReturn(new String[]{"/content/sample1"});
@@ -67,13 +67,13 @@ public class PriorityPathQueueDistributi
 
     @Test
     public void testPackageAdditionWithFailingItemDelivery() throws Exception {
-        PriorityPathDistributionStrategy priorityPathDistributionStrategy = new PriorityPathDistributionStrategy(new String[]{"/content", "/apps"});
+        PriorityPathQueueDispatchingStrategy priorityPathDistributionStrategy = new PriorityPathQueueDispatchingStrategy(new String[]{"/content", "/apps"});
 
         DistributionPackage distributionPackage = mock(DistributionPackage.class);
         when(distributionPackage.getPaths()).thenReturn(new String[]{"/etc"});
         DistributionQueueProvider queueProvider = mock(DistributionQueueProvider.class);
         DistributionQueue queue = mock(DistributionQueue.class);
-        when(queueProvider.getQueue(DistributionQueueDistributionStrategy.DEFAULT_QUEUE_NAME)).thenReturn(queue);
+        when(queueProvider.getQueue(DistributionQueueDispatchingStrategy.DEFAULT_QUEUE_NAME)).thenReturn(queue);
         when(queue.add(any(DistributionQueueItem.class))).thenReturn(true);
 
         boolean returnedState = priorityPathDistributionStrategy.add(distributionPackage, queueProvider);
@@ -82,7 +82,7 @@ public class PriorityPathQueueDistributi
 
     @Test
     public void testPackageAdditionWithFailingItemDeliveryOnPriorityPath() throws Exception {
-        PriorityPathDistributionStrategy priorityPathDistributionStrategy = new PriorityPathDistributionStrategy(new String[]{"/content", "/apps"});
+        PriorityPathQueueDispatchingStrategy priorityPathDistributionStrategy = new PriorityPathQueueDispatchingStrategy(new String[]{"/content", "/apps"});
 
         DistributionPackage distributionPackage = mock(DistributionPackage.class);
         when(distributionPackage.getPaths()).thenReturn(new String[]{"/content/sample2"});
@@ -98,14 +98,14 @@ public class PriorityPathQueueDistributi
 
     @Test
     public void testPackageAdditionWithNullItemStateFromTheQueue() throws Exception {
-        PriorityPathDistributionStrategy priorityPathDistributionStrategy = new PriorityPathDistributionStrategy(new String[]{"/content", "/apps"});
+        PriorityPathQueueDispatchingStrategy priorityPathDistributionStrategy = new PriorityPathQueueDispatchingStrategy(new String[]{"/content", "/apps"});
 
         DistributionPackage distributionPackage = mock(DistributionPackage.class);
         when(distributionPackage.getPaths()).thenReturn(new String[]{"/etc"});
         DistributionQueueProvider queueProvider = mock(DistributionQueueProvider.class);
         DistributionQueue queue = mock(DistributionQueue.class);
 
-        when(queueProvider.getQueue(DistributionQueueDistributionStrategy.DEFAULT_QUEUE_NAME)).thenReturn(queue);
+        when(queueProvider.getQueue(DistributionQueueDispatchingStrategy.DEFAULT_QUEUE_NAME)).thenReturn(queue);
         when(queue.add(any(DistributionQueueItem.class))).thenReturn(true);
         boolean returnedState = priorityPathDistributionStrategy.add(distributionPackage, queueProvider);
         assertTrue(returnedState);
@@ -113,7 +113,7 @@ public class PriorityPathQueueDistributi
 
     @Test
     public void testPackageAdditionWithNullItemStateFromTheQueueOnPriorityPath() throws Exception {
-        PriorityPathDistributionStrategy priorityPathDistributionStrategy = new PriorityPathDistributionStrategy(new String[]{"/content", "/apps"});
+        PriorityPathQueueDispatchingStrategy priorityPathDistributionStrategy = new PriorityPathQueueDispatchingStrategy(new String[]{"/content", "/apps"});
 
         DistributionPackage distributionPackage = mock(DistributionPackage.class);
         when(distributionPackage.getPaths()).thenReturn(new String[]{"/apps/some/stuff"});
@@ -128,13 +128,13 @@ public class PriorityPathQueueDistributi
 
     @Test
     public void testPackageAdditionWithNotNullItemStateFromTheQueue() throws Exception {
-        PriorityPathDistributionStrategy priorityPathDistributionStrategy = new PriorityPathDistributionStrategy(new String[]{"/content", "/apps"});
+        PriorityPathQueueDispatchingStrategy priorityPathDistributionStrategy = new PriorityPathQueueDispatchingStrategy(new String[]{"/content", "/apps"});
 
         DistributionPackage distributionPackage = mock(DistributionPackage.class);
         when(distributionPackage.getPaths()).thenReturn(new String[]{"/etc"});
         DistributionQueueProvider queueProvider = mock(DistributionQueueProvider.class);
         DistributionQueue queue = mock(DistributionQueue.class);
-        when(queueProvider.getQueue(DistributionQueueDistributionStrategy.DEFAULT_QUEUE_NAME)).thenReturn(queue);
+        when(queueProvider.getQueue(DistributionQueueDispatchingStrategy.DEFAULT_QUEUE_NAME)).thenReturn(queue);
         when(queue.add(any(DistributionQueueItem.class))).thenReturn(true);
         boolean returnedState = priorityPathDistributionStrategy.add(distributionPackage, queueProvider);
         assertTrue(returnedState);
@@ -142,7 +142,7 @@ public class PriorityPathQueueDistributi
 
     @Test
     public void testPackageAdditionWithNotNullItemStateFromTheQueueOnPriorityPath() throws Exception {
-        PriorityPathDistributionStrategy priorityPathDistributionStrategy = new PriorityPathDistributionStrategy(new String[]{"/content", "/apps"});
+        PriorityPathQueueDispatchingStrategy priorityPathDistributionStrategy = new PriorityPathQueueDispatchingStrategy(new String[]{"/content", "/apps"});
 
         DistributionPackage distributionPackage = mock(DistributionPackage.class);
         when(distributionPackage.getPaths()).thenReturn(new String[]{"/apps"});

Modified: sling/trunk/contrib/extensions/distribution/core/src/test/java/org/apache/sling/distribution/queue/impl/SingleQueueDistributionStrategyTest.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/distribution/core/src/test/java/org/apache/sling/distribution/queue/impl/SingleQueueDistributionStrategyTest.java?rev=1638734&r1=1638733&r2=1638734&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/distribution/core/src/test/java/org/apache/sling/distribution/queue/impl/SingleQueueDistributionStrategyTest.java (original)
+++ sling/trunk/contrib/extensions/distribution/core/src/test/java/org/apache/sling/distribution/queue/impl/SingleQueueDistributionStrategyTest.java Wed Nov 12 10:28:06 2014
@@ -20,7 +20,7 @@ package org.apache.sling.distribution.qu
 
 import org.apache.sling.distribution.packaging.DistributionPackage;
 import org.apache.sling.distribution.queue.DistributionQueue;
-import org.apache.sling.distribution.queue.DistributionQueueDistributionStrategy;
+import org.apache.sling.distribution.queue.DistributionQueueDispatchingStrategy;
 import org.apache.sling.distribution.queue.DistributionQueueItem;
 import org.apache.sling.distribution.queue.DistributionQueueItemState;
 import org.apache.sling.distribution.queue.DistributionQueueProvider;
@@ -33,17 +33,17 @@ import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.when;
 
 /**
- * Testcase for {@link SingleQueueDistributionStrategy}
+ * Testcase for {@link SingleQueueDispatchingStrategy}
  */
 public class SingleQueueDistributionStrategyTest {
 
     @Test
     public void testPackageAdditionWithSucceedingItemDelivery() throws Exception {
-        SingleQueueDistributionStrategy singleQueueDistributionStrategy = new SingleQueueDistributionStrategy();
+        SingleQueueDispatchingStrategy singleQueueDistributionStrategy = new SingleQueueDispatchingStrategy();
         DistributionPackage distributionPackage = mock(DistributionPackage.class);
         DistributionQueueProvider queueProvider = mock(DistributionQueueProvider.class);
         DistributionQueue queue = mock(DistributionQueue.class);
-        when(queueProvider.getQueue(DistributionQueueDistributionStrategy.DEFAULT_QUEUE_NAME)).thenReturn(queue);
+        when(queueProvider.getQueue(DistributionQueueDispatchingStrategy.DEFAULT_QUEUE_NAME)).thenReturn(queue);
         when(queue.add(any(DistributionQueueItem.class))).thenReturn(true);
 
         boolean returnedState = singleQueueDistributionStrategy.add(distributionPackage, queueProvider);
@@ -52,12 +52,12 @@ public class SingleQueueDistributionStra
 
     @Test
     public void testPackageAdditionWithFailingItemDelivery() throws Exception {
-        SingleQueueDistributionStrategy singleQueueDistributionStrategy = new SingleQueueDistributionStrategy();
+        SingleQueueDispatchingStrategy singleQueueDistributionStrategy = new SingleQueueDispatchingStrategy();
         DistributionPackage distributionPackage = mock(DistributionPackage.class);
         DistributionQueueProvider queueProvider = mock(DistributionQueueProvider.class);
         DistributionQueue queue = mock(DistributionQueue.class);
         DistributionQueueItem queueItem = mock(DistributionQueueItem.class);
-        when(queueProvider.getQueue(DistributionQueueDistributionStrategy.DEFAULT_QUEUE_NAME)).thenReturn(queue);
+        when(queueProvider.getQueue(DistributionQueueDispatchingStrategy.DEFAULT_QUEUE_NAME)).thenReturn(queue);
         when(queue.add(queueItem)).thenReturn(true);
         DistributionQueueItemState state = mock(DistributionQueueItemState.class);
         when(state.isSuccessful()).thenReturn(false);
@@ -68,11 +68,11 @@ public class SingleQueueDistributionStra
 
     @Test
     public void testPackageAdditionWithNullItemStateFromTheQueue() throws Exception {
-        SingleQueueDistributionStrategy singleQueueDistributionStrategy = new SingleQueueDistributionStrategy();
+        SingleQueueDispatchingStrategy singleQueueDistributionStrategy = new SingleQueueDispatchingStrategy();
         DistributionPackage distributionPackage = mock(DistributionPackage.class);
         DistributionQueueProvider queueProvider = mock(DistributionQueueProvider.class);
         DistributionQueue queue = mock(DistributionQueue.class);
-        when(queueProvider.getQueue(DistributionQueueDistributionStrategy.DEFAULT_QUEUE_NAME)).thenReturn(queue);
+        when(queueProvider.getQueue(DistributionQueueDispatchingStrategy.DEFAULT_QUEUE_NAME)).thenReturn(queue);
         when(queue.add(any(DistributionQueueItem.class))).thenReturn(true);
         boolean returnedState = singleQueueDistributionStrategy.add(distributionPackage, queueProvider);
         assertTrue(returnedState);
@@ -80,11 +80,11 @@ public class SingleQueueDistributionStra
 
     @Test
     public void testPackageAdditionWithNotNullItemStateFromTheQueue() throws Exception {
-        SingleQueueDistributionStrategy singleQueueDistributionStrategy = new SingleQueueDistributionStrategy();
+        SingleQueueDispatchingStrategy singleQueueDistributionStrategy = new SingleQueueDispatchingStrategy();
         DistributionPackage distributionPackage = mock(DistributionPackage.class);
         DistributionQueueProvider queueProvider = mock(DistributionQueueProvider.class);
         DistributionQueue queue = mock(DistributionQueue.class);
-        when(queueProvider.getQueue(DistributionQueueDistributionStrategy.DEFAULT_QUEUE_NAME)).thenReturn(queue);
+        when(queueProvider.getQueue(DistributionQueueDispatchingStrategy.DEFAULT_QUEUE_NAME)).thenReturn(queue);
         when(queue.add(any(DistributionQueueItem.class))).thenReturn(true);
 
         boolean returnedState = singleQueueDistributionStrategy.add(distributionPackage, queueProvider);



Mime
View raw message