/* * Copyright (c) 2016 Cisco Systems, Inc. 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.eos.common.spi; import com.google.common.base.Preconditions; import javax.annotation.Nonnull; import org.opendaylight.mdsal.eos.common.api.GenericEntity; import org.opendaylight.mdsal.eos.common.api.GenericEntityOwnershipChange; import org.opendaylight.mdsal.eos.common.api.GenericEntityOwnershipListener; import org.opendaylight.mdsal.eos.common.api.GenericEntityOwnershipListenerRegistration; import org.opendaylight.yangtools.concepts.AbstractObjectRegistration; import org.opendaylight.yangtools.concepts.Path; /** * Abstract base class for an {@link GenericEntityOwnershipListenerRegistration} * * @param
the instance identifier path type
* @param , L extends GenericEntityOwnershipListener >>>
extends AbstractObjectRegistration {
private final String entityType;
protected AbstractGenericEntityOwnershipListenerRegistration(@Nonnull final L instance,
@Nonnull final String entityType) {
super(instance);
this.entityType = Preconditions.checkNotNull(entityType, "entityType cannot be null");
}
@Override
public String getEntityType() {
return entityType;
}
}