2 * Copyright © 2020 Nokia, 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.transportpce.servicehandler.listeners;
10 import org.opendaylight.mdsal.binding.api.NotificationPublishService;
11 import org.opendaylight.transportpce.servicehandler.service.ServiceDataStoreOperations;
12 import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.networkmodel.rev201116.TopologyUpdateResult;
13 import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.networkmodel.rev201116.TransportpceNetworkmodelListener;
14 import org.slf4j.Logger;
15 import org.slf4j.LoggerFactory;
17 public class NetworkModelListenerImpl implements TransportpceNetworkmodelListener {
19 private static final Logger LOG = LoggerFactory.getLogger(NetworkModelListenerImpl.class);
20 private final NotificationPublishService notificationPublishService; // to be used for T-API notification
21 private ServiceDataStoreOperations serviceDataStoreOperations;
23 public NetworkModelListenerImpl(NotificationPublishService notificationPublishService,
24 ServiceDataStoreOperations serviceDataStoreOperations) {
25 this.notificationPublishService = notificationPublishService;
26 this.serviceDataStoreOperations = serviceDataStoreOperations;
30 public void onTopologyUpdateResult(TopologyUpdateResult notification) {
31 LOG.info("Topology update notification: {}", notification.toString());
34 public void setserviceDataStoreOperations(ServiceDataStoreOperations serviceData) {
35 this.serviceDataStoreOperations = serviceData;