e6ba1cc76e493a6a49ada81ca63d895a3992cf92
[controller.git] / opendaylight / md-sal / sal-dom-api / src / main / java / org / opendaylight / controller / sal / core / api / Provider.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.ProviderSession;
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 and to provide functionality to
21  * {@link Consumer}s and other providers.
22  */
23 public interface Provider {
24
25     /**
26      * Callback signaling initialization of the provider session to the SAL.
27      *
28      * <p>
29      * The provider <b>MUST use the session</b> for all communication with SAL
30      * or retrieving SAL infrastructure services.
31      *
32      * <p>
33      * This method is invoked by {@link Broker#registerConsumer(Consumer)}
34      *
35      * @param session
36      *            Unique session between provider and SAL.
37      */
38     void onSessionInitiated(ProviderSession session);
39
40     /**
41      * Deprecated.
42      *
43      * @deprecated - No longer used or needed. Suggested implementation until removed:
44      * {@code
45      * public Collection<ProviderFunctionality> getProviderFunctionality() {
46      *  return Collections.emptySet();
47      * }
48      * }
49      */
50     @Deprecated
51     Collection<ProviderFunctionality> getProviderFunctionality();
52
53     /**
54      * Deprecated.
55      *
56      * @deprecated - no longer used or needed
57      */
58     @Deprecated
59     interface ProviderFunctionality {
60
61     }
62 }