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; |
| 8 | import net.onrc.onos.ofcontroller.util.FlowId; |
| 9 | import net.onrc.onos.ofcontroller.util.FlowPath; |
| 10 | |
Pavlin Radoslavov | 1eee2c8 | 2013-10-15 02:30:32 -0700 | [diff] [blame] | 11 | /** |
| 12 | * Interface for providing Datagrid Service to other modules. |
| 13 | */ |
| 14 | public interface IDatagridService extends IFloodlightService { |
Pavlin Radoslavov | 1308dc6 | 2013-10-25 15:54:31 -0700 | [diff] [blame^] | 15 | /** |
| 16 | * Register Flow Service for receiving Flow-related notifications. |
| 17 | * |
| 18 | * NOTE: Only a single Flow Service can be registered. |
| 19 | * |
| 20 | * @param flowService the Flow Service to register. |
| 21 | */ |
| 22 | void registerFlowService(IFlowService flowService); |
| 23 | |
| 24 | /** |
| 25 | * De-register Flow Service for receiving Flow-related notifications. |
| 26 | * |
| 27 | * NOTE: Only a single Flow Service can be registered. |
| 28 | * |
| 29 | * @param flowService the Flow Service to de-register. |
| 30 | */ |
| 31 | void deregisterFlowService(IFlowService flowService); |
| 32 | |
| 33 | /** |
| 34 | * Get all Flows that are currently in the datagrid. |
| 35 | * |
| 36 | * @return all Flows that are currently in the datagrid. |
| 37 | */ |
| 38 | Collection<FlowPath> getAllFlows(); |
| 39 | |
| 40 | /** |
| 41 | * Send a notification that a Flow is added. |
| 42 | * |
| 43 | * @param flowPath the flow that is added. |
| 44 | */ |
| 45 | void notificationSendFlowAdded(FlowPath flowPath); |
| 46 | |
| 47 | /** |
| 48 | * Send a notification that a Flow is removed. |
| 49 | * |
| 50 | * @param flowId the Flow ID of the flow that is removed. |
| 51 | */ |
| 52 | void notificationSendFlowRemoved(FlowId flowId); |
| 53 | |
| 54 | /** |
| 55 | * Send a notification that a Flow is updated. |
| 56 | * |
| 57 | * @param flowPath the flow that is updated. |
| 58 | */ |
| 59 | void notificationSendFlowUpdated(FlowPath flowPath); |
| 60 | |
| 61 | /** |
| 62 | * Send a notification that all Flows are removed. |
| 63 | */ |
| 64 | void notificationSendAllFlowsRemoved(); |
Pavlin Radoslavov | 1eee2c8 | 2013-10-15 02:30:32 -0700 | [diff] [blame] | 65 | } |