1 package org.objectweb.celtix.bus.management; 2 3 import org.objectweb.celtix.BusEvent; 4 import org.objectweb.celtix.BusEventFilter; 5 import org.objectweb.celtix.bus.busimpl.ComponentCreatedEvent; 6 import org.objectweb.celtix.bus.busimpl.ComponentRemovedEvent; 7 8 public class ComponentEventFilter implements BusEventFilter { 9 public boolean isEventEnabled(BusEvent e) { 10 boolean result = false; 11 if (e.getID().equals(ComponentCreatedEvent.COMPONENT_CREATED_EVENT)) { 12 result = true; 13 } else if (e.getID().equals(ComponentRemovedEvent.COMPONENT_REMOVED_EVENT)) { 14 result = true; 15 } 16 return result; 17 } 18 19 } 20 | Popular Tags |