2 * Copyright (c) 2015 Inocybe Technologies 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.groupbasedpolicy.renderer.iovisor.endpoint;
11 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
12 import org.slf4j.Logger;
13 import org.slf4j.LoggerFactory;
15 import com.google.common.base.Preconditions;
17 public class EndpointManager implements AutoCloseable {
19 private static final Logger LOG = LoggerFactory.getLogger(EndpointManager.class);
20 private EndpointListener endpointListener;
22 public EndpointManager(DataBroker dataBroker) {
23 LOG.debug("Initialized IOVisor EndpointManager");
24 Preconditions.checkNotNull("DataBroker instance must not be null", dataBroker);
26 this.endpointListener = new EndpointListener(dataBroker);
30 public void close() throws Exception {
31 if (endpointListener != null) {
32 endpointListener.close();