org.drools.eventmessaging.EventKeys Maven / Gradle / Ivy
package org.drools.eventmessaging;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class EventKeys {
private Map> keys;
public EventKeys() {
keys = new HashMap>();
}
public void register(EventKey key, EventTriggerTransport target) {
List list = keys.get( key);
if ( list == null ) {
list = new ArrayList();
keys.put( key, list );
}
list.add( target );
}
public void unregister(EventKey key, EventTriggerTransport target) {
List list = keys.get( key);
if ( list != null ) {
list.remove( target );
}
}
public List getTargets(EventKey key) {
return keys.get( key );
}
public List removeKey(EventKey key) {
return keys.remove( key );
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy