|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.Thread
org.apache.felix.fileinstall.internal.DirectoryWatcher
public class DirectoryWatcher
-DirectoryWatcher- This class runs a background task that checks a directory for new files or removed files. These files can be configuration files or jars. For jar files, its behavior is defined below: - If there are new jar files, it installs them and optionally starts them. - If it fails to install a jar, it does not try to install it again until the jar has been modified. - If it fail to start a bundle, it attempts to start it in following iterations until it succeeds or the corresponding jar is uninstalled. - If some jar files have been deleted, it uninstalls them. - If some jar files have been updated, it updates them. - If it fails to update a bundle, it tries to update it in following iterations until it is successful. - If any bundle gets updated or uninstalled, it refreshes the framework for the changes to take effect. - If it detects any new installations, uninstallations or updations, it tries to start all the managed bundle unless it has been configured to only install bundles.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.lang.Thread |
|---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
| Field Summary | |
|---|---|
static java.lang.String |
DEBUG
|
static java.lang.String |
DIR
|
static java.lang.String |
FILENAME
|
static java.lang.String |
FILTER
|
static java.lang.String |
NO_INITIAL_DELAY
|
static java.lang.String |
POLL
|
static java.lang.String |
START_NEW_BUNDLES
|
static java.lang.String |
TMPDIR
|
| Fields inherited from class java.lang.Thread |
|---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
|---|---|
DirectoryWatcher(java.util.Dictionary properties,
org.osgi.framework.BundleContext context)
|
|
| Method Summary | |
|---|---|
void |
bundleChanged(org.osgi.framework.BundleEvent bundleEvent)
|
void |
close()
|
java.util.Dictionary |
getProperties()
|
void |
run()
Main run loop, will traverse the directory, and then handle the delta between installed and newly found/lost bundles and configurations. |
void |
start()
|
| Methods inherited from class java.lang.Thread |
|---|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, stop, stop, suspend, toString, yield |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String FILENAME
public static final java.lang.String POLL
public static final java.lang.String DIR
public static final java.lang.String DEBUG
public static final java.lang.String TMPDIR
public static final java.lang.String FILTER
public static final java.lang.String START_NEW_BUNDLES
public static final java.lang.String NO_INITIAL_DELAY
| Constructor Detail |
|---|
public DirectoryWatcher(java.util.Dictionary properties,
org.osgi.framework.BundleContext context)
| Method Detail |
|---|
public java.util.Dictionary getProperties()
public void start()
start in class java.lang.Threadpublic void run()
run in interface java.lang.Runnablerun in class java.lang.Threadpublic void bundleChanged(org.osgi.framework.BundleEvent bundleEvent)
bundleChanged in interface org.osgi.framework.BundleListenerpublic void close()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||