com.springsource.util.osgi.internal
Class StandardPackageAdminUtil
java.lang.Object
com.springsource.util.osgi.internal.StandardPackageAdminUtil
- All Implemented Interfaces:
- PackageAdminUtil
public final class StandardPackageAdminUtil
- extends java.lang.Object
- implements PackageAdminUtil
StandardPackageAdminUtil
is the implementation of PackageAdminUtil
.
Concurrent Semantics
This class is thread safe.
- Since:
- Jersey
- Author:
- Glyn Normington
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PACKAGE_ADMIN_CLASS
private static final java.lang.String PACKAGE_ADMIN_CLASS
- See Also:
- Constant Field Values
SLEEP_INTERVAL_MS
private static final long SLEEP_INTERVAL_MS
- See Also:
- Constant Field Values
LOGGER
private static final org.slf4j.Logger LOGGER
monitor
private java.lang.Object monitor
started
private boolean started
packageAdmin
private final org.osgi.service.packageadmin.PackageAdmin packageAdmin
frameworkListener
private final org.osgi.framework.FrameworkListener frameworkListener
packageAdminServiceReference
private org.osgi.framework.ServiceReference packageAdminServiceReference
bundleContext
private final org.osgi.framework.BundleContext bundleContext
refreshComplete
private volatile boolean refreshComplete
StandardPackageAdminUtil
public StandardPackageAdminUtil(org.osgi.framework.BundleContext bundleContext)
stop
public void stop()
refreshPackages
public void refreshPackages(org.osgi.framework.Bundle[] bundles,
long timeoutMillis)
- Issue
refreshPackages
and wait for at most the given timeout for the asynchronous refresh
operation to complete.
- Specified by:
refreshPackages
in interface PackageAdminUtil
- Parameters:
bundles
- the Bundles
whose exported packages are to be refreshed or null
for
all Bundle
s updated or uninstalled since refreshPackages
was last calledtimeoutMillis
- a number of milliseconds to wait for the asynchronous refresh operation to complete
ensurePreviousRefreshComplete
private void ensurePreviousRefreshComplete()
waitForRefreshToComplete
private void waitForRefreshToComplete(long timeoutMillis)
sleep
private void sleep(long interval)