2 * Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved.
\r
4 * This program and the accompanying materials are made available under the
\r
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
\r
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
\r
9 package org.opendaylight.groupbasedpolicy.neutron.vpp.mapper;
\r
11 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
\r
12 import org.opendaylight.groupbasedpolicy.neutron.vpp.mapper.hostconfigs.VppNodeListener;
\r
13 import org.opendaylight.groupbasedpolicy.neutron.vpp.mapper.processors.NeutronListener;
\r
14 import org.slf4j.Logger;
\r
15 import org.slf4j.LoggerFactory;
\r
17 public class NeutronVppMapper implements AutoCloseable {
\r
19 NeutronListener neutronListener;
\r
20 VppNodeListener vppNodeListener;
\r
21 private static final Logger LOG = LoggerFactory.getLogger(NeutronVppMapper.class);
\r
23 public NeutronVppMapper(String socketPath, String socketPrefix, DataBroker dataBroker) {
\r
24 SocketInfo socketInfo = new SocketInfo(socketPath, socketPrefix);
\r
25 vppNodeListener = new VppNodeListener(dataBroker, socketInfo);
\r
26 neutronListener = new NeutronListener(dataBroker);
\r
27 LOG.info("Neutron VPP started!");
\r
31 public void close() {
\r
32 neutronListener.close();
\r
33 vppNodeListener.close();
\r