Committed by
Gerrit Code Review
OSPF-API refactored based on review comments, ONOS-2738
Change-Id: I94b22fd8f9eb8e706f049348de8ce99e2e599d67
Showing
1 changed file
with
89 additions
and
108 deletions
| 1 | -/* | 1 | +/* |
| 2 | - * Copyright 2016 Open Networking Laboratory | 2 | + * Copyright 2016 Open Networking Laboratory |
| 3 | - * | 3 | + * |
| 4 | - * Licensed under the Apache License, Version 2.0 (the "License"); | 4 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | - * you may not use this file except in compliance with the License. | 5 | + * you may not use this file except in compliance with the License. |
| 6 | - * You may obtain a copy of the License at | 6 | + * You may obtain a copy of the License at |
| 7 | - * | 7 | + * |
| 8 | - * http://www.apache.org/licenses/LICENSE-2.0 | 8 | + * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | - * | 9 | + * |
| 10 | - * Unless required by applicable law or agreed to in writing, software | 10 | + * Unless required by applicable law or agreed to in writing, software |
| 11 | - * distributed under the License is distributed on an "AS IS" BASIS, | 11 | + * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | - * See the License for the specific language governing permissions and | 13 | + * See the License for the specific language governing permissions and |
| 14 | - * limitations under the License. | 14 | + * limitations under the License. |
| 15 | - */ | 15 | + */ |
| 16 | -package org.onosproject.ospf.controller; | 16 | +package org.onosproject.ospf.controller; |
| 17 | - | 17 | + |
| 18 | -import java.util.List; | 18 | +import java.util.List; |
| 19 | -import java.util.Set; | 19 | +import java.util.Set; |
| 20 | - | 20 | + |
| 21 | -/** | 21 | +/** |
| 22 | - * Abstraction of an OSPF controller. | 22 | + * Abstraction of an OSPF controller. |
| 23 | - * Serves as a one stop shop for obtaining OSPF devices and (un)register listeners on OSPF events. | 23 | + * Serves as a one stop shop for obtaining OSPF devices and (un)register listeners on OSPF events. |
| 24 | - */ | 24 | + */ |
| 25 | -public interface OspfController { | 25 | +public interface OspfController { |
| 26 | - | 26 | + |
| 27 | - /** | 27 | + /** |
| 28 | - * Registers a listener for router meta events. | 28 | + * Registers a listener for router meta events. |
| 29 | - * | 29 | + * |
| 30 | - * @param listener the listener to notify | 30 | + * @param listener the listener to notify |
| 31 | - */ | 31 | + */ |
| 32 | - void addRouterListener(OspfRouterListener listener); | 32 | + void addRouterListener(OspfRouterListener listener); |
| 33 | - | 33 | + |
| 34 | - /** | 34 | + /** |
| 35 | - * Unregisters a router listener. | 35 | + * Unregisters a router listener. |
| 36 | - * | 36 | + * |
| 37 | - * @param listener the listener to unregister | 37 | + * @param listener the listener to unregister |
| 38 | - */ | 38 | + */ |
| 39 | - void removeRouterListener(OspfRouterListener listener); | 39 | + void removeRouterListener(OspfRouterListener listener); |
| 40 | - | 40 | + |
| 41 | - /** | 41 | + /** |
| 42 | - * Registers a listener for OSPF message events. | 42 | + * Registers a listener for OSPF message events. |
| 43 | - * | 43 | + * |
| 44 | - * @param listener the listener to notify | 44 | + * @param listener the listener to notify |
| 45 | - */ | 45 | + */ |
| 46 | - void addLinkListener(OspfLinkListener listener); | 46 | + void addLinkListener(OspfLinkListener listener); |
| 47 | - | 47 | + |
| 48 | - /** | 48 | + /** |
| 49 | - * Unregisters a link listener. | 49 | + * Unregisters a link listener. |
| 50 | - * | 50 | + * |
| 51 | - * @param listener the listener to unregister | 51 | + * @param listener the listener to unregister |
| 52 | - */ | 52 | + */ |
| 53 | - void removeLinkListener(OspfLinkListener listener); | 53 | + void removeLinkListener(OspfLinkListener listener); |
| 54 | - | 54 | + |
| 55 | - /** | 55 | + /** |
| 56 | - * Updates configuration of processes. | 56 | + * Updates configuration of processes. |
| 57 | - * | 57 | + * |
| 58 | - * @param processes process info to update | 58 | + * @param processes process info to update |
| 59 | - */ | 59 | + */ |
| 60 | - public void updateConfig(List<OspfProcess> processes); | 60 | + public void updateConfig(List<OspfProcess> processes); |
| 61 | - | 61 | + |
| 62 | - /** | 62 | + /** |
| 63 | - * Deletes configuration parameters. | 63 | + * Deletes configuration parameters. |
| 64 | - * | 64 | + * |
| 65 | - * @param processes list of process instance | 65 | + * @param processes list of process instance |
| 66 | - * @param attribute attribute to delete | 66 | + * @param attribute attribute to delete |
| 67 | - */ | 67 | + */ |
| 68 | - public void deleteConfig(List<OspfProcess> processes, String attribute); | 68 | + public void deleteConfig(List<OspfProcess> processes, String attribute); |
| 69 | - | 69 | + |
| 70 | - /** | 70 | + /** |
| 71 | - * Gets string representation of area configuration parameters to be displayed after CLI command. | 71 | + * Gets the list of listeners registered for router events. |
| 72 | - * | 72 | + * |
| 73 | - * @param processId process Id | 73 | + * @return list of listeners |
| 74 | - * @param areaId area Id | 74 | + */ |
| 75 | - * @return Area Information | 75 | + Set<OspfRouterListener> listener(); |
| 76 | - */ | 76 | + |
| 77 | - public String showAreaParameters(String processId, String areaId); | 77 | + /** |
| 78 | - | 78 | + * Gets the list of listeners registered for link events. |
| 79 | - /** | 79 | + * |
| 80 | - * Gets string representation of area configuration information for the given area/process. | 80 | + * @return list of listeners |
| 81 | - * This method will be called for CLI command. | 81 | + */ |
| 82 | - * | 82 | + public Set<OspfLinkListener> linkListener(); |
| 83 | - * @param processId process id to which area belongs | 83 | + |
| 84 | - * @param areaId area id | 84 | + /** |
| 85 | - * @return string representation of area configuration for CLI display | 85 | + * Gets the configured process. |
| 86 | - */ | 86 | + * |
| 87 | - List<String> showAreaConfigurations(String processId, String areaId); | 87 | + * @return list of process instances |
| 88 | - | 88 | + */ |
| 89 | - /** | 89 | + public List<OspfProcess> getAllConfiguredProcesses(); |
| 90 | - * Gets the list of listeners registered for router events. | ||
| 91 | - * | ||
| 92 | - * @return list of listeners | ||
| 93 | - */ | ||
| 94 | - Set<OspfRouterListener> listener(); | ||
| 95 | - | ||
| 96 | - /** | ||
| 97 | - * Gets the list of listeners registered for link events. | ||
| 98 | - * | ||
| 99 | - * @return list of listeners | ||
| 100 | - */ | ||
| 101 | - public Set<OspfLinkListener> linkListener(); | ||
| 102 | - | ||
| 103 | - /** | ||
| 104 | - * Gets the configured process. | ||
| 105 | - * | ||
| 106 | - * @return list of process instances | ||
| 107 | - */ | ||
| 108 | - public List<OspfProcess> getAllConfiguredProcesses(); | ||
| 109 | } | 90 | } |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
-
Please register or login to post a comment