if(!(handler instanceof AbstractHandler )){
String msg ="Handler "+ handler.getClass().getName()+" is not instance of AbstractHandler!";
log.error(msg);
throw new RuntimeException(msg);
}
AbstractHandler aHandler = (AbstractHandler) handler;
for( Iterator iter = before.iterator(); iter.hasNext();){
aHandler.before((String)iter.next());
}
}
if (after!= null)
{
if(!(handler instanceof AbstractHandler )){
String msg = "Handler "+ handler.getClass().getName()+" is not instance of AbstractHandler!";
log.error(msg);
throw new RuntimeException(msg);
}
AbstractHandler aHandler = (AbstractHandler) handler;
for( Iterator iter = after.iterator(); iter.hasNext();){
aHandler.after((String)iter.next());
}
}
}