2 * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
9 package org.opendaylight.controller.cluster.datastore.messages;
11 import akka.actor.ActorPath;
12 import akka.actor.ActorSystem;
13 import org.opendaylight.controller.protobuff.messages.registration.ListenerRegistrationMessages;
15 public class RegisterChangeListenerReply implements SerializableMessage{
16 public static final Class<ListenerRegistrationMessages.RegisterChangeListenerReply> SERIALIZABLE_CLASS =
17 ListenerRegistrationMessages.RegisterChangeListenerReply.class;
18 private final ActorPath listenerRegistrationPath;
20 public RegisterChangeListenerReply(final ActorPath listenerRegistrationPath) {
21 this.listenerRegistrationPath = listenerRegistrationPath;
24 public ActorPath getListenerRegistrationPath() {
25 return listenerRegistrationPath;
29 public ListenerRegistrationMessages.RegisterChangeListenerReply toSerializable() {
30 return ListenerRegistrationMessages.RegisterChangeListenerReply.newBuilder()
31 .setListenerRegistrationPath(listenerRegistrationPath.toString()).build();
34 public static RegisterChangeListenerReply fromSerializable(final ActorSystem actorSystem,final Object serializable){
35 ListenerRegistrationMessages.RegisterChangeListenerReply o = (ListenerRegistrationMessages.RegisterChangeListenerReply) serializable;
36 return new RegisterChangeListenerReply(
37 actorSystem.actorFor(o.getListenerRegistrationPath()).path()