@Override public void addExecutionListener(ExecutionListener listener, ExecutionEventType... eventTypes) { if (eventTypes == null || listener == null) { return; } globalEventQueue.addListener(this, listener, eventTypes); listenerCache.ensureContainsListenerType(listener); }
private void initEventQueue(Engine engine) { ExecutionEventQueue newEventQueue = CachingExecutionEventQueue.newArrayListInstance(); ListenerCache cache = CachingExecutionEventQueue.getListenerCache(); for (HibProcessListener listener : getListeners()) { newEventQueue.addListener( engine, cache.getListener(listener.getType()), listener.getEventType()); } eventQueue = newEventQueue; }
@Override public void addExecutionListener( final ExecutionListener listener, final ExecutionEventType... eventTypes) { globalEventQueue.addListener(this, listener, eventTypes); }
@Override public void addListener( Engine engine, ExecutionListener listener, ExecutionEventType... eventTypes) { initEventQueue(engine); eventQueue.addListener(engine, listener, eventTypes); }