Sends the TaskStart event to the handlers for it.
185797
@SuppressWarnings("checkstyle:illegalcatch")
  public void beforeTaskStart() throws TaskStartHandlerFailure {
    LOG.log(Level.FINEST, "Sending TaskStart event to the registered event handlers.");
    for (final EventHandler<TaskStart> startHandler : this.taskStartHandlers) {
      try {
        startHandler.onNext(this.taskStart);
      } catch (final Throwable throwable) {
        throw new TaskStartHandlerFailure(startHandler, throwable);
      }
    }
    LOG.log(Level.FINEST, "Done sending TaskStart event to the registered event handlers.");
  }
118122
void handlerProcessTask(Task task) {
		assertDispatcherThread();
		
		SerialTaskQueue taskQueue = mQueuesMap.get(task.subscriberCallback.queue);
		if (taskQueue == null) {
			taskQueue = new SerialTaskQueue(task.subscriberCallback.queue);
			mQueuesMap.put(task.subscriberCallback.queue, taskQueue);
			mQueuesList.add(taskQueue);
		}
		taskQueue.offer(task);

		processNextTask();
	}
328284
void executeStartupCommands() {
		  if (m_startupCommands !=null) {
			  StringBuilder sb = new StringBuilder();
			  for (IAgentCommand cmd : m_startupCommands) {
				  sb.append(cmd.getMessage());
			  }
			  getControlThread().sendMessage(sb.toString());
		  }
		  
	  }
711818
@Override
	public void onStart() throws Exception {
		try {
			startTaskExecutorServices();
		} catch (Exception e) {
			final TaskManagerException exception = new TaskManagerException(String.format("Could not start the TaskExecutor %s", getAddress()), e);
			onFatalError(exception);
			throw exception;
		}

		startRegistrationTimeout();
	}
856148
protected void fireStart(CmsPublishJobEnqueued publishJob) {

        if (LOG.isDebugEnabled()) {
            LOG.debug(Messages.get().getBundle().key(Messages.LOG_PUBLISH_JOB_START_0));
        }
        for (Iterator<I_CmsPublishEventListener> it = iterator(); it.hasNext();) {
            I_CmsPublishEventListener listener = it.next();
            try {
                listener.onStart(publishJob);
            } catch (Throwable t) {
                // catch every thing including runtime exceptions
                if (LOG.isErrorEnabled()) {
                    LOG.error(
                        Messages.get().getBundle().key(
                            Messages.ERR_PUBLISH_JOB_START_ERROR_1,
                            listener.getClass().getName()),
                        t);
                }
                if (publishJob.m_publishJob.getPublishReport() != null) {
                    publishJob.m_publishJob.getPublishReport().println(t);
                }
            }
        }
        // popup the start message
        boolean busyStart = ((System.currentTimeMillis() - publishJob.getEnqueueTime()) > 2000);
        boolean bigJob = ((publishJob.getPublishList().size() > 25)
            || (OpenCms.getStaticExportManager().getHandler() instanceof CmsAfterPublishStaticExportHandler));
        if (busyStart || bigJob) {
            String msgText = Messages.get().getBundle(publishJob.getLocale()).key(
                Messages.GUI_PUBLISH_JOB_STARTED_1,
                new Long(publishJob.getEnqueueTime()));
            m_publishEngine.sendMessage(publishJob.getUserId(), msgText, false);
        }
    }
976503
protected void callStart(final HttpCallback<?> callback, final Request request) {
        if (callback == null)
            return;
        callback.dispatchStart(request);
    }
542060
void start(Handler<ConnectionOutputBatch> startHandler) {
    connection.doBatchStart(id, args);
    this.startHandler = startHandler;
  }
181399
def set_handler(self, handler):
        
        if self._handler:
            raise Exception('Handler was already set')
        if handler:
            self._handler = async_task(handler, loop=self._loop)
214487
public void fireTaskReadEvent(Task task)
   {
      if (m_projectListeners != null)
      {
         for (ProjectListener listener : m_projectListeners)
         {
            listener.taskRead(task);
         }
      }
   }
