Methods Summary |
---|
public void | handleChange(com.sun.enterprise.admin.monitor.registry.MonitoredObjectType t, com.sun.enterprise.admin.monitor.registry.MonitoringLevel from, com.sun.enterprise.admin.monitor.registry.MonitoringLevel to)
if (isTransactionServiceType(t)) {
handleChange(from, to);
}
else {
successor.handleChange(t, from, to);
}
|
private void | handleChange(com.sun.enterprise.admin.monitor.registry.MonitoringLevel from, com.sun.enterprise.admin.monitor.registry.MonitoringLevel to)
if (off2Low(from, to) || off2High(from, to)) {
notifyListeners(from, to);
registerMBeans();
}
if (low2Off(from, to) || high2Off(from, to)) {
unregisterMBeans();
notifyListeners(from, to);
}
if (low2High(from, to) || high2Low(from, to)) {
//currently do nothing.
}
|
private boolean | high2Low(com.sun.enterprise.admin.monitor.registry.MonitoringLevel from, com.sun.enterprise.admin.monitor.registry.MonitoringLevel to)
return ( from == MonitoringLevel.HIGH && to == MonitoringLevel.LOW );
|
private boolean | high2Off(com.sun.enterprise.admin.monitor.registry.MonitoringLevel from, com.sun.enterprise.admin.monitor.registry.MonitoringLevel to)
return ( from == MonitoringLevel.HIGH && to == MonitoringLevel.OFF );
|
private boolean | isTransactionServiceType(com.sun.enterprise.admin.monitor.registry.MonitoredObjectType t)
return ( t == MonitoredObjectType.TRANSACTION_SERVICE );
|
private boolean | low2High(com.sun.enterprise.admin.monitor.registry.MonitoringLevel from, com.sun.enterprise.admin.monitor.registry.MonitoringLevel to)
return ( from == MonitoringLevel.LOW && to == MonitoringLevel.HIGH);
|
private boolean | low2Off(com.sun.enterprise.admin.monitor.registry.MonitoringLevel from, com.sun.enterprise.admin.monitor.registry.MonitoringLevel to)
return ( from == MonitoringLevel.LOW && to == MonitoringLevel.OFF);
|
private void | notifyListeners(com.sun.enterprise.admin.monitor.registry.MonitoringLevel from, com.sun.enterprise.admin.monitor.registry.MonitoringLevel to)
logger.finer("DynamicReconfigurator: Now notifying the listeners for jta stats --- from = " + from.toString() + " to = " + to.toString());
final Map l = (Map)listeners.get(MonitoredObjectType.TRANSACTION_SERVICE);
if (l == null)
return;
final Iterator it = l.keySet().iterator();
while (it.hasNext()) {
final MonitoringLevelListener ml = (MonitoringLevelListener)it.next();
ml.changeLevel(from, to, MonitoredObjectType.TRANSACTION_SERVICE);
}
|
private boolean | off2High(com.sun.enterprise.admin.monitor.registry.MonitoringLevel from, com.sun.enterprise.admin.monitor.registry.MonitoringLevel to)
return ( from == MonitoringLevel.OFF && to == MonitoringLevel.HIGH );
|
private boolean | off2Low(com.sun.enterprise.admin.monitor.registry.MonitoringLevel from, com.sun.enterprise.admin.monitor.registry.MonitoringLevel to)
return ( from == MonitoringLevel.OFF && to == MonitoringLevel.LOW );
|
private void | registerMBeans()
final MonitoringRegistrationHelper registryImpl =
(MonitoringRegistrationHelper) MonitoringRegistrationHelper.getInstance();
//note that the above refers to the actual implementation rather than interface.
//registers MBeans pertaining to transaction service
final Iterator iter = registryImpl.getTransactionServiceNodes().iterator();
while (iter.hasNext()) {
final StatsHolder c = (StatsHolder) iter.next();
c.registerMBean();
logger.finer("DynamicReconfigurator: Now Registering MBean for --- " + c.getName());
}
|
private void | unregisterMBeans()
final MonitoringRegistrationHelper registryImpl =
(MonitoringRegistrationHelper) MonitoringRegistrationHelper.getInstance();
//note that the above refers to the actual implementation rather than interface.
final Iterator iter = registryImpl.getTransactionServiceNodes().iterator();
while (iter.hasNext()) {
final StatsHolder c = (StatsHolder) iter.next();
c.unregisterMBean();
logger.finer("DynamicReconfigurator: Now UnRegistering MBean for --- " + c.getName());
}
|