1b223f9e667656926e924cc6f0c21a43ecfa6d2a
[controller.git] / opendaylight / sal / yang-prototype / sal / sal-core-api / src / main / java / org / opendaylight / controller / sal / core / api / Consumer.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.ConsumerSession;\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  * A user-implemented component (application) which faciliates the SAL and SAL\r
21  * services to access infrastructure services or providers' functionality.\r
22  * \r
23  * \r
24  */\r
25 public interface Consumer {\r
26 \r
27     /**\r
28      * Callback signaling initialization of the consumer session to the SAL.\r
29      * \r
30      * The consumer MUST use the session for all communication with SAL or\r
31      * retrieving SAL infrastructure services.\r
32      * \r
33      * This method is invoked by {@link Broker#registerConsumer(Consumer)}\r
34      * \r
35      * @param session\r
36      *            Unique session between consumer and SAL.\r
37      */\r
38     public void onSessionInitiated(ConsumerSession session);\r
39 \r
40     /**\r
41      * Get a set of implementations of consumer functionality to be registered\r
42      * into system during the consumer registration to the SAL.\r
43      * \r
44      * This method is invoked by {@link Broker#registerConsumer(Consumer)}.\r
45      * \r
46      * @return Set of consumer functionality.\r
47      */\r
48     public Collection<ConsumerFunctionality> getConsumerFunctionality();\r
49 \r
50     /**\r
51      * The marker interface for the interfaces describing the consumer\r
52      * functionality contracts.\r
53      * \r
54      * \r
55      */\r
56     public interface ConsumerFunctionality {\r
57 \r
58     }\r
59 }\r