Merge "BUG-2329 Add test for anyxmls inside rpc resonse for netcfon-connector"
[controller.git] / opendaylight / sal / connection / api / src / main / java / org / opendaylight / controller / sal / connection / IConnectionService.java
1 /*
2  * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
3  *
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
7  */
8
9 package org.opendaylight.controller.sal.connection;
10
11 import java.util.Map;
12
13 import org.opendaylight.controller.sal.core.Node;
14 import org.opendaylight.controller.sal.utils.Status;
15
16 /**
17  * Interface that defines the methods available to the functional modules that operate
18  * above SAL for disconnecting or connecting to a particular node.
19  */
20 public interface IConnectionService {
21     /**
22      * Connect to a node with a specified node type.
23      *
24      * @param type Type of the node representing NodeIDType.
25      * @param connectionIdentifier Convenient identifier for the applications to make use of
26      * @param params Connection Params in Map format. This is entirely handled by the south-bound
27      * plugins and is an opaque value for SAL. Typical values keyed inside this params are
28      * Management IP-Address, Username, Password, Security Keys, etc...
29      *
30      * @return Node {@link org.opendaylight.controller.sal.core.Node}
31      */
32     public Node connect (String type, String connectionIdentifier, Map<ConnectionConstants, String> params);
33
34     /**
35      * Discover the node type and Connect to the first plugin that is able to connect with the specified parameters.
36      *
37      * @param type Type of the node representing NodeIDType.
38      * @param connectionIdentifier Convenient identifier for the applications to make use of
39      * @param params Connection Params in Map format. This is entirely handled by the south-bound
40      * plugins and is an opaque value for SAL. Typical values keyed inside this params are
41      * Management IP-Address, Username, Password, Security Keys, etc...
42      *
43      * @return Node {@link org.opendaylight.controller.sal.core.Node}
44      */
45     public Node connect (String connectionIdentifier, Map<ConnectionConstants, String> params);
46
47     /**
48      * Disconnect a Node that is connected to this Controller.
49      *
50      * @param node
51      *            the node {@link org.opendaylight.controller.sal.core.Node}
52      * @return Status {@link org.opendaylight.controller.sal.utils.Status}
53      */
54     public Status disconnect(Node node);
55
56     /**
57      * View Change notification
58      *
59      * @param node
60      *            the node {@link org.opendaylight.controller.sal.core.Node}
61      */
62     public void notifyNodeDisconnectFromMaster(Node node);
63
64     /**
65      * View Change notification
66      */
67     public void notifyClusterViewChanged();
68 }