Generate sal-binding-broker-impl-*-test-sources.jar
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / datastore / actors / client / ClientActorBehavior.java
index 1d812b7590b0715468e9e53793a6529320785f0b..237b570320543939df3692d720e55aefd59d61dc 100644 (file)
@@ -36,7 +36,9 @@ public abstract class ClientActorBehavior extends RecoveredClientActorBehavior<C
 
     @Override
     final ClientActorBehavior onReceiveCommand(final Object command) {
-        if (command instanceof RequestFailure) {
+        if (command instanceof InternalCommand) {
+            return ((InternalCommand) command).execute();
+        } else if (command instanceof RequestFailure) {
             final RequestFailure<?, ?> failure = (RequestFailure<?, ?>) command;
             final RequestException cause = failure.getCause();
             if (cause instanceof RetiredGenerationException) {
@@ -72,4 +74,11 @@ public abstract class ClientActorBehavior extends RecoveredClientActorBehavior<C
      * @return Next behavior to use, null if this actor should shut down.
      */
     protected abstract @Nullable ClientActorBehavior onCommand(@Nonnull Object command);
+
+    /**
+     * Override this method to provide a backend resolver instance.
+     *
+     * @return
+     */
+    protected abstract @Nonnull BackendInfoResolver<?> resolver();
 }