Package org.openhab.core.test
Class BundleCloseable
java.lang.Object
org.openhab.core.test.BundleCloseable
- All Implemented Interfaces:
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 Summary
-
Method Summary
-
Constructor Details
-
BundleCloseable
public BundleCloseable(org.osgi.framework.Bundle bundle)
-
-
Method Details
-
close
public void close() throws org.osgi.framework.BundleException- Specified by:
close
in interfaceAutoCloseable
- Throws:
org.osgi.framework.BundleException
-
bundle
public org.osgi.framework.Bundle bundle()
-