blob: ccb14145876eb1e3055666e61b7d594b88d82db7 [file] [log] [blame]
Thomas Vachuskae0f804a2014-10-27 23:40:48 -07001/*
2 * Licensed to the Apache Software Foundation (ASF) under one
3 * or more contributor license agreements. See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership. The ASF licenses this file
6 * to you under the Apache License, Version 2.0 (the
7 * "License"); you may not use this file except in compliance
8 * with the License. You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing,
13 * software distributed under the License is distributed on an
14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 * KIND, either express or implied. See the License for the
16 * specific language governing permissions and limitations
17 * under the License.
18 */
19package org.onlab.onos.core;
20
21import java.util.Set;
22
23/**
24 * Manages application IDs.
25 */
26public interface ApplicationIdStore {
27
28 /**
29 * Returns the set of currently registered application identifiers.
30 *
31 * @return set of application ids
32 */
33 Set<ApplicationId> getAppIds();
34
35 /**
36 * Returns an existing application id from a given id.
37 * @param id the short value of the id
38 * @return an application id
39 */
40 ApplicationId getAppId(Short id);
41
42 /**
43 * Registers a new application by its name, which is expected
44 * to follow the reverse DNS convention, e.g.
45 * {@code org.flying.circus.app}
46 *
47 * @param identifier string identifier
48 * @return the application id
49 */
50 ApplicationId registerApplication(String identifier);
51
52}