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.ActionService;
13 import org.opendaylight.mdsal.binding.api.BindingService;
14 import org.opendaylight.mdsal.binding.api.DataBroker;
15 import org.opendaylight.mdsal.binding.api.DataTreeService;
16 import org.opendaylight.mdsal.binding.api.MountPointService;
17 import org.opendaylight.mdsal.binding.api.NotificationPublishService;
18 import org.opendaylight.mdsal.binding.api.NotificationService;
19 import org.opendaylight.mdsal.binding.api.RpcConsumerRegistry;
20 import org.opendaylight.mdsal.binding.api.RpcProviderService;
21 import org.opendaylight.mdsal.dom.api.DOMDataBroker;
22 import org.opendaylight.mdsal.dom.api.DOMDataTreeService;
23 import org.opendaylight.mdsal.dom.api.DOMMountPointService;
24 import org.opendaylight.mdsal.dom.api.DOMNotificationPublishService;
25 import org.opendaylight.mdsal.dom.api.DOMNotificationService;
26 import org.opendaylight.mdsal.dom.api.DOMOperationService;
27 import org.opendaylight.mdsal.dom.api.DOMRpcProviderService;
28 import org.opendaylight.mdsal.dom.api.DOMRpcService;
29 import org.opendaylight.mdsal.dom.api.DOMService;
32 * Factory to turn various {@link DOMService}s into {@link BindingService}s.
34 * @author Thomas Pantelis
38 public interface AdapterFactory {
40 * Create a {@link DataBroker} backed by a {@link DOMDataBroker}.
42 * @param domService Backing DOMDataBroker
43 * @return A DataBroker
44 * @throws NullPointerException if {@code domService} is null
46 DataBroker createDataBroker(DOMDataBroker domService);
49 * Create a {@link DataTreeService} backed by a {@link DOMDataTreeService}.
51 * @param domService Backing DOMDataTreeService
52 * @return A DataTreeService
53 * @throws NullPointerException if {@code domService} is null
55 DataTreeService createDataTreeService(DOMDataTreeService domService);
58 * Create a {@link MountPointService} backed by a {@link DOMMountPointService}.
60 * @param domService Backing DOMMountPointService
61 * @return A MountPointService
62 * @throws NullPointerException if {@code domService} is null
64 MountPointService createMountPointService(DOMMountPointService domService);
67 * Create a {@link DataBroker} backed by a {@link DOMDataBroker}.
69 * @param domService Backing DOMDataBroker
70 * @return A DataBroker
71 * @throws NullPointerException if {@code domService} is null
73 NotificationService createNotificationService(DOMNotificationService domService);
76 * Create a {@link NotificationPublishService} backed by a {@link DOMNotificationPublishService}.
78 * @param domService Backing DOMNotificationPublishService
79 * @return A NotificationPublishService
80 * @throws NullPointerException if {@code domService} is null
82 NotificationPublishService createNotificationPublishService(DOMNotificationPublishService domService);
85 * Create a {@link RpcConsumerRegistry} backed by a {@link DOMRpcService}.
87 * @param domService Backing DOMRpcService
88 * @return A RpcConsumerRegistry
89 * @throws NullPointerException if {@code domService} is null
91 RpcConsumerRegistry createRpcConsumerRegistry(DOMRpcService domService);
94 * Create a {@link RpcProviderService} backed by a {@link DOMRpcProviderService}.
96 * @param domService Backing DOMRpcProviderService
97 * @return A RpcProviderService
98 * @throws NullPointerException if {@code domService} is null
100 RpcProviderService createRpcProviderService(DOMRpcProviderService domService);
103 * Create a {@link ActionService} backed by a {@link DOMOperationService}.
105 * @param domService Backing DOMOperationService
106 * @return A ActionService
107 * @throws NullPointerException if {@code domService} is null
109 ActionService createActionService(DOMOperationService domService);