2 * Copyright (c) 2020 PANTHEON.tech, s.r.o. 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.mdsal.binding.dom.adapter.osgi;
10 import com.google.common.annotations.Beta;
11 import java.util.Collection;
13 import org.opendaylight.mdsal.binding.api.DataTreeIdentifier;
14 import org.opendaylight.mdsal.binding.api.DataTreeListener;
15 import org.opendaylight.mdsal.binding.api.DataTreeLoopException;
16 import org.opendaylight.mdsal.binding.api.DataTreeProducer;
17 import org.opendaylight.mdsal.binding.api.DataTreeService;
18 import org.opendaylight.yangtools.concepts.ListenerRegistration;
19 import org.osgi.service.component.annotations.Activate;
20 import org.osgi.service.component.annotations.Component;
21 import org.osgi.service.component.annotations.Deactivate;
24 @Component(factory = OSGiDataTreeService.FACTORY_NAME)
25 public final class OSGiDataTreeService extends AbstractAdaptedService<DataTreeService> implements DataTreeService {
26 // OSGi DS Component Factory name
27 static final String FACTORY_NAME = "org.opendaylight.mdsal.binding.dom.adapter.osgi.OSGiDataTreeService";
29 public OSGiDataTreeService() {
30 super(DataTreeService.class);
34 public DataTreeProducer createProducer(final Collection<DataTreeIdentifier<?>> subtrees) {
35 return delegate().createProducer(subtrees);
39 public <T extends DataTreeListener> ListenerRegistration<T> registerListener(final T listener,
40 final Collection<DataTreeIdentifier<?>> subtrees, final boolean allowRxMerges,
41 final Collection<DataTreeProducer> producers) throws DataTreeLoopException {
42 return delegate().registerListener(listener, subtrees, allowRxMerges, producers);
46 void activate(final Map<String, ?> properties) {
51 void deactivate(final int reason) {