1c0d11884ce4d81bf6a93e65a069a935930de0f0
[controller.git] / opendaylight / md-sal / sal-binding-broker / src / main / java / org / opendaylight / controller / md / sal / binding / impl / BindingToDOMAdapterFactory.java
1 /*
2  * Copyright (c) 2018 Pantheon Technologies, s.r.o. and others.  All rights reserved.
3  *
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
7  */
8 package org.opendaylight.controller.md.sal.binding.impl;
9
10 import static java.util.Objects.requireNonNull;
11
12 import com.google.common.annotations.Beta;
13 import org.eclipse.jdt.annotation.NonNullByDefault;
14 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
15 import org.opendaylight.controller.md.sal.binding.spi.AdapterFactory;
16 import org.opendaylight.controller.md.sal.dom.api.DOMDataBroker;
17
18 @Beta
19 @Deprecated
20 @NonNullByDefault
21 public final class BindingToDOMAdapterFactory implements AdapterFactory {
22     private final BindingToNormalizedNodeCodec codec;
23
24     public BindingToDOMAdapterFactory(final BindingToNormalizedNodeCodec codec) {
25         this.codec = requireNonNull(codec);
26     }
27
28     @Override
29     public DataBroker createDataBroker(final DOMDataBroker domBroker) {
30         return new BindingDOMDataBrokerAdapter(requireNonNull(domBroker), codec);
31     }
32 }

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.