2 * Copyright (c) 2015 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.netconf.topology;
11 import com.google.common.annotations.Beta;
12 import org.opendaylight.netconf.topology.util.messages.NormalizedNodeMessage;
13 import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId;
14 import scala.concurrent.Future;
17 * Interface that provides methods of calling node events on a remote actor.
18 * Use these when you want to call node events asynchronously similar to akka ask()
21 public interface RemoteNodeListener {
24 * This is called when a remote node is informing you that a new configuration was recieved.
25 * @param message - serializable message to send
26 * @return response from the remote node
28 Future<NormalizedNodeMessage> onRemoteNodeCreated(NormalizedNodeMessage message);
31 * This is called when a remote node is informing you that a configuration was updated.
32 * @param message - serializable message to send
33 * @return response from the remote node
35 Future<NormalizedNodeMessage> onRemoteNodeUpdated(NormalizedNodeMessage message);
38 * This is called when a remote node is informing you that a new configuration was deleted.
39 * @param nodeId - id of the node which was deleted
40 * @return void future success if delete succeed, failure otherwise
42 Future<Void> onRemoteNodeDeleted(NodeId nodeId);
45 * Called when a remote node is requesting a node's status, after a status change notification(f.ex sessionUp, sessionDown)
47 * @param nodeId - id of the node which status we want to retrieve
48 * @return status for the node requested
50 Future<NormalizedNodeMessage> remoteGetCurrentStatusForNode(NodeId nodeId);