blob: 09efe223863b6c7df23d2746d2c078630d02b63c [file] [log] [blame]
Thomas Vachuska4f1a60c2014-10-28 13:39:07 -07001/*
2 * Copyright 2014 Open Networking Laboratory
3 *
4 * Licensed under the Apache License, Version 2.0 (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
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
Thomas Vachuskae0f804a2014-10-27 23:40:48 -070016package org.onlab.onos.core;
17
18import java.util.Set;
tom53efab52014-10-07 17:43:48 -070019
20/**
21 * Service for interacting with the core system of the controller.
22 */
23public interface CoreService {
24
25 /**
26 * Returns the product version.
27 *
28 * @return product version
29 */
30 Version version();
31
alshabib92c65ad2014-10-08 21:56:05 -070032 /**
Thomas Vachuskae0f804a2014-10-27 23:40:48 -070033 * Returns the set of currently registered application identifiers.
34 *
35 * @return set of application ids
36 */
37 Set<ApplicationId> getAppIds();
38
39 /**
40 * Returns an existing application id from a given id.
41 * @param id the short value of the id
42 * @return an application id
43 */
44 ApplicationId getAppId(Short id);
45
46 /**
alshabib92c65ad2014-10-08 21:56:05 -070047 * Registers a new application by its name, which is expected
48 * to follow the reverse DNS convention, e.g.
49 * {@code org.flying.circus.app}
50 *
51 * @param identifier string identifier
52 * @return the application id
53 */
54 ApplicationId registerApplication(String identifier);
55
tom53efab52014-10-07 17:43:48 -070056}