2 * Copyright (c) 2015 Brocade Communications Systems, Inc. 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.eos.binding.dom.adapter;
10 import static java.util.Objects.requireNonNull;
12 import org.opendaylight.mdsal.eos.binding.api.EntityOwnershipListener;
13 import org.opendaylight.mdsal.eos.binding.api.EntityOwnershipListenerRegistration;
14 import org.opendaylight.mdsal.eos.dom.api.DOMEntityOwnershipListenerRegistration;
15 import org.opendaylight.yangtools.concepts.AbstractObjectRegistration;
18 * Implementation of EntityOwnershipListenerRegistration whose instances are returned from the
19 * {@link BindingDOMEntityOwnershipServiceAdapter}.
21 * @author Thomas Pantelis
23 class BindingEntityOwnershipListenerRegistration extends AbstractObjectRegistration<EntityOwnershipListener>
24 implements EntityOwnershipListenerRegistration {
25 private final String entityType;
26 private final DOMEntityOwnershipListenerRegistration domRegistration;
28 BindingEntityOwnershipListenerRegistration(String entityType, EntityOwnershipListener listener,
29 DOMEntityOwnershipListenerRegistration domRegistration) {
31 this.entityType = requireNonNull(entityType);
32 this.domRegistration = requireNonNull(domRegistration);
36 public String getEntityType() {
41 protected void removeRegistration() {
42 domRegistration.close();