/* * 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 * - {@link DataTreeListener} type */ @Beta public class BindingDataTreeListenerRegistration extends AbstractListenerRegistration { 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(); } }