Package org.onosproject.core
Interface CoreService
-
public interface CoreService
Service for interacting with the core system of the controller.
-
-
Field Summary
Fields Modifier and Type Field Description static String
CORE_APP_NAME
Name of the core "application".static ProviderId
CORE_PROVIDER_ID
Identifier of the core "provider".
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ApplicationId
getAppId(Short id)
Returns an existing application id from a given id.ApplicationId
getAppId(String name)
Returns an existing application id from a given id.Set<ApplicationId>
getAppIds()
Returns the set of currently registered application identifiers.IdGenerator
getIdGenerator(String topic)
Returns an id generator for a given topic.ApplicationId
registerApplication(String name)
Registers a new application by its name, which is expected to follow the reverse DNS convention, e.g.ApplicationId
registerApplication(String name, Runnable preDeactivate)
Registers a new application by its name, which is expected to follow the reverse DNS convention, e.g.Version
version()
Returns the product version.
-
-
-
Field Detail
-
CORE_APP_NAME
static final 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
Set<ApplicationId> getAppIds()
Returns the set of currently registered application identifiers.- Returns:
- set of application ids
-
getAppId
ApplicationId getAppId(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(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(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(String name, 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(String topic)
Returns an id generator for a given topic.- Parameters:
topic
- topic identified- Returns:
- the id generator
-
-