364363
@Subscribe
  public void onStart(AggregatedStartEvent e) throws IOException {
    this.totalSuites = e.getSuiteCount();
    logShort("Executing " +
        totalSuites + Pluralize.pluralize(totalSuites, " suite") +
        " with " + 
        e.getSlaveCount() + Pluralize.pluralize(e.getSlaveCount(), " JVM") + ".\n", false);

    forkedJvmCount = e.getSlaveCount();
    jvmIdFormat = " J%-" + (1 + (int) Math.floor(Math.log10(forkedJvmCount))) + "d";

    outWriter = new PrefixedWriter(stdoutIndent, output, DEFAULT_MAX_LINE_WIDTH);
    errWriter = new PrefixedWriter(stderrIndent, output, DEFAULT_MAX_LINE_WIDTH);        
  }
226484
private void startTask(ApplicationDefinition appDef, Task task, TaskRecord taskRecord) {
        try {
            task.setParams(m_localHost, taskRecord);
            m_executor.execute(task);
        } catch (Exception e) {
            m_logger.error("Failed to start task '" + task.getTaskID() + "'", e);
        }
    }
799910
private void onSocketStarted(SocketStartEvent event) {
        handler.post(() -> listener.onSocketStarted(event));
        log("Event published " + event.toString());
    }
322610
private void fireSearchStartEvent(SearchEvent event) {
		showWindow();
		for (SearchHandler handler : searchHandlers) {
			handler.onSearchStart(event);
		}
	}
550464
@Override
    protected void doStart() {
        log.info("{}: Starting.", this.traceObjectId);

        Services.startAsync(this.durableLog, this.executor)
                .thenComposeAsync(v -> startWhenDurableLogOnline(), this.executor)
                .whenComplete((v, ex) -> {
                    if (ex == null) {
                        // We are started and ready to accept requests when DurableLog starts. All other (secondary) services
                        // are not required for accepting new operations and can still start in the background.
                        notifyStarted();
                    } else {
                        doStop(ex);
                    }
                });
    }
956425
@Override
  public void run() {
    try {
      // Change state and inform the Driver
      this.taskLifeCycleHandlers.beforeTaskStart();

      LOG.log(Level.FINEST, "Informing registered EventHandler<TaskStart>.");
      this.currentStatus.setRunning();

      // Call Task.call()
      final byte[] result = this.runTask();

      // Inform the Driver about it
      this.currentStatus.setResult(result);

      LOG.log(Level.FINEST, "Informing registered EventHandler<TaskStop>.");
      this.taskLifeCycleHandlers.afterTaskExit();

    } catch (final TaskStartHandlerFailure taskStartHandlerFailure) {
      LOG.log(Level.WARNING, "Caught an exception during TaskStart handler execution.", taskStartHandlerFailure);
      this.currentStatus.setException(taskStartHandlerFailure.getCause());
    } catch (final TaskStopHandlerFailure taskStopHandlerFailure) {
      LOG.log(Level.WARNING, "Caught an exception during TaskStop handler execution.", taskStopHandlerFailure);
      this.currentStatus.setException(taskStopHandlerFailure.getCause());
    } catch (final TaskCallFailure e) {
      LOG.log(Level.WARNING, "Caught an exception during Task.call().", e.getCause());
      this.currentStatus.setException(e);
    }
  }
1053232
void sendDeltaStartWorkAccepted()
   {
      startWorkAccepted.incrementAndGet();

      if (trace)
         log.tracef("sendDeltaStartWorkAccepted: %s", workManagers);

      if (own != null && transport != null && transport.isInitialized())
      {
         for (Address address : workManagers)
         {
            if (!own.equals(address))
               transport.deltaStartWorkAccepted(address);
         }
      }
   }
1272444
void start() {
    final ContextStart contextStart = new ContextStartImpl(this.identifier);
    for (final EventHandler<ContextStart> startHandler : this.contextStartHandlers) {
      startHandler.onNext(contextStart);
    }
  }