--- projects/cms/source/server/uk/org/iscream/cms/server/filter/FilterThread.java 2000/11/30 03:16:17 1.12 +++ projects/cms/source/server/uk/org/iscream/cms/server/filter/FilterThread.java 2000/12/06 22:57:45 1.13 @@ -12,8 +12,8 @@ import uk.ac.ukc.iscream.util.*; /** * Handle an incoming UDP packet as a separate thread. * - * @author $Author: ajm $ - * @version $Id: FilterThread.java,v 1.12 2000/11/30 03:16:17 ajm Exp $ + * @author $Author: tdb $ + * @version $Id: FilterThread.java,v 1.13 2000/12/06 22:57:45 tdb Exp $ */ public class FilterThread extends Thread{ @@ -22,7 +22,7 @@ public class FilterThread extends Thread{ /** * The current CVS revision of this class */ - public final String REVISION = "$Revision: 1.12 $"; + public final String REVISION = "$Revision: 1.13 $"; //---STATIC METHODS--- @@ -60,17 +60,18 @@ public class FilterThread extends Thread{ // Use my XMLPacketMaker to make an XMLPacket object. XMLPacketMaker xmlPacketMaker = new XMLPacketMaker(xml); XMLPacket packet = xmlPacketMaker.createXMLPacket(); - - if (packet == null){ - // A null XML packet was returned - don't pass it on. - _logger.write(this.toString(), Logger.SYSMSG, "An XML UDP packet was sucessfully filtered from the system."); - return; + + if(packet != null && PluginFilterManager.getInstance().runFilters(packet)) { + // packet is not null + // packet was not dropped by a plugin + // ... best pass it on ! + _parent.receiveXML(xml); } + else { + // either we had a null, or a plugin dropped it + _logger.write(this.toString(), Logger.DEBUG, "An XML packet was sucessfully filtered from the system."); + } - // Now do something with this XMLPacket!!! - // .... let's try this... - _parent.receiveXML(xml); - } /**