Mechanical code cleanup (sal-dom-api)
[controller.git] / opendaylight / md-sal / sal-dom-api / src / main / java / org / opendaylight / controller / sal / core / api / Consumer.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.core.api;
9
10 import java.util.Collection;
11
12 import org.opendaylight.controller.sal.core.api.Broker.ConsumerSession;
13
14 /**
15  *
16  * Defines the component of controller and supplies additional metadata. A
17  * component of the controller or application supplies a concrete implementation
18  * of this interface.
19  *
20  * A user-implemented component (application) which facilitates the SAL and SAL
21  * services to access infrastructure services or providers' functionality.
22  *
23  *
24  */
25 public interface Consumer {
26
27     /**
28      * Callback signaling initialization of the consumer session to the SAL.
29      *
30      * The consumer MUST use the session for all communication with SAL or
31      * retrieving SAL infrastructure services.
32      *
33      * This method is invoked by {@link Broker#registerConsumer(Consumer)}
34      *
35      * @param session
36      *            Unique session between consumer and SAL.
37      */
38     void onSessionInitiated(ConsumerSession session);
39
40     /**
41      * @deprecated - no longer used or needed
42      * *
43      * Suggested implementation until removed:
44      * @code {
45      * public Collection<ConsumerFunctionality> getConsumerFunctionality() {
46      *    return Collections.emptySet();
47      * }
48      * }
49      */
50     @Deprecated
51     Collection<ConsumerFunctionality> getConsumerFunctionality();
52
53     /**
54      * @deprecated - no longer used or needed
55      */
56     @Deprecated
57     interface ConsumerFunctionality {
58
59     }
60 }

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.