Switch to MD-SAL APIs
[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 package org.opendaylight.openflowplugin.learningswitch;
9
10 import org.opendaylight.mdsal.binding.api.DataBroker;
11 import org.opendaylight.mdsal.binding.api.NotificationService;
12 import org.opendaylight.yang.gen.v1.urn.opendaylight.packet.service.rev130709.PacketProcessingService;
13
14 public interface LearningSwitchManager {
15
16     /**
17      * Stops this manager.
18      */
19     void stop();
20
21     /**
22      * Starts this manager.
23      */
24     void start();
25
26     /**
27      * Set's Data Broker dependency.
28      *
29      * <p>
30      * Data Broker is used to access overall operational and configuration tree.
31      *
32      * <p>
33      * In simple Learning Switch handler, data broker is used to listen
34      * for changes in Openflow tables and to configure flows which will
35      * be provisioned down to the Openflow switch.
36      *
37      * <p>
38      * inject {@link DataBroker}
39      */
40     void setDataBroker(DataBroker data);
41
42     /**
43      * Set's Packet Processing dependency.
44      *
45      * <p>
46      * Packet Processing service is used to send packet Out on Openflow switch.
47      *
48      * <p>
49      * inject {@link PacketProcessingService}
50      */
51     void setPacketProcessingService(
52             PacketProcessingService packetProcessingService);
53
54     /**
55      * Set's Notification service dependency.
56      *
57      * <p>
58      * Notification service is used to register for listening packet-in notifications.
59      *
60      * <p>
61      * inject {@link NotificationService}
62      */
63     void setNotificationService(NotificationService notificationService);
64 }