FileDocCategorySizeDatePackage
HandlerChain.javaAPI DocGlassfish v2 API3625Fri May 04 22:24:18 BST 2007com.sun.enterprise.admin.monitor.callflow

HandlerChain

public class HandlerChain extends Object
author
hsingh

Fields Summary
private static final Logger
logger
private boolean
traceOn
Map
handlers
Constructors Summary
public HandlerChain()
Creates a new instance of HandlerChain

           
      
        traceOn = TraceOnHelper.isTraceOn();
    
Methods Summary
public voidaddHandler(Handler handler)

        String name = handler.getName();
        if (name == null){
            name = handler.getClass().getName();
        }
        handlers.put(name, handler);
        if (traceOn){
            StringBuffer sb = new StringBuffer ();
            for (String handlerName : handlers.keySet()){
                sb.append(handlerName+ ", ");
            }
            logger.log(Level.INFO, " Callflow: Handlers :" +sb.toString() );
        }
    
public Handler[]getHandlers()

        Handler[] h = handlers.values().toArray (new Handler[0]);
        return h;
    
public voidremoveHandler(java.lang.String name)

        if(traceOn){
            logger.log(Level.INFO, " Callflow:Removing Handler :" +name );        
        }
        handlers.remove(name);