Moved MD SAL from sal/yang-prototype to md-sal
[controller.git] / opendaylight / md-sal / sal-binding-api / src / main / java / org / opendaylight / controller / sal / binding / api / BindingAwareProvider.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 package org.opendaylight.controller.sal.binding.api;
9
10 import java.util.Collection;
11
12 import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.ConsumerContext;
13 import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.ProviderContext;
14 import org.opendaylight.yangtools.yang.binding.RpcService;
15
16 /**
17  * 
18  * Defines the component of controller and supplies additional metadata. A
19  * component of the controller or application supplies a concrete implementation
20  * of this interface.
21  * 
22  * <p>
23  * A user-implemented component (application) which facilitates the SAL and SAL
24  * services to access infrastructure services and to provide functionality to
25  * {@link Consumer}s and other providers.
26  * 
27  * 
28  */
29 public interface BindingAwareProvider {
30
31     void onSessionInitialized(ConsumerContext session);
32
33     /**
34      * Returns a set of provided implementations of YANG modules and their rpcs.
35      * 
36      * 
37      * @return Set of provided implementation of YANG modules and their Rpcs
38      */
39     Collection<? extends RpcService> getImplementations();
40
41     /**
42      * Gets a set of implementations of provider functionality to be registered
43      * into system during the provider registration to the SAL.
44      * 
45      * <p>
46      * This method is invoked by {@link Broker#registerProvider(Provider)} to
47      * learn the initial provided functionality
48      * 
49      * @return Set of provider's functionality.
50      */
51     Collection<? extends ProviderFunctionality> getFunctionality();
52
53     /**
54      * Functionality provided by the {@link BindingAwareProvider}
55      * 
56      * <p>
57      * Marker interface used to mark the interfaces describing specific
58      * functionality which could be exposed by providers to other components.
59      * 
60      * 
61      * 
62      */
63     public interface ProviderFunctionality {
64
65     }
66
67     void onSessionInitiated(ProviderContext session);
68
69 }