learning switch shifted to new data broker API
[openflowplugin.git] / samples / learning-switch / src / main / java / org / opendaylight / openflowplugin / learningswitch / LearningSwitchManager.java
1 /**
2  * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
3  *
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
7  */
8
9 package org.opendaylight.openflowplugin.learningswitch;
10
11 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
12 import org.opendaylight.controller.sal.binding.api.NotificationService;
13 import org.opendaylight.controller.sal.binding.api.data.DataBrokerService;
14 import org.opendaylight.yang.gen.v1.urn.opendaylight.packet.service.rev130709.PacketProcessingService;
15
16 /**
17  *
18  */
19 public interface LearningSwitchManager {
20
21     /**
22      * stop manager
23      */
24     void stop();
25
26     /**
27      * start manager
28      */
29     void start();
30
31     /**
32      * Set's Data Broker dependency.
33      * <p/>
34      * Data Broker is used to access overal operational and configuration
35      * tree.
36      * <p/>
37      * In simple Learning Switch handler, data broker is used to listen
38      * for changes in Openflow tables and to configure flows which will
39      * be provisioned down to the Openflow switch.
40      * <p/>
41      * inject {@link DataBroker}
42      *
43      * @param data
44      */
45     void setDataBroker(DataBroker data);
46
47     /**
48      * Set's Packet Processing dependency.
49      * <p/>
50      * Packet Processing service is used to send packet Out on Openflow
51      * switch.
52      * <p/>
53      * inject {@link PacketProcessingService}
54      *
55      * @param packetProcessingService
56      */
57     void setPacketProcessingService(
58             PacketProcessingService packetProcessingService);
59
60     /**
61      * Set's Notification service dependency.
62      * <p/>
63      * Notification service is used to register for listening
64      * packet-in notifications.
65      * <p/>
66      * inject {@link NotificationService}
67      *
68      * @param notificationService
69      */
70     void setNotificationService(NotificationService notificationService);
71 }