Package org.onosproject.core
Interface CoreService
-
public interface CoreServiceService for interacting with the core system of the controller.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringCORE_APP_NAMEName of the core "application".static ProviderIdCORE_PROVIDER_IDIdentifier of the core "provider".
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ApplicationIdgetAppId(java.lang.Short id)Returns an existing application id from a given id.ApplicationIdgetAppId(java.lang.String name)Returns an existing application id from a given id.java.util.Set<ApplicationId>getAppIds()Returns the set of currently registered application identifiers.IdGeneratorgetIdGenerator(java.lang.String topic)Returns an id generator for a given topic.ApplicationIdregisterApplication(java.lang.String name)Registers a new application by its name, which is expected to follow the reverse DNS convention, e.g.ApplicationIdregisterApplication(java.lang.String name, java.lang.Runnable preDeactivate)Registers a new application by its name, which is expected to follow the reverse DNS convention, e.g.Versionversion()Returns the product version.
-
-
-
Field Detail
-
CORE_APP_NAME
static final java.lang.String CORE_APP_NAME
Name of the core "application".- See Also:
- Constant Field Values
-
CORE_PROVIDER_ID
static final ProviderId CORE_PROVIDER_ID
Identifier of the core "provider".
-
-
Method Detail
-
version
Version version()
Returns the product version.- Returns:
- product version
-
getAppIds
java.util.Set<ApplicationId> getAppIds()
Returns the set of currently registered application identifiers.- Returns:
- set of application ids
-
getAppId
ApplicationId getAppId(java.lang.Short id)
Returns an existing application id from a given id.- Parameters:
id- the short value of the id- Returns:
- an application id
-
getAppId
ApplicationId getAppId(java.lang.String name)
Returns an existing application id from a given id.- Parameters:
name- the name portion of the ID to look up- Returns:
- an application id
-
registerApplication
ApplicationId registerApplication(java.lang.String name)
Registers a new application by its name, which is expected to follow the reverse DNS convention, e.g.org.flying.circus.app- Parameters:
name- string identifier- Returns:
- the application id
-
registerApplication
ApplicationId registerApplication(java.lang.String name, java.lang.Runnable preDeactivate)
Registers a new application by its name, which is expected to follow the reverse DNS convention, e.g.org.flying.circus.app, along with its pre-deactivation hook.- Parameters:
name- string identifierpreDeactivate- pre-deactivation hook- Returns:
- the application id
-
getIdGenerator
IdGenerator getIdGenerator(java.lang.String topic)
Returns an id generator for a given topic.- Parameters:
topic- topic identified- Returns:
- the id generator
-
-