Fire any pipe connection event and run all it's tasks

@param event
Pipe connection event
502787
protected void firePipeConnectionEvent(PipeConnectionEvent event) {
        for (IPipeConnectionListener element : listeners) {
            try {
                element.onPipeConnectionEvent(event);
            } catch (Throwable t) {
                log.error("Exception when handling pipe connection event", t);
            }
        }
        if (taskExecutor == null) {
            taskExecutor = Executors.newCachedThreadPool(new CustomizableThreadFactory("Pipe-"));
        }
        // Run all of event's tasks
        for (Runnable task : event.getTaskList()) {
            try {
                taskExecutor.execute(task);
            } catch (Throwable t) {
                log.warn("Exception executing pipe task {}", t);
            }
        }
        // Clear event's tasks list
        event.getTaskList().clear();
    }
1129039
void firePropertyParentChanged(TreeNodeParentChangedEvent event) {
		if (this.nodeListeners != null) {
			for (final TreeNodeListener listener : this.nodeListeners) {
				if (listener != null) {
					listener.treeNodeParentChanged(event);
				}
			}
		}
		final N parentNode = getParentNode();
		if (parentNode != null) {
			parentNode.firePropertyParentChanged(event);
		}
	}
174986
@Override
    public synchronized void dispatch(@NonNull Event event) {
        String type = event.type;
        List<EventHandlerWrapper> eventHandlers = subscribers.get(type);
        if (eventHandlers != null) {
            EventHandlerWrapper handler = null;
            for (int i = 0, size = eventHandlers.size(); i < size; i++) {
                handler = eventHandlers.get(i);
                if (handler.eventHandlerReceiver != null) {
                    handler.handleEvent(event);
                } else {
                    if (!TextUtils.isEmpty(handler.producer) && handler.producer.equals(event.sourceId)
                            || TextUtils.isEmpty(handler.producer)) {
                        handler.handleEvent(event);
                    }
                }
            }
        }
    }
1224623
public void queue(final AsyncEvent<K> _event) {
    final K key = _event.getKey();
    synchronized (getLockObject(key)) {
      Queue<AsyncEvent<K>> q = keyQueue.get(key);
      if (q != null) {
        q.add(_event);
        return;
      }
      q = new LinkedList<AsyncEvent<K>>();
      keyQueue.put(key, q);
    }
    Runnable r = new Runnable() {
      @Override
      public void run() {
        runMoreOrStop(_event);
      }
    };
    executor.execute(r);
  }
71801
protected synchronized void fireOutputChangeEvent(OUTPUT_EVENT event) {
        OutputChangeEvent oce = new OutputChangeEvent(this, event);

        for (OutputChangeListener pcl : outputListeners) {
            pcl.outputChanged(oce);
        }
    }
10605
public void fire(StepStartedEvent event) {
        Step step = new Step();
        event.process(step);
        stepStorage.put(step);

        notifier.fire(event);
    }
414923
@Override
  public synchronized void handleEvent(final Event event) {
    if (event.getType() == EventType.JOB_FINISHED && Status.FAILED
        .equals(event.getData().getStatus())) {
      this.value = this.value + 1;
    }
  }
81960
@Override
    public void send(Event event) {
        if (!closed) {
            queue.add(withPayload(new EventSubmitter(id, event)));
        }
    }
1103369
@Override
    public <T> Event<T> fire(Event<T> event, Channel... channels) {
        if (channels.length == 0) {
            channels = event.channels();
            if (channels.length == 0) {
                channels = new Channel[] { channel() };
            }
        }
        event.setChannels(channels);
        tree().fire(event, channels);
        return event;
    }
1264873
@SuppressWarnings("PMD.UseVarargs")
    /* default */ void dispatch(EventPipeline pipeline,
            EventBase<?> event, Channel[] channels) {
        HandlerList handlers = getEventHandlers(event, channels);
        handlers.process(pipeline, event);
    }
1243502
protected function fireConnectionEvent( $event )
	{
		if( isset( $this->events ) )
		{
			switch( $event ) {
				case 'beganTransaction': $this->events->dispatch( new Events\TransactionBeginningEvent( $this ) ); break;
				case 'committed': $this->events->dispatch( new Events\TransactionCommittedEvent( $this ) ); break;
				case 'rollingBack': $this->events->dispatch( new Events\TransactionRolledBackEvent( $this ) ); break;
			}
		}
	}
529029
@Async
    public void fireEventAsync(Object publisher, FireAfterTransactionAsynchronous events) throws Exception {
        for (int i = 0; i < events.events().length; i++) {
            Class<? extends EventObject> event = events.events()[i];
            if (RootApplicationEvent.class.isAssignableFrom(event)) {
                LOGGER.debug("Sending event: [{}]", event);
                ctx.publishEvent((RootApplicationEvent) event.getConstructor(Object.class).newInstance(publisher));
            }
        }
    }
364010
public void fire(TestSuiteEvent event) {
        TestSuiteResult testSuite = testSuiteStorage.get(event.getUid());
        event.process(testSuite);

        notifier.fire(event);
    }
702305
void fireSynchronousEvent(EventImpl event) {
        boolean useLock = !isReentrant();
        if (useLock) {
            lock.lock();
        }

        try {
            fireEvent(event);
        } finally {
            if (useLock) {
                lock.unlock();
            }
        }
    }
266358
@Override
    public void fire(StepStartedEvent event) {
        for (LifecycleListener listener : listeners) {
            try {
                listener.fire(event);
            } catch (Exception e) {
                logError(listener, e);
            }
        }
    }
875947
public void fireEvent(Event event) throws GitLabApiException {

        switch (event.getObjectKind()) {
        case BuildEvent.OBJECT_KIND:
            fireBuildEvent((BuildEvent) event);
            break;

        case IssueEvent.OBJECT_KIND:
            fireIssueEvent((IssueEvent) event);
            break;

        case MergeRequestEvent.OBJECT_KIND:
            fireMergeRequestEvent((MergeRequestEvent) event);
            break;

        case NoteEvent.OBJECT_KIND:
            fireNoteEvent((NoteEvent) event);
            break;

        case PipelineEvent.OBJECT_KIND:
            firePipelineEvent((PipelineEvent) event);
            break;

        case PushEvent.OBJECT_KIND:
            firePushEvent((PushEvent) event);
            break;

        case TagPushEvent.OBJECT_KIND:
            fireTagPushEvent((TagPushEvent) event);
            break;

        case WikiPageEvent.OBJECT_KIND:
            fireWikiPageEvent((WikiPageEvent) event);
            break;

        default:
            String message = "Unsupported event object_kind, object_kind=" + event.getObjectKind();
            LOGGER.warning(message);
            throw new GitLabApiException(message);
        }
    }
431846
private void handleEvent(PrimitiveEvent event) {
    log.trace("Received {}", event);
    Set<Consumer<PrimitiveEvent>> listeners = eventListeners.get(event.type());
    if (listeners != null) {
      listeners.forEach(l -> l.accept(event));
    }
  }