public class DirectoryMonitor extends Object implements org.osgi.framework.BundleActivator, org.osgi.util.tracker.ServiceTrackerCustomizer
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.
|
Object |
addingService(org.osgi.framework.ServiceReference reference) |
void |
modifiedService(org.osgi.framework.ServiceReference reference,
Object 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 reference,
Object o) |
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 Exception
start
in interface org.osgi.framework.BundleActivator
Exception
public void stop(org.osgi.framework.BundleContext context) throws Exception
stop
in interface org.osgi.framework.BundleActivator
Exception
public Object addingService(org.osgi.framework.ServiceReference reference)
addingService
in interface org.osgi.util.tracker.ServiceTrackerCustomizer
public void modifiedService(org.osgi.framework.ServiceReference reference, Object o)
modifiedService
in interface org.osgi.util.tracker.ServiceTrackerCustomizer
public void removedService(org.osgi.framework.ServiceReference reference, Object o)
removedService
in interface org.osgi.util.tracker.ServiceTrackerCustomizer
Copyright © 2009–2013 OW2 Chameleon. All rights reserved.