|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Thread
org.objectweb.easybeans.server.ContainersMonitor
public class ContainersMonitor
This class monitors the archives managed by containers and reload them if the archive is changed.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.lang.Thread |
---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
Field Summary | |
---|---|
private boolean |
bootInProgress
Initializing period ?. |
private Embedded |
embedded
Embedded server which is monitored. |
private JLog |
logger
Logger. |
private java.util.Map<EZBContainer,java.lang.Long> |
modifiedFiles
Map between container and the last updated file. |
private static int |
SLEEP_TIME
Sleep time for the thread of the cleaner (5s). |
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
ContainersMonitor(Embedded embedded)
Builds a new monitor by initializing lists. |
Method Summary | |
---|---|
protected void |
checkContainer(EZBContainer container)
Check a container (and its archive) and see if there is a need to reload the container. |
protected long |
getLastModified(java.io.File archive)
Gets the last modified attribute of a given archive. If it is a directory, returns the last modified file of the archive. |
void |
init()
Init containers (call at startup). |
void |
run()
Start the thread of this class It will clean all the work entries. |
private void |
scanNewContainers()
Scan all files present in the ejb3 directory and create container for each one. |
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 |
Field Detail |
---|
private static final int SLEEP_TIME
private JLog logger
private java.util.Map<EZBContainer,java.lang.Long> modifiedFiles
private Embedded embedded
private boolean bootInProgress
Constructor Detail |
---|
public ContainersMonitor(Embedded embedded)
embedded
- the embedded server which is monitored.Method Detail |
---|
public void init()
public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
private void scanNewContainers()
protected void checkContainer(EZBContainer container)
container
- the container to monitor.protected long getLastModified(java.io.File archive)
archive
- the archive to monitor.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |