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 | 1308dc6 | 2013-10-25 15:54:31 -0700 | [diff] [blame] | 7 | import net.onrc.onos.ofcontroller.flowmanager.IFlowService; |
Pavlin Radoslavov | aaace7f | 2013-10-25 19:42:00 -0700 | [diff] [blame] | 8 | import net.onrc.onos.ofcontroller.topology.TopologyElement; |
Pavlin Radoslavov | 1308dc6 | 2013-10-25 15:54:31 -0700 | [diff] [blame] | 9 | import net.onrc.onos.ofcontroller.util.FlowId; |
| 10 | import net.onrc.onos.ofcontroller.util.FlowPath; |
| 11 | |
Pavlin Radoslavov | 1eee2c8 | 2013-10-15 02:30:32 -0700 | [diff] [blame] | 12 | /** |
| 13 | * Interface for providing Datagrid Service to other modules. |
| 14 | */ |
| 15 | public interface IDatagridService extends IFloodlightService { |
Pavlin Radoslavov | 1308dc6 | 2013-10-25 15:54:31 -0700 | [diff] [blame] | 16 | /** |
| 17 | * Register Flow Service for receiving Flow-related notifications. |
| 18 | * |
| 19 | * NOTE: Only a single Flow Service can be registered. |
| 20 | * |
| 21 | * @param flowService the Flow Service to register. |
| 22 | */ |
| 23 | void registerFlowService(IFlowService flowService); |
| 24 | |
| 25 | /** |
| 26 | * De-register Flow Service for receiving Flow-related notifications. |
| 27 | * |
| 28 | * NOTE: Only a single Flow Service can be registered. |
| 29 | * |
| 30 | * @param flowService the Flow Service to de-register. |
| 31 | */ |
| 32 | void deregisterFlowService(IFlowService flowService); |
| 33 | |
| 34 | /** |
| 35 | * Get all Flows that are currently in the datagrid. |
| 36 | * |
| 37 | * @return all Flows that are currently in the datagrid. |
| 38 | */ |
| 39 | Collection<FlowPath> getAllFlows(); |
| 40 | |
| 41 | /** |
| 42 | * Send a notification that a Flow is added. |
| 43 | * |
| 44 | * @param flowPath the flow that is added. |
| 45 | */ |
| 46 | void notificationSendFlowAdded(FlowPath flowPath); |
| 47 | |
| 48 | /** |
| 49 | * Send a notification that a Flow is removed. |
| 50 | * |
| 51 | * @param flowId the Flow ID of the flow that is removed. |
| 52 | */ |
| 53 | void notificationSendFlowRemoved(FlowId flowId); |
| 54 | |
| 55 | /** |
| 56 | * Send a notification that a Flow is updated. |
| 57 | * |
| 58 | * @param flowPath the flow that is updated. |
| 59 | */ |
| 60 | void notificationSendFlowUpdated(FlowPath flowPath); |
| 61 | |
| 62 | /** |
| 63 | * Send a notification that all Flows are removed. |
| 64 | */ |
| 65 | void notificationSendAllFlowsRemoved(); |
Pavlin Radoslavov | aaace7f | 2013-10-25 19:42:00 -0700 | [diff] [blame] | 66 | |
| 67 | /** |
| 68 | * Get all Topology Elements that are currently in the datagrid. |
| 69 | * |
| 70 | * @return all Topology Elements that are currently in the datagrid. |
| 71 | */ |
| 72 | Collection<TopologyElement> getAllTopologyElements(); |
| 73 | |
| 74 | /** |
| 75 | * Send a notification that a Topology Element is added. |
| 76 | * |
| 77 | * @param topologyElement the Topology Element that is added. |
| 78 | */ |
| 79 | void notificationSendTopologyElementAdded(TopologyElement topologyElement); |
| 80 | |
| 81 | /** |
| 82 | * Send a notification that a Topology Element is removed. |
| 83 | * |
| 84 | * @param topologyElement the Topology Element that is removed. |
| 85 | */ |
| 86 | void notificationSendTopologyElementRemoved(TopologyElement topologyElement); |
| 87 | |
| 88 | /** |
| 89 | * Send a notification that a Topology Element is updated. |
| 90 | * |
| 91 | * @param topologyElement the Topology Element that is updated. |
| 92 | */ |
| 93 | void notificationSendTopologyElementUpdated(TopologyElement topologyElement); |
| 94 | |
| 95 | /** |
| 96 | * Send a notification that all Topology Elements are removed. |
| 97 | */ |
| 98 | void notificationSendAllTopologyElementsRemoved(); |
Pavlin Radoslavov | 1eee2c8 | 2013-10-15 02:30:32 -0700 | [diff] [blame] | 99 | } |