Thomas Vachuska | e0f804a | 2014-10-27 23:40:48 -0700 | [diff] [blame] | 1 | package org.onlab.onos.core; |
| 2 | |
| 3 | import java.util.Set; |
tom | 53efab5 | 2014-10-07 17:43:48 -0700 | [diff] [blame] | 4 | |
| 5 | /** |
| 6 | * Service for interacting with the core system of the controller. |
| 7 | */ |
| 8 | public interface CoreService { |
| 9 | |
| 10 | /** |
| 11 | * Returns the product version. |
| 12 | * |
| 13 | * @return product version |
| 14 | */ |
| 15 | Version version(); |
| 16 | |
alshabib | 92c65ad | 2014-10-08 21:56:05 -0700 | [diff] [blame] | 17 | /** |
Thomas Vachuska | e0f804a | 2014-10-27 23:40:48 -0700 | [diff] [blame] | 18 | * Returns the set of currently registered application identifiers. |
| 19 | * |
| 20 | * @return set of application ids |
| 21 | */ |
| 22 | Set<ApplicationId> getAppIds(); |
| 23 | |
| 24 | /** |
| 25 | * Returns an existing application id from a given id. |
| 26 | * @param id the short value of the id |
| 27 | * @return an application id |
| 28 | */ |
| 29 | ApplicationId getAppId(Short id); |
| 30 | |
| 31 | /** |
alshabib | 92c65ad | 2014-10-08 21:56:05 -0700 | [diff] [blame] | 32 | * Registers a new application by its name, which is expected |
| 33 | * to follow the reverse DNS convention, e.g. |
| 34 | * {@code org.flying.circus.app} |
| 35 | * |
| 36 | * @param identifier string identifier |
| 37 | * @return the application id |
| 38 | */ |
| 39 | ApplicationId registerApplication(String identifier); |
| 40 | |
tom | 53efab5 | 2014-10-07 17:43:48 -0700 | [diff] [blame] | 41 | } |