--- /dev/null
+/*
+ * Copyright (c) 2017 Pantheon Technologies s.r.o. and others. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.mdsal.binding.javav2.dom.adapter.registration;
+
+import com.google.common.annotations.Beta;
+import org.opendaylight.mdsal.binding.javav2.spec.base.Action;
+import org.opendaylight.mdsal.binding.javav2.spec.base.TreeNode;
+import org.opendaylight.mdsal.dom.api.DOMRpcImplementationRegistration;
+import org.opendaylight.yangtools.concepts.AbstractObjectRegistration;
+
+/**
+ * Registration of Binding - DOM Action adapter.
+ *
+ * @param <T>
+ * - {@link Action} type
+ */
+@Beta
+public class BindingDOMActionAdapterRegistration<T extends Action<? extends TreeNode, ?, ?>>
+ extends AbstractObjectRegistration<T> {
+
+ private final DOMRpcImplementationRegistration<?> reg;
+
+ // FIXME : DOM part doesn't work with Yang 1.1 - Action registration isn't implemented yet.
+ public BindingDOMActionAdapterRegistration(final T instance, final DOMRpcImplementationRegistration<?> reg) {
+ super(instance);
+ this.reg = reg;
+ }
+
+ @Override
+ protected void removeRegistration() {
+ reg.close();
+ }
+}
--- /dev/null
+/*
+ * Copyright (c) 2017 Pantheon Technologies s.r.o. and others. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.mdsal.binding.javav2.dom.adapter.registration;
+
+import com.google.common.annotations.Beta;
+import org.opendaylight.mdsal.binding.javav2.spec.base.Rpc;
+import org.opendaylight.mdsal.dom.api.DOMRpcImplementationRegistration;
+import org.opendaylight.yangtools.concepts.AbstractObjectRegistration;
+
+/**
+ * Registration of Binding - DOM RPC adapter.
+ *
+ * @param <T>
+ * - {@link Rpc} type
+ */
+@Beta
+public class BindingDOMRpcAdapterRegistration<T extends Rpc<?, ?>> extends AbstractObjectRegistration<T> {
+
+ private final DOMRpcImplementationRegistration<?> reg;
+
+ public BindingDOMRpcAdapterRegistration(final T instance, final DOMRpcImplementationRegistration<?> reg) {
+ super(instance);
+ this.reg = reg;
+ }
+
+ @Override
+ protected void removeRegistration() {
+ reg.close();
+ }
+}
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright (c) 2017 Pantheon Technologies s.r.o. and others. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.mdsal.binding.javav2.dom.adapter.registration;
+
+import com.google.common.annotations.Beta;
+import com.google.common.base.Preconditions;
+import org.opendaylight.mdsal.binding.javav2.api.DataTreeListener;
+import org.opendaylight.yangtools.concepts.AbstractListenerRegistration;
+import org.opendaylight.yangtools.concepts.ListenerRegistration;
+
+/**
+ * Registration of data tree listener.
+ *
+ * @param <L>
+ * - {@link DataTreeListener} type
+ */
+@Beta
+public class BindingDataTreeListenerRegistration<L extends DataTreeListener>
+ extends AbstractListenerRegistration<L> {
+
+ private final ListenerRegistration<?> domReg;
+
+ public BindingDataTreeListenerRegistration(final L listener, final ListenerRegistration<?> domReg) {
+ super(listener);
+ this.domReg = Preconditions.checkNotNull(domReg);
+ }
+
+ @Override
+ protected void removeRegistration() {
+ domReg.close();
+ }
+}