Registering States as OSGi Services

To enable Brand Mobiliser to discover states at runtime, register them as OSGi services, by declaring them in the services-context.xml file.

Registered states are discoverable by the StatePlugin interface:
com.sybase365.mobiliser.brand.plugins.api.smapp.StatePlugin
Edit services-context.xml, and set OSGi service properties:
  • id – name of the service.
  • ref – name of the state.
  • interface – name of the class that implements the StatePlugin interface.
For example:
<osgi:service id="SampleStateService" ref="SampleState"
  interface="com.sybase365.mobiliser.brand.plugins.api.smapp.StatePlugin"/>