|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.felix.examples.dictionaryclient2.Activator
public class Activator
This class implements a bundle that uses a dictionary service to check for the proper spelling of a word by checking for its existence in the dictionary. This bundle is more complex than the bundle in Example 3 because it monitors the dynamic availability of the dictionary services. In other words, if the service it is using departs, then it stops using it gracefully, or if it needs a service and one arrives, then it starts using it automatically. As before, the bundle uses the first service that it finds and uses the calling thread of the start() method to read words from standard input. You can stop checking words by entering an empty line, but to start checking words again you must stop and then restart the bundle.
Constructor Summary | |
---|---|
Activator()
|
Method Summary | |
---|---|
void |
serviceChanged(org.osgi.framework.ServiceEvent event)
Implements ServiceListener.serviceChanged(). |
void |
start(org.osgi.framework.BundleContext context)
Implements BundleActivator.start(). |
void |
stop(org.osgi.framework.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 |
---|
public Activator()
Method Detail |
---|
public void start(org.osgi.framework.BundleContext context) throws java.lang.Exception
start
in interface org.osgi.framework.BundleActivator
context
- the framework context for the bundle.
java.lang.Exception
public void stop(org.osgi.framework.BundleContext context)
stop
in interface org.osgi.framework.BundleActivator
context
- the framework context for the bundle.public void serviceChanged(org.osgi.framework.ServiceEvent event)
serviceChanged
in interface org.osgi.framework.ServiceListener
event
- the fired service event.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |