example.platform.power/src/example/platform/power/ExamplePlatformKernel.java
private ServiceRegistration<EventHandler> registerEvents(BundleContext context)
    {
        final String[] topics = {TOPIC_SCHEDULE_WAKE_UP_EVENT, TOPIC_WAKESOURCE_ACTIVITY_DETECTED_EVENT};
        final Dictionary<String, Object> props = new Hashtable<String, Object>();
        props.put(EventConstants.EVENT_TOPIC, topics);
        
        return context.registerService(EventHandler.class, this, props);
    }
/**
     * Sets up the event registration topics the class is interested in
     * @param context
     *      the {@link BundleContext} to register the events with
     * @return
     *      the {@link ServiceRegistration} object reference for unregistering events on deactivation
     */
Sets up the event registration topics the class is interested in
@param context
the  BundleContext to register the events with
@return
the  ServiceRegistration object reference for unregistering events on deactivation
Sets up the event registration topics the class is interested in @param context the BundleContext to register the events with @return the ServiceRegistration object reference for unregistering events on deactivation
private ServiceRegistration<EventHandler> registerEvents(BundleContext context)
    {
        final String[] topics = {TOPIC_SCHEDULE_WAKE_UP_EVENT, TOPIC_WAKESOURCE_ACTIVITY_DETECTED_EVENT};
        final Dictionary<String, Object> props = new Hashtable<String, Object>();
        props.put(EventConstants.EVENT_TOPIC, topics);
        return context.registerService(EventHandler.class, this, props);
    }
private ServiceRegistration < EventHandler > registerEvents ( BundleContext context ) { final String [ ] topics = { TOPIC_SCHEDULE_WAKE_UP_EVENT , TOPIC_WAKESOURCE_ACTIVITY_DETECTED_EVENT } ; final Dictionary < String , Object > props = new Hashtable < String , Object > ( ) ; props . put ( EventConstants . EVENT_TOPIC , topics ) ; return context . registerService ( EventHandler . class , this , props ) ; }
Sets up the event registration topics the class is interested in
 @param context
      the {@link BundleContext} to register the events with
 @return
      the {@link ServiceRegistration} object reference for unregistering events on deactivation
Sets up the event registration topics the class is interested in @param context the { @link BundleContext } to register the events with @return the { @link ServiceRegistration } object reference for unregistering events on deactivation