net.sf.xmlmatcher.matcher
Class ChaingedMatcherListener

java.lang.Object
  extended by net.sf.xmlmatcher.matcher.ChaingedMatcherListener
All Implemented Interfaces:
MatcherListener

public class ChaingedMatcherListener
extends java.lang.Object
implements MatcherListener

Chain of listeners


Constructor Summary
ChaingedMatcherListener(MatcherListener listener)
           
ChaingedMatcherListener(MatcherListener listener1, MatcherListener listener2)
           
 
Method Summary
 void addListener(MatcherListener listener)
           
 void afterMatch(org.w3c.dom.Element template, org.w3c.dom.Element actual)
          Called after matcher successfully matched two elements
 void afterMismatch(org.w3c.dom.Element template, org.w3c.dom.Element actual)
          Called by matcher when two elements do not match, right before MatcherException is thrown
 void beforeMatch(org.w3c.dom.Element template, org.w3c.dom.Element actual)
          Called before matcher starts matching two elements
 boolean isEmpty()
           
 void removeListener(MatcherListener listener)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChaingedMatcherListener

public ChaingedMatcherListener(MatcherListener listener)

ChaingedMatcherListener

public ChaingedMatcherListener(MatcherListener listener1,
                               MatcherListener listener2)
Method Detail

addListener

public void addListener(MatcherListener listener)

removeListener

public void removeListener(MatcherListener listener)

isEmpty

public boolean isEmpty()

beforeMatch

public void beforeMatch(org.w3c.dom.Element template,
                        org.w3c.dom.Element actual)
                 throws MatcherException
Description copied from interface: MatcherListener
Called before matcher starts matching two elements

Specified by:
beforeMatch in interface MatcherListener
Throws:
MatcherException - callback may throw this exception to signal mismatch right away

afterMismatch

public void afterMismatch(org.w3c.dom.Element template,
                          org.w3c.dom.Element actual)
Description copied from interface: MatcherListener
Called by matcher when two elements do not match, right before MatcherException is thrown

Specified by:
afterMismatch in interface MatcherListener

afterMatch

public void afterMatch(org.w3c.dom.Element template,
                       org.w3c.dom.Element actual)
                throws MatcherException
Description copied from interface: MatcherListener
Called after matcher successfully matched two elements

Specified by:
afterMatch in interface MatcherListener
Throws:
MatcherException - callback may throw this exception to override successful match


Copyright © 2007. All Rights Reserved.