Save This Page
Home » dom4j-1.6.1 » org.dom4j.io » [javadoc | source]
org.dom4j.io
class: DispatchHandler [javadoc | source]
java.lang.Object
   org.dom4j.io.DispatchHandler

All Implemented Interfaces:
    ElementHandler

Direct Known Subclasses:
    PruningDispatchHandler

DispatchHandler implements the ElementHandler interface and provides a means to register multiple ElementHandler instances to be used by an event based processor. This is a special ElementHandler in that it's onStart and onEnd implementation methods are called for every element encountered during the parse. It then delegates to other ElementHandler instances registered with it to process the elements encountered.

Constructor:
 public DispatchHandler() 
Method from org.dom4j.io.DispatchHandler Summary:
addHandler,   containsHandler,   getActiveHandlerCount,   getHandler,   getPath,   onEnd,   onStart,   removeHandler,   resetHandlers,   setDefaultHandler
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.dom4j.io.DispatchHandler Detail:
 public  void addHandler(String handlerPath,
    ElementHandler handler) 
    Adds the ElementHandler to be called when the specified path is encounted.
 public boolean containsHandler(String handlerPath) 
    DOCUMENT ME!
 public int getActiveHandlerCount() 
    Returns the number of ElementHandler objects that are waiting for their elements closing tag.
 public ElementHandler getHandler(String handlerPath) 
 public String getPath() 
    DOCUMENT ME!
 public  void onEnd(ElementPath elementPath) 
 public  void onStart(ElementPath elementPath) 
 public ElementHandler removeHandler(String handlerPath) 
    Removes the ElementHandler from the event based processor, for the specified path.
 public  void resetHandlers() 
    Used to remove all the Element Handlers and return things back to the way they were when object was created.
 public  void setDefaultHandler(ElementHandler handler) 
    When multiple ElementHandler instances have been registered, this will set a default ElementHandler to be called for any path which does NOT have a handler registered.