Refactor Register*ListenerReply classes
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / datastore / AbstractDataListenerSupport.java
index 15de81e290549080b0d991a093eef5732db4eed2..5a09b87da19f1e5b360761b1e64d05f00d793737 100644 (file)
@@ -16,6 +16,7 @@ import java.util.concurrent.ConcurrentHashMap;
 import org.opendaylight.controller.cluster.datastore.actors.DataTreeNotificationListenerRegistrationActor;
 import org.opendaylight.controller.cluster.datastore.messages.EnableNotification;
 import org.opendaylight.controller.cluster.datastore.messages.ListenerRegistrationMessage;
+import org.opendaylight.controller.cluster.datastore.messages.RegisterDataTreeNotificationListenerReply;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -93,7 +94,7 @@ abstract class AbstractDataListenerSupport<L extends EventListener, M extends Li
         log.debug("{}: {} sending reply, listenerRegistrationPath = {} ", persistenceId(), logName(),
                 registrationActor.path());
 
-        tellSender(newRegistrationReplyMessage(registrationActor));
+        tellSender(new RegisterDataTreeNotificationListenerReply(registrationActor));
     }
 
     protected ActorSelection processListenerRegistrationMessage(M message) {
@@ -124,7 +125,5 @@ abstract class AbstractDataListenerSupport<L extends EventListener, M extends Li
 
     abstract void doRegistration(M message, ActorRef registrationActor);
 
-    protected abstract Object newRegistrationReplyMessage(ActorRef registrationActor);
-
     protected abstract String logName();
 }