2 * Copyright (c) 2018 Inocybe Technologies 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.spi;
10 import com.google.common.annotations.Beta;
11 import org.eclipse.jdt.annotation.NonNullByDefault;
12 import org.opendaylight.mdsal.binding.api.BindingService;
13 import org.opendaylight.mdsal.binding.api.DataBroker;
14 import org.opendaylight.mdsal.binding.api.DataTreeService;
15 import org.opendaylight.mdsal.binding.api.MountPointService;
16 import org.opendaylight.mdsal.binding.api.NotificationPublishService;
17 import org.opendaylight.mdsal.binding.api.NotificationService;
18 import org.opendaylight.mdsal.binding.api.RpcConsumerRegistry;
19 import org.opendaylight.mdsal.binding.api.RpcProviderService;
20 import org.opendaylight.mdsal.dom.api.DOMDataBroker;
21 import org.opendaylight.mdsal.dom.api.DOMDataTreeService;
22 import org.opendaylight.mdsal.dom.api.DOMMountPointService;
23 import org.opendaylight.mdsal.dom.api.DOMNotificationPublishService;
24 import org.opendaylight.mdsal.dom.api.DOMNotificationService;
25 import org.opendaylight.mdsal.dom.api.DOMRpcProviderService;
26 import org.opendaylight.mdsal.dom.api.DOMRpcService;
27 import org.opendaylight.mdsal.dom.api.DOMService;
30 * Factory to turn various {@link DOMService}s into {@link BindingService}s.
32 * @author Thomas Pantelis
36 public interface AdapterFactory {
38 * Create a {@link DataBroker} backed by a {@link DOMDataBroker}.
40 * @param domService Backing DOMDataBroker
41 * @return A DataBroker
42 * @throws NullPointerException if {@code domService} is null
44 DataBroker createDataBroker(DOMDataBroker domService);
47 * Create a {@link DataTreeService} backed by a {@link DOMDataTreeService}.
49 * @param domService Backing DOMDataTreeService
50 * @return A DataTreeService
51 * @throws NullPointerException if {@code domService} is null
53 DataTreeService createDataTreeService(DOMDataTreeService domService);
56 * Create a {@link MountPointService} backed by a {@link DOMMountPointService}.
58 * @param domService Backing DOMMountPointService
59 * @return A MountPointService
60 * @throws NullPointerException if {@code domService} is null
62 MountPointService createMountPointService(DOMMountPointService domService);
65 * Create a {@link DataBroker} backed by a {@link DOMDataBroker}.
67 * @param domService Backing DOMDataBroker
68 * @return A DataBroker
69 * @throws NullPointerException if {@code domService} is null
71 NotificationService createNotificationService(DOMNotificationService domService);
74 * Create a {@link NotificationPublishService} backed by a {@link DOMNotificationPublishService}.
76 * @param domService Backing DOMNotificationPublishService
77 * @return A NotificationPublishService
78 * @throws NullPointerException if {@code domService} is null
80 NotificationPublishService createNotificationPublishService(DOMNotificationPublishService domService);
83 * Create a {@link RpcConsumerRegistry} backed by a {@link DOMRpcService}.
85 * @param domService Backing DOMRpcService
86 * @return A RpcConsumerRegistry
87 * @throws NullPointerException if {@code domService} is null
89 RpcConsumerRegistry createRpcConsumerRegistry(DOMRpcService domService);
92 * Create a {@link RpcProviderService} backed by a {@link DOMRpcProviderService}.
94 * @param domService Backing DOMRpcProviderService
95 * @return A RpcProviderService
96 * @throws NullPointerException if {@code domService} is null
98 RpcProviderService createRpcProviderService(DOMRpcProviderService domService);