Pavlin Radoslavov | 1eee2c8 | 2013-10-15 02:30:32 -0700 | [diff] [blame] | 1 | package net.onrc.onos.datagrid; |
| 2 | |
Pavlin Radoslavov | 1308dc6 | 2013-10-25 15:54:31 -0700 | [diff] [blame] | 3 | import java.util.Collection; |
| 4 | |
Pavlin Radoslavov | 1eee2c8 | 2013-10-15 02:30:32 -0700 | [diff] [blame] | 5 | import net.floodlightcontroller.core.module.IFloodlightService; |
Pavlin Radoslavov | 9a85902 | 2013-10-30 10:08:24 -0700 | [diff] [blame] | 6 | import net.onrc.onos.ofcontroller.flowmanager.IFlowEventHandlerService; |
Jonathan Hart | d300325 | 2013-11-15 09:44:46 -0800 | [diff] [blame] | 7 | import net.onrc.onos.ofcontroller.proxyarp.ArpMessage; |
Jonathan Hart | 18ad55c | 2013-11-11 22:49:55 -0800 | [diff] [blame] | 8 | import net.onrc.onos.ofcontroller.proxyarp.IArpEventHandler; |
Pavlin Radoslavov | aaace7f | 2013-10-25 19:42:00 -0700 | [diff] [blame] | 9 | import net.onrc.onos.ofcontroller.topology.TopologyElement; |
Pavlin Radoslavov | b750684 | 2013-10-29 17:46:54 -0700 | [diff] [blame] | 10 | import net.onrc.onos.ofcontroller.util.FlowEntry; |
| 11 | import net.onrc.onos.ofcontroller.util.FlowEntryId; |
Pavlin Radoslavov | 1308dc6 | 2013-10-25 15:54:31 -0700 | [diff] [blame] | 12 | import net.onrc.onos.ofcontroller.util.FlowId; |
| 13 | import net.onrc.onos.ofcontroller.util.FlowPath; |
| 14 | |
Pavlin Radoslavov | 1eee2c8 | 2013-10-15 02:30:32 -0700 | [diff] [blame] | 15 | /** |
| 16 | * Interface for providing Datagrid Service to other modules. |
| 17 | */ |
| 18 | public interface IDatagridService extends IFloodlightService { |
Pavlin Radoslavov | 1308dc6 | 2013-10-25 15:54:31 -0700 | [diff] [blame] | 19 | /** |
Pavlin Radoslavov | 9a85902 | 2013-10-30 10:08:24 -0700 | [diff] [blame] | 20 | * Register Flow Event Handler Service for receiving Flow-related |
Pavlin Radoslavov | 6b79f2b | 2013-10-26 21:31:10 -0700 | [diff] [blame] | 21 | * notifications. |
Pavlin Radoslavov | 1308dc6 | 2013-10-25 15:54:31 -0700 | [diff] [blame] | 22 | * |
Pavlin Radoslavov | 9a85902 | 2013-10-30 10:08:24 -0700 | [diff] [blame] | 23 | * NOTE: Only a single Flow Event Handler Service can be registered. |
Pavlin Radoslavov | 1308dc6 | 2013-10-25 15:54:31 -0700 | [diff] [blame] | 24 | * |
Pavlin Radoslavov | 9a85902 | 2013-10-30 10:08:24 -0700 | [diff] [blame] | 25 | * @param flowEventHandlerService the Flow Event Handler Service to register. |
Pavlin Radoslavov | 1308dc6 | 2013-10-25 15:54:31 -0700 | [diff] [blame] | 26 | */ |
Pavlin Radoslavov | 9a85902 | 2013-10-30 10:08:24 -0700 | [diff] [blame] | 27 | void registerFlowEventHandlerService(IFlowEventHandlerService flowEventHandlerService); |
Pavlin Radoslavov | 1308dc6 | 2013-10-25 15:54:31 -0700 | [diff] [blame] | 28 | |
| 29 | /** |
Pavlin Radoslavov | 9a85902 | 2013-10-30 10:08:24 -0700 | [diff] [blame] | 30 | * De-register Flow Event Handler Service for receiving Flow-related |
Pavlin Radoslavov | 6b79f2b | 2013-10-26 21:31:10 -0700 | [diff] [blame] | 31 | * notifications. |
Pavlin Radoslavov | 1308dc6 | 2013-10-25 15:54:31 -0700 | [diff] [blame] | 32 | * |
Pavlin Radoslavov | 9a85902 | 2013-10-30 10:08:24 -0700 | [diff] [blame] | 33 | * NOTE: Only a single Flow Event Handler Service can be registered. |
Pavlin Radoslavov | 1308dc6 | 2013-10-25 15:54:31 -0700 | [diff] [blame] | 34 | * |
Pavlin Radoslavov | 9a85902 | 2013-10-30 10:08:24 -0700 | [diff] [blame] | 35 | * @param flowEventHandlerService the Flow Event Handler Service to |
Pavlin Radoslavov | 6b79f2b | 2013-10-26 21:31:10 -0700 | [diff] [blame] | 36 | * de-register. |
Pavlin Radoslavov | 1308dc6 | 2013-10-25 15:54:31 -0700 | [diff] [blame] | 37 | */ |
Pavlin Radoslavov | 9a85902 | 2013-10-30 10:08:24 -0700 | [diff] [blame] | 38 | void deregisterFlowEventHandlerService(IFlowEventHandlerService flowEventHandlerService); |
Pavlin Radoslavov | 1308dc6 | 2013-10-25 15:54:31 -0700 | [diff] [blame] | 39 | |
| 40 | /** |
Jonathan Hart | 18ad55c | 2013-11-11 22:49:55 -0800 | [diff] [blame] | 41 | * Register event handler for ARP events. |
| 42 | * |
| 43 | * @param arpEventHandler The ARP event handler to register. |
| 44 | */ |
| 45 | public void registerArpEventHandler(IArpEventHandler arpEventHandler); |
| 46 | |
| 47 | /** |
| 48 | * De-register event handler service for ARP events. |
| 49 | * |
| 50 | * @param arpEventHandler The ARP event handler to de-register. |
| 51 | */ |
| 52 | public void deregisterArpEventHandler(IArpEventHandler arpEventHandler); |
| 53 | |
| 54 | /** |
Pavlin Radoslavov | 1308dc6 | 2013-10-25 15:54:31 -0700 | [diff] [blame] | 55 | * Get all Flows that are currently in the datagrid. |
| 56 | * |
| 57 | * @return all Flows that are currently in the datagrid. |
| 58 | */ |
| 59 | Collection<FlowPath> getAllFlows(); |
| 60 | |
| 61 | /** |
| 62 | * Send a notification that a Flow is added. |
| 63 | * |
Pavlin Radoslavov | b750684 | 2013-10-29 17:46:54 -0700 | [diff] [blame] | 64 | * @param flowPath the Flow that is added. |
Pavlin Radoslavov | 1308dc6 | 2013-10-25 15:54:31 -0700 | [diff] [blame] | 65 | */ |
| 66 | void notificationSendFlowAdded(FlowPath flowPath); |
| 67 | |
| 68 | /** |
| 69 | * Send a notification that a Flow is removed. |
| 70 | * |
Pavlin Radoslavov | b750684 | 2013-10-29 17:46:54 -0700 | [diff] [blame] | 71 | * @param flowId the Flow ID of the Flow that is removed. |
Pavlin Radoslavov | 1308dc6 | 2013-10-25 15:54:31 -0700 | [diff] [blame] | 72 | */ |
| 73 | void notificationSendFlowRemoved(FlowId flowId); |
| 74 | |
| 75 | /** |
| 76 | * Send a notification that a Flow is updated. |
| 77 | * |
Pavlin Radoslavov | b750684 | 2013-10-29 17:46:54 -0700 | [diff] [blame] | 78 | * @param flowPath the Flow that is updated. |
Pavlin Radoslavov | 1308dc6 | 2013-10-25 15:54:31 -0700 | [diff] [blame] | 79 | */ |
| 80 | void notificationSendFlowUpdated(FlowPath flowPath); |
| 81 | |
| 82 | /** |
| 83 | * Send a notification that all Flows are removed. |
| 84 | */ |
| 85 | void notificationSendAllFlowsRemoved(); |
Pavlin Radoslavov | aaace7f | 2013-10-25 19:42:00 -0700 | [diff] [blame] | 86 | |
| 87 | /** |
Pavlin Radoslavov | b750684 | 2013-10-29 17:46:54 -0700 | [diff] [blame] | 88 | * Get all Flow Entries that are currently in the datagrid. |
| 89 | * |
| 90 | * @return all Flow Entries that are currently in the datagrid. |
| 91 | */ |
| 92 | Collection<FlowEntry> getAllFlowEntries(); |
| 93 | |
| 94 | /** |
| 95 | * Send a notification that a FlowEntry is added. |
| 96 | * |
| 97 | * @param flowEntry the FlowEntry that is added. |
| 98 | */ |
| 99 | void notificationSendFlowEntryAdded(FlowEntry flowEntry); |
| 100 | |
| 101 | /** |
| 102 | * Send a notification that a FlowEntry is removed. |
| 103 | * |
| 104 | * @param flowEntryId the FlowEntry ID of the FlowEntry that is removed. |
| 105 | */ |
| 106 | void notificationSendFlowEntryRemoved(FlowEntryId flowEntryId); |
| 107 | |
| 108 | /** |
| 109 | * Send a notification that a FlowEntry is updated. |
| 110 | * |
| 111 | * @param flowEntry the FlowEntry that is updated. |
| 112 | */ |
| 113 | void notificationSendFlowEntryUpdated(FlowEntry flowEntry); |
| 114 | |
| 115 | /** |
| 116 | * Send a notification that all Flow Entries are removed. |
| 117 | */ |
| 118 | void notificationSendAllFlowEntriesRemoved(); |
| 119 | |
| 120 | /** |
Pavlin Radoslavov | aaace7f | 2013-10-25 19:42:00 -0700 | [diff] [blame] | 121 | * Get all Topology Elements that are currently in the datagrid. |
| 122 | * |
| 123 | * @return all Topology Elements that are currently in the datagrid. |
| 124 | */ |
| 125 | Collection<TopologyElement> getAllTopologyElements(); |
| 126 | |
| 127 | /** |
| 128 | * Send a notification that a Topology Element is added. |
| 129 | * |
| 130 | * @param topologyElement the Topology Element that is added. |
| 131 | */ |
| 132 | void notificationSendTopologyElementAdded(TopologyElement topologyElement); |
| 133 | |
| 134 | /** |
| 135 | * Send a notification that a Topology Element is removed. |
| 136 | * |
| 137 | * @param topologyElement the Topology Element that is removed. |
| 138 | */ |
| 139 | void notificationSendTopologyElementRemoved(TopologyElement topologyElement); |
| 140 | |
| 141 | /** |
| 142 | * Send a notification that a Topology Element is updated. |
| 143 | * |
| 144 | * @param topologyElement the Topology Element that is updated. |
| 145 | */ |
| 146 | void notificationSendTopologyElementUpdated(TopologyElement topologyElement); |
| 147 | |
| 148 | /** |
| 149 | * Send a notification that all Topology Elements are removed. |
| 150 | */ |
| 151 | void notificationSendAllTopologyElementsRemoved(); |
Jonathan Hart | 18ad55c | 2013-11-11 22:49:55 -0800 | [diff] [blame] | 152 | |
| 153 | /** |
| 154 | * Send an ARP request to other ONOS instances |
| 155 | * @param arpRequest The request packet to send |
| 156 | */ |
Jonathan Hart | d300325 | 2013-11-15 09:44:46 -0800 | [diff] [blame] | 157 | public void sendArpRequest(ArpMessage arpMessage); |
Pavlin Radoslavov | 1eee2c8 | 2013-10-15 02:30:32 -0700 | [diff] [blame] | 158 | } |