Ejemplo n.º 1
0
        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;
        }
Ejemplo n.º 2
0
  @Override
  public void addExecutionListener(ExecutionListener listener, ExecutionEventType... eventTypes) {
    if (eventTypes == null || listener == null) {
      return;
    }

    globalEventQueue.addListener(this, listener, eventTypes);
    listenerCache.ensureContainsListenerType(listener);
  }
Ejemplo n.º 3
0
 @Override
 public void fireEvent(final ExecutionEvent event) {
   globalEventQueue.fireEvent(event);
   event.getProcess().getEventQueue().fireEvent(event);
 }
Ejemplo n.º 4
0
 @Override
 public void removeExecutionListener(
     final ExecutionListener listener, final ExecutionEventType... eventTypes) {
   globalEventQueue.removeListener(this, listener, eventTypes);
 }
Ejemplo n.º 5
0
 @Override
 public void removeListener(
     Engine engine, ExecutionListener listener, ExecutionEventType... eventTypes) {
   initEventQueue(engine);
   eventQueue.removeListener(engine, listener, eventTypes);
 }
Ejemplo n.º 6
0
 @Override
 public void fireEvent(ExecutionEvent event) {
   initEventQueue(event.getEngine());
   eventQueue.fireEvent(event);
 }