|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.tivoli.jmx.jar.JarInstaller
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.
Constructor Summary | |
JarInstaller(java.io.File directory)
Creates an instance configured with the specified directory and the default domain |
|
JarInstaller(java.io.File[] directories)
Creates an instance configured with the specified directories and the default domain |
|
JarInstaller(java.io.File[] directories,
java.lang.String domain)
Creates an instance configured with the specified directories and domain |
|
JarInstaller(java.io.File directory,
java.lang.String domain)
Creates an instance configured with the specified directory and the domain. |
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()
Gets the polling time. |
boolean |
getPurge()
Returns the purge flag. |
void |
initializeObservers()
Initializes the observers by invoking their |
boolean |
isActive()
Returns the status. |
void |
postDeregister()
Invoked after the deregistration |
void |
postRegister(java.lang.Boolean registrationDone)
Invoked after the deregistration. |
void |
preDeregister()
Removes the framework used before deregistration. |
javax.management.ObjectName |
preRegister(javax.management.MBeanServer server,
javax.management.ObjectName name)
Creates the framework before registration |
void |
setGranularityPeriod(long granularityPeriod)
Sets the polling time. |
void |
setPurge(boolean purge)
Sets the purge flag. |
Constructor Detail |
public JarInstaller(java.io.File directory)
default domain
directories
- the directories to be observedpublic JarInstaller(java.io.File directory, java.lang.String domain)
directories
- the directories to be observeddomain
- the domain to be usedpublic JarInstaller(java.io.File[] directories)
default domain
directories
- the directories to be observedpublic JarInstaller(java.io.File[] directories, java.lang.String domain)
directories
- the directories to be observeddomain
- the domain to be usedMethod Detail |
public java.io.File[] getDirectories()
public void setGranularityPeriod(long granularityPeriod)
granularityPeriod
- the granularity period to poll the directoriespublic long getGranularityPeriod()
public void setPurge(boolean purge)
purge
- True enables the deregistration of all the MLet
registered by the JarInstaller MBeanpublic boolean getPurge()
public void enable()
public void disable()
public boolean isActive()
the
- current statuspublic void postDeregister()
public void preDeregister()
public void postRegister(java.lang.Boolean registrationDone)
registrationDone
- public javax.management.ObjectName preRegister(javax.management.MBeanServer server, javax.management.ObjectName name) throws java.lang.Exception
server
- the mBeanServername
- the ObjectName to be usedpublic void initializeObservers()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |