1 10 11 package org.mule.providers.xmpp.filters; 12 13 import org.jivesoftware.smack.filter.PacketFilter; 14 import org.jivesoftware.smack.packet.Packet; 15 import org.mule.umo.UMOFilter; 16 import org.mule.umo.UMOMessage; 17 18 22 public abstract class AbstractXmppFilter implements UMOFilter, PacketFilter 23 { 24 protected volatile PacketFilter delegate; 25 26 public boolean accept(Packet packet) 27 { 28 if (delegate == null) 29 { 30 delegate = createFilter(); 31 } 32 33 return delegate.accept(packet); 34 } 35 36 public boolean accept(UMOMessage message) 37 { 38 return true; 40 } 41 42 protected abstract PacketFilter createFilter(); 43 44 } 45 | Popular Tags |