blob: 0de33b3f9542643de3400ee53de7c6d0279e1d5f [file] [log] [blame]
Thomas Vachuskae0f804a2014-10-27 23:40:48 -07001package org.onlab.onos.core;
2
3import java.util.Set;
tom53efab52014-10-07 17:43:48 -07004
5/**
6 * Service for interacting with the core system of the controller.
7 */
8public interface CoreService {
9
10 /**
11 * Returns the product version.
12 *
13 * @return product version
14 */
15 Version version();
16
alshabib92c65ad2014-10-08 21:56:05 -070017 /**
Thomas Vachuskae0f804a2014-10-27 23:40:48 -070018 * 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 /**
alshabib92c65ad2014-10-08 21:56:05 -070032 * 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
tom53efab52014-10-07 17:43:48 -070041}