/* * Copyright (c) 2015 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.binding.dom.adapter; import static com.google.common.base.Verify.verify; import java.util.concurrent.Executor; import org.opendaylight.mdsal.binding.api.InstanceNotificationService.KeyedListListener; import org.opendaylight.yangtools.yang.binding.DataObject; import org.opendaylight.yangtools.yang.binding.Identifiable; import org.opendaylight.yangtools.yang.binding.Identifier; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.opendaylight.yangtools.yang.binding.KeyedInstanceIdentifier; import org.opendaylight.yangtools.yang.binding.KeyedListNotification; final class KeyedInstanceNotificationListenerAdapter

, K extends Identifier

, N extends KeyedListNotification> extends AbstractInstanceNotificationListenerAdapter> { KeyedInstanceNotificationListenerAdapter(final AdapterContext adapterContext, final Class notificationClass, final KeyedListListener delegate, final Executor executor) { super(adapterContext, notificationClass, delegate, executor); } @Override @SuppressWarnings("unchecked") void onNotification(final KeyedListListener delegate, final InstanceIdentifier path, final N notification) { verify(path instanceof KeyedInstanceIdentifier, "Unexpected path %s", path); delegate.onNotification((KeyedInstanceIdentifier) path, notification); } }