|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This MBean works as a deployer of all the jar management system. Its constructor receives in input an array of directories to be monitored and optionally a domain. It can be further configured through two attributes: the granularity period to specify the observation time interval and the purge attribute.
At registration time this MBean instatiates, through the MBeanServer,
a javax.management.timer.Timer
a
com.tivoli.jmx.jar.DirectoryObserver
for each directory
specified, and an com.tivoli.jmx.jar.MLetManager
.
All the DirectoryObservers are added as listeners to the
javax.management.timer.Timer
while the
com.tivoli.jmx.jar.MLetManager
is added as listener in all
the DirectoryObservers. When the "enable" method is invoked, the
javax.management.timer.Timer
is started.
Periodically the javax.management.timer.Timer
sends a
Notification to all the DirectoryObservers in order to perform the
directory check to verify, for instance, if a new jar has been added. In turn.,
if a change is observed, the com.tivoli.jmx.jar.MLetManager
might receive a notification to register or unregister an
javax.management.loading.MLet
.
This process can be stopped through the "disable" method since it stops the
javax.management.timer.Timer
.
At deregistration time the javax.management.timer.Timer
, the
com.tivoli.jmx.jar.MLetManager
and all the DirectoryObservers are
deregistered according to the "purge" attribute value. In case the "purge"
attribute is set to true, the com.tivoli.jmx.jar.MLetManager
provides,
in turn, to deregister all the MLets.
Method Summary | |
void |
disable()
Disables the polling activity |
void |
enable()
The directories start to be monitored. |
java.io.File[] |
getDirectories()
Returns the observed directories |
long |
getGranularityPeriod()
Sets the polling time. |
boolean |
getPurge()
Returns the purge flag. |
boolean |
isActive()
Returns the status. |
void |
setGranularityPeriod(long granularityPeriod)
Sets the polling time. |
void |
setPurge(boolean purge)
Sets the purge flag. |
Method Detail |
public java.io.File[] getDirectories()
public void setGranularityPeriod(long granularityPeriod)
granularityPeriod
- the granularity period to poll the directoriespublic long getGranularityPeriod()
public boolean isActive()
the
- current statuspublic void enable() throws java.lang.Exception
public void disable() throws java.lang.Exception
public void setPurge(boolean purge)
purge
- True enables the deregistration of all the MLet
registered by the JarInstaller MBeanpublic boolean getPurge()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |