org.apache.felix.examples.frenchdictionary
Class Activator

java.lang.Object
  extended by org.apache.felix.examples.frenchdictionary.Activator
All Implemented Interfaces:
BundleActivator

public class Activator
extends Object
implements BundleActivator

This class implements a simple bundle that uses the bundle context to register an French language dictionary service with the OSGi framework. The dictionary service interface is defined in a separate class file and is implemented by an inner class. This class is identical to the class in Example 2, except that the dictionary contains French words.

Author:
Felix Project Team

Constructor Summary
Activator()
           
 
Method Summary
 void start(BundleContext context)
          Implements BundleActivator.start().
 void stop(BundleContext context)
          Implements BundleActivator.stop().
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Activator

public Activator()
Method Detail

start

public void start(BundleContext context)
Implements BundleActivator.start(). Registers an instance of a dictionary service using the bundle context; attaches properties to the service that can be queried when performing a service look-up.

Specified by:
start in interface BundleActivator
Parameters:
context - the framework context for the bundle.

stop

public void stop(BundleContext context)
Implements BundleActivator.stop(). Does nothing since the framework will automatically unregister any registered services.

Specified by:
stop in interface BundleActivator
Parameters:
context - the framework context for the bundle.


Copyright © 2006-2011 Apache Software Foundation. All Rights Reserved.