FileDocCategorySizeDatePackage
HandlerManager.javaAPI DocGlassfish v2 API3280Fri May 04 22:33:14 BST 2007org.apache.tomcat.util.handler

HandlerManager

public class HandlerManager extends Object
Hooks support. Hooks implement a chain-of-command pattern, and are commonly used in most web servers as a mechanism of extensibility. The HandlerManager class will provide support for registering and maintaining a list of modules implementing each hook. Each hook will have a name and an id. Name-based operations are slower, it is recomended you use them only in non-critical code. The name-id association is handled by NoteManager.
todo
Merging. It is possible to have different hooks on different contexts ( server, context, servlet ), we need to merge them.

Fields Summary
private Hashtable
hookMap
private TcHandler[]
hooks
Constructors Summary
public HandlerManager()

    
Methods Summary
public voidaddHandler(java.lang.String name, TcHandler hook)
Add a new handler.

        
    
public TcHandler[]getHandlers(int hookId)

        return hooks[hookId];
    
public TcHandler[]getHandlers(java.lang.String name)

        return getHandlers( 0 );
    
public java.util.HashtablegetHookMap()

        return hookMap;