Class BundleCloseable

  • All Implemented Interfaces:
    AutoCloseable

    public class BundleCloseable
    extends Object
    implements AutoCloseable
    A wrapper that uninstalls a bundle on close.

    This wrapper allows the usage in try-with-resources blocks.

    Author:
    Markus Rathgeb - Initial contribution
    • Constructor Detail

      • BundleCloseable

        public BundleCloseable​(org.osgi.framework.Bundle bundle)
    • Method Detail

      • close

        public void close()
                   throws org.osgi.framework.BundleException
        Specified by:
        close in interface AutoCloseable
        Throws:
        org.osgi.framework.BundleException
      • bundle

        public org.osgi.framework.Bundle bundle()