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.ActionProviderService;
13 import org.opendaylight.mdsal.binding.api.ActionService;
14 import org.opendaylight.mdsal.binding.api.BindingService;
15 import org.opendaylight.mdsal.binding.api.DataBroker;
16 import org.opendaylight.mdsal.binding.api.DataTreeService;
17 import org.opendaylight.mdsal.binding.api.MountPointService;
18 import org.opendaylight.mdsal.binding.api.NotificationPublishService;
19 import org.opendaylight.mdsal.binding.api.NotificationService;
20 import org.opendaylight.mdsal.binding.api.RpcConsumerRegistry;
21 import org.opendaylight.mdsal.binding.api.RpcProviderService;
22 import org.opendaylight.mdsal.dom.api.DOMActionProviderService;
23 import org.opendaylight.mdsal.dom.api.DOMActionService;
24 import org.opendaylight.mdsal.dom.api.DOMDataBroker;
25 import org.opendaylight.mdsal.dom.api.DOMDataTreeService;
26 import org.opendaylight.mdsal.dom.api.DOMMountPointService;
27 import org.opendaylight.mdsal.dom.api.DOMNotificationPublishService;
28 import org.opendaylight.mdsal.dom.api.DOMNotificationService;
29 import org.opendaylight.mdsal.dom.api.DOMRpcProviderService;
30 import org.opendaylight.mdsal.dom.api.DOMRpcService;
31 import org.opendaylight.mdsal.dom.api.DOMService;
34 * Factory to turn various {@link DOMService}s into {@link BindingService}s.
36 * @author Thomas Pantelis
40 public interface AdapterFactory {
42 * Create a {@link DataBroker} backed by a {@link DOMDataBroker}.
44 * @param domService Backing DOMDataBroker
45 * @return A DataBroker
46 * @throws NullPointerException if {@code domService} is null
48 DataBroker createDataBroker(DOMDataBroker domService);
51 * Create a {@link DataTreeService} backed by a {@link DOMDataTreeService}.
53 * @param domService Backing DOMDataTreeService
54 * @return A DataTreeService
55 * @throws NullPointerException if {@code domService} is null
57 DataTreeService createDataTreeService(DOMDataTreeService domService);
60 * Create a {@link MountPointService} backed by a {@link DOMMountPointService}.
62 * @param domService Backing DOMMountPointService
63 * @return A MountPointService
64 * @throws NullPointerException if {@code domService} is null
66 MountPointService createMountPointService(DOMMountPointService domService);
69 * Create a {@link DataBroker} backed by a {@link DOMDataBroker}.
71 * @param domService Backing DOMDataBroker
72 * @return A DataBroker
73 * @throws NullPointerException if {@code domService} is null
75 NotificationService createNotificationService(DOMNotificationService domService);
78 * Create a {@link NotificationPublishService} backed by a {@link DOMNotificationPublishService}.
80 * @param domService Backing DOMNotificationPublishService
81 * @return A NotificationPublishService
82 * @throws NullPointerException if {@code domService} is null
84 NotificationPublishService createNotificationPublishService(DOMNotificationPublishService domService);
87 * Create a {@link RpcConsumerRegistry} backed by a {@link DOMRpcService}.
89 * @param domService Backing DOMRpcService
90 * @return An RpcConsumerRegistry
91 * @throws NullPointerException if {@code domService} is null
93 RpcConsumerRegistry createRpcConsumerRegistry(DOMRpcService domService);
96 * Create a {@link RpcProviderService} backed by a {@link DOMRpcProviderService}.
98 * @param domService Backing DOMRpcProviderService
99 * @return An RpcProviderService
100 * @throws NullPointerException if {@code domService} is null
102 RpcProviderService createRpcProviderService(DOMRpcProviderService domService);
105 * Create a {@link ActionService} backed by a {@link DOMActionService}.
107 * @param domService Backing DOMOperationService
108 * @return An ActionService
109 * @throws NullPointerException if {@code domService} is null
111 ActionService createActionService(DOMActionService domService);
114 * Create a {@link ActionProviderService} backed by a {@link DOMActionProviderService}.
116 * @param domService Backing DOMOperationProviderService
117 * @return An ActionProviderService
118 * @throws NullPointerException if {@code domService} is null
120 ActionProviderService createActionProviderService(DOMActionProviderService domService);