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