org.knopflerfish.framework
public class MainClassBundleActivator extends java.lang.Object implements BundleActivator, java.lang.Runnable
When the start method is called, a new thread is started for the bundle and the static main method is called with zero arguments.
When the stop method is called, any static method named "stop" is called.
Constructor and Description |
---|
MainClassBundleActivator(java.lang.Class clazz) |
Modifier and Type | Method and Description |
---|---|
void |
run() |
void |
start(BundleContext bc)
Called when this bundle is started so the Framework can perform the
bundle-specific activities necessary to start this bundle.
|
void |
stop(BundleContext bc)
Called when this bundle is stopped so the Framework can perform the
bundle-specific activities necessary to stop the bundle.
|
public MainClassBundleActivator(java.lang.Class clazz) throws java.lang.Exception
java.lang.Exception
public void start(BundleContext bc) throws BundleException
BundleActivator
This method must complete and return to its caller in a timely manner.
start
in interface BundleActivator
bc
- The execution context of the bundle being started.BundleException
Bundle.start()
public void stop(BundleContext bc) throws BundleException
BundleActivator
BundleActivator.start
method started. There should be no active threads that were started by
this bundle when this bundle returns. A stopped bundle must not call any
Framework objects.
This method must complete and return to its caller in a timely manner.
stop
in interface BundleActivator
bc
- The execution context of the bundle being stopped.BundleException
Bundle.stop()
public void run()
run
in interface java.lang.Runnable