Moved binding MD-SAL APIs to binding folder
[mdsal.git] / binding / mdsal-binding-api / src / main / java / org / opendaylight / controller / sal / binding / api / AbstractBindingAwareProvider.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 org.opendaylight.controller.sal.binding.api.BindingAwareBroker.ProviderContext;
11 import org.osgi.framework.BundleContext;
12
13 @Deprecated
14 public abstract class AbstractBindingAwareProvider extends AbstractBrokerAwareActivator implements BindingAwareProvider {
15
16     @Override
17     protected final void onBrokerAvailable(final BindingAwareBroker broker, final BundleContext context) {
18         final ProviderContext ctx = broker.registerProvider(this);
19     }
20
21     /**
22      * Called when this bundle is started (before {@link #onSessionInitiated(ProviderContext)} so
23      * the Framework can perform the bundle-specific activities necessary to start this bundle. This
24      * method can be used to register services or to allocate any resources that this bundle needs.
25      *
26      * <p>
27      * This method must complete and return to its caller in a timely manner.
28      *
29      * @param context The execution context of the bundle being started.
30      * @throws Exception If this method throws an exception, this bundle is marked as stopped and
31      *         the Framework will remove this bundle's listeners, unregister all services registered
32      *         by this bundle, and release all services used by this bundle.
33      */
34     @Override
35     protected void startImpl(final BundleContext context) throws Exception {
36         // NOOP
37     }
38 }