2 * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
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
8 package org.opendaylight.controller.sal.binding.api;
10 import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.ProviderContext;
11 import org.osgi.framework.BundleContext;
14 public abstract class AbstractBindingAwareProvider extends AbstractBrokerAwareActivator implements BindingAwareProvider {
17 protected final void onBrokerAvailable(final BindingAwareBroker broker, final BundleContext context) {
18 final ProviderContext ctx = broker.registerProvider(this);
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.
27 * This method must complete and return to its caller in a timely manner.
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.
35 protected void startImpl(final BundleContext context) throws Exception {