public class DirectoryMonitor extends Object implements org.osgi.framework.BundleActivator, org.osgi.util.tracker.ServiceTrackerCustomizer<Deployer,Deployer>
| Modifier and Type | Field and Description |
|---|---|
protected List<Deployer> |
deployers
List of deployers
|
protected org.slf4j.Logger |
logger
A logger.
|
| Constructor and Description |
|---|
DirectoryMonitor(File directory) |
DirectoryMonitor(File directory,
long polling) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
acquireReadLockIfNotHeld()
Acquires the read lock only and only if no read lock is already held by the current thread.
|
boolean |
acquireWriteLockIfNotHeld()
Acquires the write lock only and only if the write lock is not already held by the current thread.
|
Deployer |
addingService(org.osgi.framework.ServiceReference<Deployer> reference) |
void |
modifiedService(org.osgi.framework.ServiceReference<Deployer> reference,
Deployer o) |
boolean |
releaseReadLockIfHeld()
Releases the read lock only and only if the read lock is held by the current thread.
|
boolean |
releaseWriteLockIfHeld()
Releases the write lock only and only if the write lock is held by the current thread.
|
void |
removedService(org.osgi.framework.ServiceReference<Deployer> reference,
Deployer deployer) |
void |
start(org.osgi.framework.BundleContext context) |
void |
stop(org.osgi.framework.BundleContext context) |
public DirectoryMonitor(File directory, long polling)
public DirectoryMonitor(File directory)
public boolean acquireWriteLockIfNotHeld()
public boolean releaseWriteLockIfHeld()
public boolean acquireReadLockIfNotHeld()
public boolean releaseReadLockIfHeld()
public void start(org.osgi.framework.BundleContext context)
throws IOException
start in interface org.osgi.framework.BundleActivatorIOExceptionpublic void stop(org.osgi.framework.BundleContext context)
stop in interface org.osgi.framework.BundleActivatorpublic Deployer addingService(org.osgi.framework.ServiceReference<Deployer> reference)
public void modifiedService(org.osgi.framework.ServiceReference<Deployer> reference, Deployer o)
Copyright © 2014 OW2 Chameleon. All rights reserved.