Class SimpleExtension

java.lang.Object
org.apache.felix.utils.extender.SimpleExtension
All Implemented Interfaces:
Extension

public abstract class SimpleExtension extends Object implements Extension
  • Field Details

    • bundle

      private final org.osgi.framework.Bundle bundle
    • bundleContext

      private final org.osgi.framework.BundleContext bundleContext
    • destroyed

      private final AtomicBoolean destroyed
  • Constructor Details

    • SimpleExtension

      public SimpleExtension(org.osgi.framework.Bundle bundle)
  • Method Details

    • isDestroyed

      public boolean isDestroyed()
    • start

      public void start() throws Exception
      Description copied from interface: Extension
      Start this extension. Starting and stopping of the extension should be synchronized.
      Specified by:
      start in interface Extension
      Throws:
      Exception - If starting fails.
    • destroy

      public void destroy() throws 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.
      Specified by:
      destroy in interface Extension
      Throws:
      Exception - If destroying fails.
    • getLock

      protected Object getLock()
    • doStart

      protected abstract void doStart() throws Exception
      Throws:
      Exception
    • doDestroy

      protected abstract void doDestroy() throws Exception
      Throws:
      Exception