|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.Thread org.ow2.jonas.deployablemonitor.DeployableMonitor
public class DeployableMonitor
This monitor will search all the deployable from a list of directories.
In development mode, this monitor will detect changes on the deployables and
then restart or undeploy them if they have been changed or removed.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.lang.Thread |
---|
Thread.State, Thread.UncaughtExceptionHandler |
Field Summary |
---|
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
DeployableMonitor(DeployableMonitorService service)
Constructor of this monitor. |
Method Summary | |
---|---|
org.ow2.util.ee.deploy.api.deployer.IDeployerManager |
getDeployerManager()
|
List<File> |
getDirectories()
|
protected long |
getLastModified(File archive)
Gets the last modified attribute of a given archive. If it is a directory, returns the last modified file of the archive. |
protected boolean |
hasBeenUpdated(File file)
Check if the given file has been updated since the last check. |
boolean |
isDevelopmentMode()
|
void |
reset()
reset the state of all deployables. |
void |
run()
Start the thread of this class. |
void |
setDeployerManager(org.ow2.util.ee.deploy.api.deployer.IDeployerManager deployerManager)
Sets the deployer manager for deployers. |
void |
setDevelopmentMode(boolean developmentMode)
Enable or disable the development mode. |
void |
setDirectories(List<File> directories)
Sets the list of directories to monitor. |
void |
setExclusionPatterns(List<String> patterns)
|
void |
setMonitorInterval(int monitorInterval)
Set the monitor interval between each directory scan. |
void |
stopOrder()
Receives a stop order. |
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, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DeployableMonitor(DeployableMonitorService service)
service
- the DeployableMonitorService
instanceMethod Detail |
---|
public void reset()
public void run()
run
in interface Runnable
run
in class Thread
protected long getLastModified(File archive)
archive
- the archive to monitor.
protected boolean hasBeenUpdated(File file)
file
- the file to test
public List<File> getDirectories()
public void setDirectories(List<File> directories)
directories
- the list of directories to use.public boolean isDevelopmentMode()
public void setDevelopmentMode(boolean developmentMode)
developmentMode
- true if it has to be enabled.public void setMonitorInterval(int monitorInterval)
monitorInterval
- value to setpublic void stopOrder()
public org.ow2.util.ee.deploy.api.deployer.IDeployerManager getDeployerManager()
public void setDeployerManager(org.ow2.util.ee.deploy.api.deployer.IDeployerManager deployerManager)
deployerManager
- the instance of the deployer manager.public void setExclusionPatterns(List<String> patterns)
patterns
- List of exclusion patterns.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |