2 * Copyright (c) 2013 Cisco Systems, 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.openflowplugin.droptest
10 import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.ProviderContext
11 import org.opendaylight.controller.sal.binding.api.NotificationProviderService
12 import org.opendaylight.controller.sal.binding.api.data.DataProviderService
13 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.AddFlowInput
14 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.RemoveFlowInput
15 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.SalFlowService
16 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.UpdateFlowInput
17 import org.opendaylight.yangtools.concepts.CompositeObjectRegistration
18 import org.opendaylight.yangtools.concepts.Registration
19 import org.slf4j.LoggerFactory
20 import org.opendaylight.yangtools.yang.binding.NotificationListener
22 class DropTestProvider implements AutoCloseable {
25 static val LOG = LoggerFactory.getLogger(DropTestProvider);
28 DataProviderService dataService;
31 NotificationProviderService notificationService;
33 val DropTestCommiter commiter = new DropTestCommiter(this);
35 Registration<NotificationListener> listenerRegistration
38 listenerRegistration = notificationService.registerNotificationListener(commiter);
39 LOG.debug("DropTestProvider Started.");
44 LOG.debug("DropTestProvider stopped.");
45 listenerRegistration?.close();