FileDocCategorySizeDatePackage
DynamicReconfigurator.javaAPI DocGlassfish v2 API4479Fri May 04 22:24:20 BST 2007com.sun.enterprise.admin.monitor.registry.spi.reconfig

DynamicReconfigurator

public final class DynamicReconfigurator extends Object implements ChangeHandler
author
Kedar Mhaswade
since
S1AS8.0
version
$Revision: 1.4 $

Fields Summary
private final com.sun.enterprise.admin.monitor.registry.spi.ValueListMap
listeners
private ChangeHandler
successor
Constructors Summary
public DynamicReconfigurator(com.sun.enterprise.admin.monitor.registry.spi.ValueListMap listeners)

		this.listeners	= listeners;
		chain();
	
Methods Summary
public voidaddListener(com.sun.enterprise.admin.monitor.registry.MonitoredObjectType type, com.sun.enterprise.admin.monitor.registry.MonitoringLevelListener listener)

		if (listeners != null)
			listeners.put(type, listener);
	
private voidchain()

		// exercise care while forming this chain.
		final ChangeHandler c	= new EmptyChangeHandler();
        final ChangeHandler j   = new JVMChangeHandler(c, listeners);
		final ChangeHandler w	= new WebContainerChangeHandler(j, listeners);
		final ChangeHandler e	= new EjbContainerChangeHandler(w, listeners);
		final ChangeHandler ts	= new TransactionServiceChangeHandler(e, listeners);
		final ChangeHandler hs	= new HttpServiceChangeHandler(ts, listeners);		
		final ChangeHandler orb	= new OrbChangeHandler(hs, listeners);
		final ChangeHandler tp	= new ThreadPoolChangeHandler(orb, listeners);
        final ChangeHandler cp	= new ConnectionPoolChangeHandler(tp, listeners);
		this.successor = cp;
	
public voidhandleChange(com.sun.enterprise.admin.monitor.registry.MonitoredObjectType type, com.sun.enterprise.admin.monitor.registry.MonitoringLevel from, com.sun.enterprise.admin.monitor.registry.MonitoringLevel to)

		successor.handleChange(type, from, to);
	
public voidremoveListener(com.sun.enterprise.admin.monitor.registry.MonitoringLevelListener listener)

		listeners.remove(listener);