Package org.apache.felix.utils.extender
Class SimpleExtension
- java.lang.Object
-
- org.apache.felix.utils.extender.SimpleExtension
-
-
Field Summary
Fields Modifier and Type Field Description private org.osgi.framework.Bundle
bundle
private org.osgi.framework.BundleContext
bundleContext
private java.util.concurrent.atomic.AtomicBoolean
destroyed
-
Constructor Summary
Constructors Constructor Description SimpleExtension(org.osgi.framework.Bundle bundle)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
destroy()
Destroy should be synchronous and only return when the extension has been fully destroyed.protected abstract void
doDestroy()
protected abstract void
doStart()
protected java.lang.Object
getLock()
boolean
isDestroyed()
void
start()
Start this extension.
-
-
-
Method Detail
-
isDestroyed
public boolean isDestroyed()
-
start
public void start() throws java.lang.Exception
Description copied from interface:Extension
Start this extension. Starting and stopping of the extension should be synchronized.
-
destroy
public void destroy() throws java.lang.Exception
Description copied from interface:Extension
Destroy should be synchronous and only return when the extension has been fully destroyed. In addition it must be synchronized with start, because start() and destroy() can be called concurrently.
-
getLock
protected java.lang.Object getLock()
-
doStart
protected abstract void doStart() throws java.lang.Exception
- Throws:
java.lang.Exception
-
doDestroy
protected abstract void doDestroy() throws java.lang.Exception
- Throws:
java.lang.Exception
-
-