2 * Copyright (c) 2017 Ericsson India Global Services Pvt Ltd. 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
9 package org.opendaylight.openflowplugin.applications.reconciliation.impl;
11 import com.google.common.base.Preconditions;
12 import org.opendaylight.openflowplugin.applications.reconciliation.NotificationRegistration;
13 import org.opendaylight.openflowplugin.applications.reconciliation.ReconciliationNotificationListener;
15 public class ReconciliationServiceDelegate implements NotificationRegistration {
17 private final ReconciliationNotificationListener reconciliationNotificationListener;
18 private final AutoCloseable unregisterService;
20 public ReconciliationServiceDelegate(ReconciliationNotificationListener reconciliationNotificationListener,
21 AutoCloseable unregisterService) {
22 this.reconciliationNotificationListener = Preconditions.checkNotNull(reconciliationNotificationListener,
23 "ReconciliationNotificationListener can "
25 this.unregisterService = unregisterService;
29 public void close() throws Exception {
30 this.unregisterService.close();
31 this.reconciliationNotificationListener.close();