Initial opendaylight infrastructure commit!!
[controller.git] / opendaylight / sal / yang-prototype / sal / sal-core-api / src / main / java / org / opendaylight / controller / sal / core / api / Provider.java
1 /*\r
2  * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.\r
3  *\r
4  * This program and the accompanying materials are made available under the\r
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,\r
6  * and is available at http://www.eclipse.org/legal/epl-v10.html\r
7  */\r
8 package org.opendaylight.controller.sal.core.api;\r
9 \r
10 import java.util.Collection;\r
11 \r
12 import org.opendaylight.controller.sal.core.api.Broker.ProviderSession;\r
13 \r
14 /**\r
15  * \r
16  * Defines the component of controller and supplies additional metadata. A\r
17  * component of the controller or application supplies a concrete implementation\r
18  * of this interface.\r
19  * \r
20  * <p>\r
21  * A user-implemented component (application) which faciliates the SAL and SAL\r
22  * services to access infrastructure services and to provide functionality to\r
23  * {@link Consumer}s and other providers.\r
24  * \r
25  * \r
26  */\r
27 public interface Provider {\r
28 \r
29     /**\r
30      * Callback signaling initialization of the provider session to the SAL.\r
31      * \r
32      * <p>\r
33      * The provider <b>MUST use the session</b> for all communication with SAL\r
34      * or retrieving SAL infrastructure services.\r
35      * \r
36      * <p>\r
37      * This method is invoked by {@link Broker#registerConsumer(Consumer)}\r
38      * \r
39      * @param session\r
40      *            Unique session between provider and SAL.\r
41      */\r
42     public void onSessionInitiated(ProviderSession session);\r
43 \r
44     /**\r
45      * Gets a set of implementations of provider functionality to be registered\r
46      * into system during the provider registration to the SAL.\r
47      * \r
48      * <p>\r
49      * This method is invoked by {@link Broker#registerProvider(Provider)} to\r
50      * learn the initial provided functionality\r
51      * \r
52      * @return Set of provider's functionality.\r
53      */\r
54     public Collection<ProviderFunctionality> getProviderFunctionality();\r
55 \r
56     /**\r
57      * Functionality provided by the {@link Provider}\r
58      * \r
59      * <p>\r
60      * Marker interface used to mark the interfaces describing specific\r
61      * functionality which could be exposed by providers to other components.\r
62      * \r
63 \r
64      * \r
65      */\r
66     public interface ProviderFunctionality {\r
67 \r
68     }\r
69 }\r