<groupId>org.opendaylight.controller</groupId>
<artifactId>sal-binding-api</artifactId>
</dependency>
- <dependency>
- <groupId>org.opendaylight.controller</groupId>
- <artifactId>sal-binding-config</artifactId>
- </dependency>
<dependency>
<groupId>org.opendaylight.controller</groupId>
<artifactId>sal-binding-util</artifactId>
<instructions>
<Bundle-Name>${project.groupId}.${project.artifactId}</Bundle-Name>
<Export-Package>
- org.opendaylight.controller.sal.binding.spi.*,
- org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.binding.impl.rev131028.*,
- org.opendaylight.controller.config.yang.md.sal.binding.impl
- </Export-Package>
- <Private-Package>
org.opendaylight.controller.sal.binding.impl,
- org.opendaylight.controller.sal.binding.impl.*,
- org.opendaylight.controller.sal.binding.codegen,
- org.opendaylight.controller.sal.binding.codegen.*,
org.opendaylight.controller.md.sal.binding.impl,
org.opendaylight.controller.md.sal.binding.compat,
org.opendaylight.controller.md.sal.binding.spi,
- <!--org.opendaylight.controller.sal.binding.dom.*,-->
- org.opendaylight.controller.sal.binding.osgi.*
- </Private-Package>
+ org.opendaylight.controller.sal.binding.codegen.impl,
+ </Export-Package>
</instructions>
</configuration>
</plugin>
+++ /dev/null
-package org.opendaylight.controller.config.yang.md.sal.binding.impl;
-
-import org.opendaylight.controller.md.sal.binding.impl.BindingToNormalizedNodeCodec;
-import org.opendaylight.controller.md.sal.binding.impl.BindingDOMDataBrokerAdapter;
-import org.opendaylight.controller.md.sal.dom.api.DOMDataBroker;
-
-public class BindingAsyncDataBrokerImplModule extends
- org.opendaylight.controller.config.yang.md.sal.binding.impl.AbstractBindingAsyncDataBrokerImplModule {
-
- public BindingAsyncDataBrokerImplModule(final org.opendaylight.controller.config.api.ModuleIdentifier identifier,
- final org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
- super(identifier, dependencyResolver);
- }
-
- public BindingAsyncDataBrokerImplModule(
- final org.opendaylight.controller.config.api.ModuleIdentifier identifier,
- final org.opendaylight.controller.config.api.DependencyResolver dependencyResolver,
- final org.opendaylight.controller.config.yang.md.sal.binding.impl.BindingAsyncDataBrokerImplModule oldModule,
- final java.lang.AutoCloseable oldInstance) {
- super(identifier, dependencyResolver, oldModule, oldInstance);
- }
-
- @Override
- public void customValidation() {
- // add custom validation form module attributes here.
- }
-
- @Override
- public java.lang.AutoCloseable createInstance() {
- final BindingToNormalizedNodeCodec mappingService = getBindingMappingServiceDependency();
- final DOMDataBroker domDataBroker = getDomAsyncBrokerDependency();
- return new BindingDOMDataBrokerAdapter(domDataBroker, mappingService);
- }
-
-}
+++ /dev/null
-/*
-* Generated file
-*
-* Generated from: yang module name: opendaylight-sal-binding-broker-impl yang module local name: binding-forwarded-data-broker
-* Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator
-* Generated at: Fri May 16 17:18:18 CEST 2014
-*
-* Do not modify this file unless it is present under src/main directory
-*/
-package org.opendaylight.controller.config.yang.md.sal.binding.impl;
-
-
-public class BindingAsyncDataBrokerImplModuleFactory extends org.opendaylight.controller.config.yang.md.sal.binding.impl.AbstractBindingAsyncDataBrokerImplModuleFactory {
-
-}
+++ /dev/null
-/*
- * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-/**
- * Generated file
-
- * Generated from: yang module name: opendaylight-sal-binding-broker-impl yang module local name: binding-broker-impl
- * Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator
- * Generated at: Wed Nov 20 17:33:01 CET 2013
- *
- * Do not modify this file unless it is present under src/main directory
- */
-package org.opendaylight.controller.config.yang.md.sal.binding.impl;
-
-import org.opendaylight.controller.md.sal.binding.api.MountPointService;
-import org.opendaylight.controller.md.sal.binding.compat.HeliumRpcProviderRegistry;
-import org.opendaylight.controller.md.sal.binding.compat.HydrogenMountProvisionServiceAdapter;
-import org.opendaylight.controller.md.sal.binding.impl.BindingDOMMountPointServiceAdapter;
-import org.opendaylight.controller.md.sal.binding.impl.BindingDOMRpcProviderServiceAdapter;
-import org.opendaylight.controller.md.sal.binding.impl.BindingDOMRpcServiceAdapter;
-import org.opendaylight.controller.md.sal.binding.impl.BindingToNormalizedNodeCodec;
-import org.opendaylight.controller.md.sal.dom.api.DOMMountPointService;
-import org.opendaylight.controller.md.sal.dom.api.DOMRpcProviderService;
-import org.opendaylight.controller.md.sal.dom.api.DOMRpcService;
-import org.opendaylight.controller.sal.binding.api.RpcProviderRegistry;
-import org.opendaylight.controller.sal.binding.api.mount.MountProviderService;
-import org.opendaylight.controller.sal.binding.impl.RootBindingAwareBroker;
-import org.opendaylight.controller.sal.core.api.Broker;
-import org.opendaylight.controller.sal.core.api.Broker.ProviderSession;
-
-/**
-*
-*/
-public final class BindingBrokerImplModule extends
- org.opendaylight.controller.config.yang.md.sal.binding.impl.AbstractBindingBrokerImplModule {
-
- public BindingBrokerImplModule(final org.opendaylight.controller.config.api.ModuleIdentifier identifier,
- final org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
- super(identifier, dependencyResolver);
- }
-
- public BindingBrokerImplModule(final org.opendaylight.controller.config.api.ModuleIdentifier identifier,
- final org.opendaylight.controller.config.api.DependencyResolver dependencyResolver,
- final BindingBrokerImplModule oldModule, final java.lang.AutoCloseable oldInstance) {
- super(identifier, dependencyResolver, oldModule, oldInstance);
- }
-
- @Override
- public void validate() {
- super.validate();
- }
-
- @Override
- public RootBindingAwareBroker createInstance() {
- final Broker domBroker = getDomAsyncBrokerDependency();
- final BindingToNormalizedNodeCodec codec = getBindingMappingServiceDependency();
- final ProviderSession session = domBroker.registerProvider(new DummyDOMProvider());
-
- final MountPointService mount = createMountPointAdapter(codec,session);
- final BindingDOMRpcServiceAdapter rpcConsumer = createRpcConsumer(codec,session);
- final BindingDOMRpcProviderServiceAdapter rpcProvider = createRpcProvider(codec,session);
- final RootBindingAwareBroker broker = new RootBindingAwareBroker(getIdentifier().getInstanceName());
- final RpcProviderRegistry heliumRpcBroker = new HeliumRpcProviderRegistry(rpcConsumer, rpcProvider);
- final MountProviderService legacyMount = createLegacyMountPointService(mount);
-
- broker.setLegacyDataBroker(getDataBrokerDependency());
- broker.setNotificationBroker(getNotificationServiceDependency());
- broker.setRpcBroker(heliumRpcBroker);
- broker.setDataBroker(getRootDataBrokerDependency());
- broker.setMountService(mount);
- broker.setLegacyMountManager(legacyMount);
- broker.start();
- return broker;
- }
-
-
- @SuppressWarnings("deprecation")
- private MountProviderService createLegacyMountPointService(final MountPointService service) {
- if(service != null) {
- return new HydrogenMountProvisionServiceAdapter(service);
- }
- return null;
- }
-
- private BindingDOMRpcProviderServiceAdapter createRpcProvider(final BindingToNormalizedNodeCodec codec,
- final ProviderSession session) {
- final DOMRpcProviderService domService = session.getService(DOMRpcProviderService.class);
- if(domService != null) {
- return new BindingDOMRpcProviderServiceAdapter(domService, codec);
- }
- return null;
- }
-
- private BindingDOMRpcServiceAdapter createRpcConsumer(final BindingToNormalizedNodeCodec codec, final ProviderSession session) {
- final DOMRpcService domService = session.getService(DOMRpcService.class);
- if(domService != null) {
- return new BindingDOMRpcServiceAdapter(domService, codec);
- }
- return null;
- }
-
- private MountPointService createMountPointAdapter(final BindingToNormalizedNodeCodec codec, final ProviderSession session) {
- final DOMMountPointService domService = session.getService(DOMMountPointService.class);
- if(domService != null) {
- return new BindingDOMMountPointServiceAdapter(domService, codec);
- }
- return null;
- }
-
-}
+++ /dev/null
-/*
- * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-/**
-* Generated file
-
-* Generated from: yang module name: opendaylight-sal-binding-broker-impl yang module local name: binding-broker-impl
-* Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator
-* Generated at: Wed Nov 20 17:33:01 CET 2013
-*
-* Do not modify this file unless it is present under src/main directory
-*/
-package org.opendaylight.controller.config.yang.md.sal.binding.impl;
-
-
-/**
-*
-*/
-public class BindingBrokerImplModuleFactory extends org.opendaylight.controller.config.yang.md.sal.binding.impl.AbstractBindingBrokerImplModuleFactory {
-
-}
+++ /dev/null
-/*
- * Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.controller.config.yang.md.sal.binding.impl;
-
-import org.opendaylight.controller.config.api.DependencyResolver;
-import org.opendaylight.controller.config.api.ModuleIdentifier;
-import org.opendaylight.controller.md.sal.binding.impl.BindingDOMNotificationServiceAdapter;
-import org.opendaylight.controller.md.sal.binding.impl.BindingToNormalizedNodeCodec;
-import org.opendaylight.controller.md.sal.dom.api.DOMNotificationService;
-import org.opendaylight.controller.sal.core.api.Broker;
-
-public class BindingNotificationAdapterModule extends AbstractBindingNotificationAdapterModule {
- public BindingNotificationAdapterModule(final ModuleIdentifier identifier, final DependencyResolver dependencyResolver) {
- super(identifier, dependencyResolver);
- }
-
- public BindingNotificationAdapterModule(final ModuleIdentifier identifier, final DependencyResolver dependencyResolver, final org.opendaylight.controller.config.yang.md.sal.binding.impl.BindingNotificationAdapterModule oldModule, final java.lang.AutoCloseable oldInstance) {
- super(identifier, dependencyResolver, oldModule, oldInstance);
- }
-
- @Override
- public void customValidation() {
- // add custom validation form module attributes here.
- }
-
- @Override
- public java.lang.AutoCloseable createInstance() {
- final BindingToNormalizedNodeCodec codec = getBindingMappingServiceDependency();
- final Broker.ProviderSession session = getDomAsyncBrokerDependency().registerProvider(new DummyDOMProvider());
- final DOMNotificationService notifService = session.getService(DOMNotificationService.class);
- return new BindingDOMNotificationServiceAdapter(codec.getCodecRegistry(), notifService);
- }
-
-}
+++ /dev/null
-/*
- * Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.controller.config.yang.md.sal.binding.impl;
-public class BindingNotificationAdapterModuleFactory extends org.opendaylight.controller.config.yang.md.sal.binding.impl.AbstractBindingNotificationAdapterModuleFactory {
-
-}
+++ /dev/null
-/*
- * Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.controller.config.yang.md.sal.binding.impl;
-
-import org.opendaylight.controller.config.api.DependencyResolver;
-import org.opendaylight.controller.config.api.ModuleIdentifier;
-import org.opendaylight.controller.md.sal.binding.impl.BindingDOMNotificationPublishServiceAdapter;
-import org.opendaylight.controller.md.sal.binding.impl.BindingToNormalizedNodeCodec;
-import org.opendaylight.controller.md.sal.dom.api.DOMNotificationPublishService;
-import org.opendaylight.controller.sal.core.api.Broker;
-
-public class BindingNotificationPublishAdapterModule extends AbstractBindingNotificationPublishAdapterModule {
- public BindingNotificationPublishAdapterModule(final ModuleIdentifier identifier, final DependencyResolver dependencyResolver) {
- super(identifier, dependencyResolver);
- }
-
- public BindingNotificationPublishAdapterModule(final ModuleIdentifier identifier, final DependencyResolver dependencyResolver, final BindingNotificationPublishAdapterModule oldModule, final java.lang.AutoCloseable oldInstance) {
- super(identifier, dependencyResolver, oldModule, oldInstance);
- }
-
- @Override
- public void customValidation() {
- // add custom validation form module attributes here.
- }
-
- @Override
- public java.lang.AutoCloseable createInstance() {
- final BindingToNormalizedNodeCodec codec = getBindingMappingServiceDependency();
- final Broker.ProviderSession session = getDomAsyncBrokerDependency().registerProvider(new DummyDOMProvider());
- final DOMNotificationPublishService publishService = session.getService(DOMNotificationPublishService.class);
- return new BindingDOMNotificationPublishServiceAdapter(codec, publishService);
- }
-
-}
+++ /dev/null
-/*
- * Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.controller.config.yang.md.sal.binding.impl;
-public class BindingNotificationPublishAdapterModuleFactory extends org.opendaylight.controller.config.yang.md.sal.binding.impl.AbstractBindingNotificationPublishAdapterModuleFactory {
-
-}
+++ /dev/null
-/*
- * Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.controller.config.yang.md.sal.binding.impl;
-
-import java.util.Collection;
-import java.util.Collections;
-import org.opendaylight.controller.sal.core.api.Broker.ProviderSession;
-import org.opendaylight.controller.sal.core.api.Provider;
-
-class DummyDOMProvider implements Provider {
-
- @Override
- @Deprecated
- public Collection<ProviderFunctionality> getProviderFunctionality() {
- return Collections.emptyList();
- }
-
- @Override
- public void onSessionInitiated(ProviderSession session) {
- // NOOP
- }
-}
+++ /dev/null
-/*
- * Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.controller.config.yang.md.sal.binding.impl;
-
-import org.opendaylight.controller.md.sal.binding.compat.HydrogenDataBrokerAdapter;
-
-import java.util.Collection;
-import java.util.Collections;
-import org.opendaylight.controller.sal.core.api.Broker.ProviderSession;
-import org.opendaylight.controller.sal.core.api.Provider;
-
-/**
-*
-*/
-@Deprecated
-public final class ForwardedCompatibleDataBrokerImplModule extends
- org.opendaylight.controller.config.yang.md.sal.binding.impl.AbstractForwardedCompatibleDataBrokerImplModule
- implements Provider {
-
- public ForwardedCompatibleDataBrokerImplModule(
- final org.opendaylight.controller.config.api.ModuleIdentifier identifier,
- final org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
- super(identifier, dependencyResolver);
- }
-
- public ForwardedCompatibleDataBrokerImplModule(
- final org.opendaylight.controller.config.api.ModuleIdentifier identifier,
- final org.opendaylight.controller.config.api.DependencyResolver dependencyResolver,
- final ForwardedCompatibleDataBrokerImplModule oldModule, final java.lang.AutoCloseable oldInstance) {
-
- super(identifier, dependencyResolver, oldModule, oldInstance);
- }
-
- @Override
- protected void customValidation() {
- }
-
- @Override
- public java.lang.AutoCloseable createInstance() {
- final HydrogenDataBrokerAdapter dataBroker = new HydrogenDataBrokerAdapter(getDataBrokerDependency());
- return dataBroker;
- }
-
- @Override
- public void onSessionInitiated(final ProviderSession session) {
-
- }
-
- @Override
- public Collection<ProviderFunctionality> getProviderFunctionality() {
- return Collections.emptySet();
- }
-}
+++ /dev/null
-/*
- * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.controller.config.yang.md.sal.binding.impl;
-
-
-
-/**
-*
-*/
-public class ForwardedCompatibleDataBrokerImplModuleFactory extends org.opendaylight.controller.config.yang.md.sal.binding.impl.AbstractForwardedCompatibleDataBrokerImplModuleFactory
-{
-
-}
+++ /dev/null
-/*
- * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.controller.config.yang.md.sal.binding.impl;
-
-import org.opendaylight.controller.md.sal.binding.api.NotificationPublishService;
-import org.opendaylight.controller.md.sal.binding.api.NotificationService;
-import org.opendaylight.controller.md.sal.binding.compat.HeliumNotificationProviderServiceAdapter;
-import org.opendaylight.controller.md.sal.binding.compat.HeliumNotificationProviderServiceWithInterestListeners;
-import org.opendaylight.controller.md.sal.binding.compat.HydrogenNotificationBrokerImpl;
-import org.opendaylight.controller.md.sal.binding.impl.BindingDOMNotificationPublishServiceAdapter;
-import org.opendaylight.controller.md.sal.binding.impl.BindingDOMNotificationServiceAdapter;
-import org.opendaylight.controller.md.sal.dom.api.DOMNotificationPublishService;
-import org.opendaylight.controller.md.sal.dom.spi.DOMNotificationSubscriptionListenerRegistry;
-import org.opendaylight.controller.sal.binding.codegen.impl.SingletonHolder;
-
-/**
-*
-*/
-public final class NotificationBrokerImplModule extends
- org.opendaylight.controller.config.yang.md.sal.binding.impl.AbstractNotificationBrokerImplModule {
-
- public NotificationBrokerImplModule(final org.opendaylight.controller.config.api.ModuleIdentifier identifier,
- final org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
- super(identifier, dependencyResolver);
- }
-
- public NotificationBrokerImplModule(final org.opendaylight.controller.config.api.ModuleIdentifier identifier,
- final org.opendaylight.controller.config.api.DependencyResolver dependencyResolver,
- final NotificationBrokerImplModule oldModule, final java.lang.AutoCloseable oldInstance) {
- super(identifier, dependencyResolver, oldModule, oldInstance);
- }
-
- @Override
- public void validate() {
- super.validate();
- // Add custom validation for module attributes here.
- }
-
- @Override
- public java.lang.AutoCloseable createInstance() {
-
- final NotificationPublishService notificationPublishService = getNotificationPublishAdapterDependency();
- final NotificationService notificationService = getNotificationAdapterDependency();
-
- if(notificationPublishService != null & notificationService != null) {
- return createHeliumAdapter(notificationPublishService,notificationService);
- }
-
- /*
- * FIXME: Switch to new broker (which has different threading model)
- * once this change is communicated with downstream users or
- * we will have adapter implementation which will honor Helium
- * threading model for notifications.
- */
- return new HydrogenNotificationBrokerImpl(SingletonHolder.getDefaultNotificationExecutor());
- }
-
- private static AutoCloseable createHeliumAdapter(final NotificationPublishService publishService,
- final NotificationService listenService) {
- if (listenService instanceof BindingDOMNotificationServiceAdapter
- && publishService instanceof BindingDOMNotificationPublishServiceAdapter) {
- final BindingDOMNotificationPublishServiceAdapter castedPublish =
- (BindingDOMNotificationPublishServiceAdapter) publishService;
- final BindingDOMNotificationServiceAdapter castedListen =
- (BindingDOMNotificationServiceAdapter) listenService;
- final DOMNotificationPublishService domPublishService = castedPublish.getDomPublishService();
- if (domPublishService instanceof DOMNotificationSubscriptionListenerRegistry) {
- final DOMNotificationSubscriptionListenerRegistry subsRegistry =
- (DOMNotificationSubscriptionListenerRegistry) domPublishService;
- return new HeliumNotificationProviderServiceWithInterestListeners(castedPublish, castedListen,
- subsRegistry);
- }
- }
- return new HeliumNotificationProviderServiceAdapter(publishService, listenService);
- }
-}
+++ /dev/null
-/*
- * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.controller.config.yang.md.sal.binding.impl;
-
-/**
-*
-*/
-public class NotificationBrokerImplModuleFactory extends
- org.opendaylight.controller.config.yang.md.sal.binding.impl.AbstractNotificationBrokerImplModuleFactory {
-
-}
+++ /dev/null
-/*
- * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.controller.config.yang.md.sal.binding.impl;
-
-/**
-*
-*/
-public final class RpcBrokerImplModule extends
- org.opendaylight.controller.config.yang.md.sal.binding.impl.AbstractRpcBrokerImplModule {
-
- public RpcBrokerImplModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier,
- org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
- super(identifier, dependencyResolver);
- }
-
- public RpcBrokerImplModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier,
- org.opendaylight.controller.config.api.DependencyResolver dependencyResolver,
- RpcBrokerImplModule oldModule, java.lang.AutoCloseable oldInstance) {
- super(identifier, dependencyResolver, oldModule, oldInstance);
- }
-
- @Override
- public void validate() {
- super.validate();
- // Add custom validation for module attributes here.
- }
-
- @Override
- public java.lang.AutoCloseable createInstance() {
- // TODO:implement
- throw new java.lang.UnsupportedOperationException("Unimplemented stub method");
- }
-}
+++ /dev/null
-/*
- * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.controller.config.yang.md.sal.binding.impl;
-
-/**
-*
-*/
-public class RpcBrokerImplModuleFactory extends
- org.opendaylight.controller.config.yang.md.sal.binding.impl.AbstractRpcBrokerImplModuleFactory {
-
-}
+++ /dev/null
-/*
- * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.controller.config.yang.md.sal.binding.impl;
-
-import com.google.common.base.Preconditions;
-import java.util.Hashtable;
-import org.opendaylight.controller.md.sal.binding.impl.BindingToNormalizedNodeCodec;
-import org.opendaylight.controller.sal.binding.codegen.impl.SingletonHolder;
-import org.opendaylight.yangtools.binding.data.codec.gen.impl.StreamWriterGenerator;
-import org.opendaylight.yangtools.binding.data.codec.impl.BindingNormalizedNodeCodecRegistry;
-import org.opendaylight.yangtools.sal.binding.generator.impl.GeneratedClassLoadingStrategy;
-import org.opendaylight.yangtools.yang.model.api.SchemaContextListener;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceReference;
-
-/**
- *
-**/
-public final class RuntimeMappingModule extends AbstractRuntimeMappingModule {
-
- private BundleContext bundleContext;
-
- public RuntimeMappingModule(final org.opendaylight.controller.config.api.ModuleIdentifier identifier,
- final org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
- super(identifier, dependencyResolver);
- }
-
- public RuntimeMappingModule(final org.opendaylight.controller.config.api.ModuleIdentifier identifier,
- final org.opendaylight.controller.config.api.DependencyResolver dependencyResolver,
- final RuntimeMappingModule oldModule, final java.lang.AutoCloseable oldInstance) {
- super(identifier, dependencyResolver, oldModule, oldInstance);
- }
-
- @Override
- public void validate() {
- super.validate();
- Preconditions.checkNotNull(bundleContext);
- // Add custom validation for module attributes here.
- }
-
- @Override
- public boolean canReuseInstance(final AbstractRuntimeMappingModule oldModule) {
- return true;
- }
-
- @Override
- public java.lang.AutoCloseable createInstance() {
- final GeneratedClassLoadingStrategy classLoading = getGlobalClassLoadingStrategy();
- final BindingNormalizedNodeCodecRegistry codecRegistry = new BindingNormalizedNodeCodecRegistry(StreamWriterGenerator.create(SingletonHolder.JAVASSIST));
- final BindingToNormalizedNodeCodec instance = new BindingToNormalizedNodeCodec(classLoading, codecRegistry,getWaitForSchema());
- bundleContext.registerService(SchemaContextListener.class, instance, new Hashtable<String,String>());
- return instance;
- }
-
- private GeneratedClassLoadingStrategy getGlobalClassLoadingStrategy() {
- final ServiceReference<GeneratedClassLoadingStrategy> ref = bundleContext.getServiceReference(GeneratedClassLoadingStrategy.class);
- return bundleContext.getService(ref);
- }
-
- public void setBundleContext(final BundleContext bundleContext) {
- this.bundleContext = bundleContext;
- }
-}
+++ /dev/null
-/*
- * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.controller.config.yang.md.sal.binding.impl;
-
-import org.opendaylight.controller.config.api.DependencyResolver;
-import org.osgi.framework.BundleContext;
-
-import static com.google.common.base.Preconditions.checkArgument;
-
-/**
- *
- */
-public class RuntimeMappingModuleFactory extends
- org.opendaylight.controller.config.yang.md.sal.binding.impl.AbstractRuntimeMappingModuleFactory {
-
- public static final String SINGLETON_NAME = "runtime-mapping-singleton";
-
- @Override
- public RuntimeMappingModule instantiateModule(String instanceName, DependencyResolver dependencyResolver, RuntimeMappingModule oldModule, AutoCloseable oldInstance, BundleContext bundleContext) {
- checkArgument(SINGLETON_NAME.equals(instanceName),"Illegal instance name '" + instanceName + "', only allowed name is " + SINGLETON_NAME);
- RuntimeMappingModule module = super.instantiateModule(instanceName, dependencyResolver, oldModule, oldInstance, bundleContext);
- // FIXME bundle context should not be passed around
- module.setBundleContext(bundleContext);
- return module;
- }
-
- @Override
- public RuntimeMappingModule instantiateModule(String instanceName, DependencyResolver dependencyResolver, BundleContext bundleContext) {
- checkArgument(SINGLETON_NAME.equals(instanceName),"Illegal instance name '" + instanceName + "', only allowed name is " + SINGLETON_NAME);
- RuntimeMappingModule module = super.instantiateModule(instanceName, dependencyResolver, bundleContext);
- // FIXME bundle context should not be passed around
- module.setBundleContext(bundleContext);
- return module;
- }
-}
+++ /dev/null
-module opendaylight-sal-binding-broker-impl {
- yang-version 1;
- namespace "urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding:impl";
- prefix "binding-impl";
-
- import config { prefix config; revision-date 2013-04-05; }
- import opendaylight-md-sal-binding {prefix sal;}
- import opendaylight-md-sal-dom {prefix dom;}
- import opendaylight-md-sal-common {prefix common;}
-
- description
- "Service definition for Binding Aware MD-SAL.";
-
- revision "2013-10-28" {
- description
- "Initial revision";
- }
-
- identity binding-dom-mapping-service {
- base config:service-type;
- config:java-class "org.opendaylight.controller.md.sal.binding.impl.BindingToNormalizedNodeCodec";
- }
-
- /* FIXME: move to opendaylight-md-sal-binding (cannot be there due to Class name confict with old implementation)*/
- identity binding-new-notification-service {
- base config:service-type;
- config:java-class "org.opendaylight.controller.md.sal.binding.api.NotificationService";
- }
-
- /* TODO: move to opendaylight-md-sal-binding (cannot be there due to Class name confict with old implementation)*/
- identity binding-new-notification-publish-service {
- base config:service-type;
- config:java-class "org.opendaylight.controller.md.sal.binding.api.NotificationPublishService";
- }
-
- identity binding-broker-impl {
- base config:module-type;
- config:provided-service sal:binding-broker-osgi-registry;
- config:provided-service sal:binding-rpc-registry;
- config:java-name-prefix BindingBrokerImpl;
- }
-
- identity binding-data-compatible-broker {
- base config:module-type;
- config:provided-service sal:binding-data-broker;
- config:provided-service sal:binding-data-consumer-broker;
- config:java-name-prefix ForwardedCompatibleDataBrokerImpl;
- }
-
- identity binding-forwarded-data-broker {
- base config:module-type;
- config:provided-service sal:binding-async-data-broker;
- config:java-name-prefix BindingAsyncDataBrokerImpl;
- }
-
- identity binding-rpc-broker {
- base config:module-type;
- config:provided-service sal:binding-rpc-registry;
- config:java-name-prefix RpcBrokerImpl;
- }
-
- identity binding-notification-broker {
- base config:module-type;
- config:provided-service sal:binding-notification-service;
- config:provided-service sal:binding-notification-subscription-service;
- config:java-name-prefix NotificationBrokerImpl;
- }
-
- identity runtime-generated-mapping {
- base config:module-type;
- config:provided-service binding-dom-mapping-service;
- config:provided-service sal:binding-codec-tree-factory;
- config:provided-service sal:binding-normalized-node-serializer;
- config:java-name-prefix RuntimeMapping;
- }
-
- identity binding-notification-adapter {
- base config:module-type;
- config:provided-service binding-new-notification-service;
- config:java-name-prefix BindingNotificationAdapter;
- }
-
- identity binding-notification-publish-adapter {
- base config:module-type;
- config:provided-service binding-new-notification-publish-service;
- config:java-name-prefix BindingNotificationPublishAdapter;
- }
-
- grouping dom-forwarding-component {
- container dom-async-broker {
- uses config:service-ref {
- refine type {
- mandatory true;
- config:required-identity dom:dom-broker-osgi-registry;
- }
- }
- }
-
- container binding-mapping-service {
- uses config:service-ref {
- refine type {
- mandatory true;
- config:required-identity binding-dom-mapping-service;
- }
- }
- }
- }
-
- augment "/config:modules/config:module/config:configuration" {
- case binding-broker-impl {
- when "/config:modules/config:module/config:type = 'binding-broker-impl'";
-
- /*
- container rpc-registry {
- uses config:service-ref {
- refine type {
- mandatory true;
- config:required-identity sal:binding-rpc-registry;
- }
- }
- }*/
- container binding-broker-impl {
- uses dom-forwarding-component;
-
- container data-broker {
- uses config:service-ref {
- refine type {
- mandatory false;
- config:required-identity sal:binding-data-broker;
- }
- }
- }
-
- container notification-service {
- uses config:service-ref {
- refine type {
- mandatory true;
- config:required-identity sal:binding-notification-service;
- }
- }
- }
-
- container root-data-broker {
- uses config:service-ref {
- refine type {
- mandatory false;
- config:required-identity sal:binding-async-data-broker;
- }
- }
- }
- }
- }
- }
-
- augment "/config:modules/config:module/config:configuration" {
- case binding-data-compatible-broker {
- when "/config:modules/config:module/config:type = 'binding-data-compatible-broker'";
-
- container binding-data-compatible-broker {
- container data-broker {
- uses config:service-ref {
- refine type {
- mandatory false;
- config:required-identity sal:binding-async-data-broker;
- }
- }
- }
- }
- }
- }
-
- augment "/config:modules/config:module/config:configuration" {
- case binding-forwarded-data-broker {
- when "/config:modules/config:module/config:type = 'binding-forwarded-data-broker'";
- container binding-forwarded-data-broker {
- container dom-async-broker {
- uses config:service-ref {
- refine type {
- mandatory true;
- config:required-identity dom:dom-async-data-broker;
- }
- }
- }
-
- container binding-mapping-service {
- uses config:service-ref {
- refine type {
- mandatory true;
- config:required-identity binding-dom-mapping-service;
- }
- }
- }
-
- container schema-service {
- uses config:service-ref {
- refine type {
- mandatory true;
- config:required-identity dom:schema-service;
- }
- }
- }
- }
- }
- }
-
-
- augment "/config:modules/config:module/config:configuration" {
- case runtime-generated-mapping {
- when "/config:modules/config:module/config:type = 'runtime-generated-mapping'";
- leaf wait-for-schema {
- default "false";
- type boolean;
- }
- }
- }
-
- augment "/config:modules/config:module/config:state" {
- case binding-rpc-broker {
- when "/config:modules/config:module/config:type = 'binding-rpc-broker'";
- uses common:rpc-state;
- }
- }
-
- augment "/config:modules/config:module/config:configuration" {
- case binding-notification-broker {
- when "/config:modules/config:module/config:type = 'binding-notification-broker'";
- container notification-adapter {
- uses config:service-ref {
- refine type {
- mandatory false;
- config:required-identity binding-new-notification-service;
- }
- }
- }
-
- container notification-publish-adapter {
- uses config:service-ref {
- refine type {
- mandatory false;
- config:required-identity binding-new-notification-publish-service;
- }
- }
- }
- }
- }
-
- augment "/config:modules/config:module/config:state" {
- case binding-notification-broker {
- when "/config:modules/config:module/config:type = 'binding-notification-broker'";
- uses common:notification-state;
- }
- }
-
- augment "/config:modules/config:module/config:configuration" {
- case binding-notification-adapter {
- when "/config:modules/config:module/config:type = 'binding-notification-adapter'";
- container binding-notification-adapter {
- uses dom-forwarding-component;
- }
- }
- }
-
- augment "/config:modules/config:module/config:configuration" {
- case binding-notification-publish-adapter {
- when "/config:modules/config:module/config:type = 'binding-notification-publish-adapter'";
- container binding-notification-publish-adapter {
- uses dom-forwarding-component;
- }
- }
- }
-}
<artifactId>sal-binding-api</artifactId>
</dependency>
- <dependency>
- <groupId>org.opendaylight.controller</groupId>
- <artifactId>sal-binding-config</artifactId>
- </dependency>
-
<dependency>
<groupId>org.opendaylight.controller</groupId>
<artifactId>sal-common-api</artifactId>