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