Run the inner task.

@param wave the wave that have triggered this command

@throws CommandException if an error occurred
10217
final void innerRun(final Wave wave) throws CommandException {
        beforePerform(wave);
        perform(wave);
        afterPerform(wave);
    }
313384
@SuppressWarnings({ "rawtypes", "unchecked" })
	public void run()
	{
		IProcess process = fConsole.getProcess();
		if (process != null)
		{
			List targets = collectTargets(process);
			targets.add(process);
			DebugCommandService service = DebugCommandService.getService(fWindow);
			service.executeCommand(ITerminateHandler.class, targets.toArray(), null);
		}
	}
1268498
@Override
	public void run()
	{
		try
		{
			while (!stopRequired)
			{
				if (traceEnabled)
					log.trace("Thread entering passive wait : "+getName());
				
				// Passive wait
				waitLock.acquire();
				if (stopRequired)
					break;
				
				// Process the container
				if (traceEnabled)
					log.trace("Executing task "+task);

				// Execute task
				task.execute();
				
				// Notify listener
				listener.executionComplete(this);
			}
		}
		catch (Throwable ex)
		{
			log.error("Asynchronous execution thread failed",ex);
		}
		log.debug("Thread exits : "+getName());
	}
1242806
@Override
  public void run() {

    this.stateLock.lock();

    try {

      if (this.state != RunnableProcessState.INIT) {
        throw new IllegalStateException("The RunnableProcess can't be reused");
      }

      // Setup the stdout and stderr destinations.
      final File errFile = new File(folder, standardErrorFileName);
      final File outFile = new File(folder, standardOutFileName);

      // Launch the process
      try {

        LOG.log(Level.FINEST,
            "Launching process \"{0}\"\nSTDERR can be found in {1}\nSTDOUT can be found in {2}",
            new Object[] {this.id, errFile.getAbsolutePath(), outFile.getAbsolutePath()});

        this.process = new ProcessBuilder()
            .command(this.command)
            .directory(this.folder)
            .redirectError(errFile)
            .redirectOutput(outFile)
            .start();

        this.setState(RunnableProcessState.RUNNING);
        this.processObserver.onProcessStarted(this.id);

      } catch (final IOException ex) {
        LOG.log(Level.SEVERE, "Unable to spawn process " + this.id + " with command " + this.command, ex);
      }

    } finally {
      this.stateLock.unlock();
    }

    try {

      // Wait for its completion
      LOG.log(Level.FINER, "Wait for process completion: {0}", this.id);
      final int returnValue = this.process.waitFor();
      this.processObserver.onProcessExit(this.id, returnValue);

      this.stateLock.lock();
      try {
        this.setState(RunnableProcessState.ENDED);
        this.doneCond.signalAll();
      } finally {
        this.stateLock.unlock();
      }

      LOG.log(Level.FINER, "Process \"{0}\" returned {1}", new Object[] {this.id, returnValue});

    } catch (final InterruptedException ex) {
      LOG.log(Level.SEVERE,
          "Interrupted while waiting for the process \"{0}\" to complete. Exception: {1}",
          new Object[] {this.id, ex});
    }
  }
535514
@Override
  public void run()
  {
    try {
      _launcher.onChildIdleBegin();
      _launcher.onChildThreadLaunchBegin();
      _pool.addThread(this);
      
      runTasks();
    } catch (Throwable e) {
      log.log(Level.WARNING, e.toString(), e);
    } finally {
      _pool.removeThread(this);
      _launcher.onChildIdleEnd();
      _launcher.onChildThreadLaunchEnd();
    }
  }
942953
public void startListening() {
        if (listenForCommands) {
            listeningThread = new Thread("kernel-command-listener") {
                @Override
                public void run() {
                    while (listenForCommands && acceptAndExecuteCommand()) {
                        //loop intentionally empty
                    }
                }
            };
            listeningThread.start();
        }
    }
153577
public static Runnable apply(final Runnable command, final EventExecutor eventExecutor) {
        ObjectUtil.checkNotNull(command, "command");
        ObjectUtil.checkNotNull(eventExecutor, "eventExecutor");
        return new Runnable() {
            @Override
            public void run() {
                setCurrentEventExecutor(eventExecutor);
                try {
                    command.run();
                } finally {
                    setCurrentEventExecutor(null);
                }
            }
        };
    }
1062064
public void run(String[] args) throws Exception
    {
        CommandLineRunner runner = new CommandLineRunner();

        CompositeSpecificationRunnerMonitor aggregateMonitor = new CompositeSpecificationRunnerMonitor();
        aggregateMonitor.add( new AntSpecificationRunnerMonitor( logger ) );
        aggregateMonitor.add( recorderMonitor );

        runner.setMonitor( aggregateMonitor );

        runner.run( args );
    }
1189891
@Override
    @FFDCIgnore(Throwable.class)
    public void run() {
        Future<R> result = null;
        Throwable thrownException = null;

        try {
            ArrayList<ThreadContext> contextAppliedToThread = null;
            if (this.threadContext != null) {
                //apply the JEE contexts to the thread before calling the inner task
                contextAppliedToThread = this.threadContext.taskStarting();
            }
            try {
                result = innerTask.call();
            } finally {
                if (contextAppliedToThread != null) {
                    //remove the JEE contexts again since the thread will be re-used
                    this.threadContext.taskStopping(contextAppliedToThread);
                }
            }
        } catch (Throwable e) {
            if (e instanceof com.ibm.ws.microprofile.faulttolerance.spi.ExecutionException) {
                thrownException = e.getCause();
            } else {
                thrownException = e;
            }
        } finally {
            // We've finished running and caught any exceptions that occurred, now store the result in the resultFuture
            // If abort() has already been called then the result future will already be completed and the result (or exception) here is discarded.
            if (thrownException == null) {
                resultFuture.complete(result);
            } else {
                resultFuture.completeExceptionally(thrownException);
            }
        }
    }
480573
public void doStop(final Wave wave) {
        for (int i = this.timeFrame; i >= 0; i--) {
            hideCurrent(this.eventList.get(this.timeFrame));
        }
    }
165845
public synchronized void execute(Runnable command) {
        if (active.get()) {
            stop();
            this.command = command;
            start();
        } else {
            this.command = command;
        }
    }
583509
public Response execute(Command command) throws IOException {
        for (EventListener temp : listeners) {
            temp.beforeEvent(command);
        }
        Response res = commandExecutor.execute(command);

        for (EventListener temp : listeners) {
            temp.afterEvent(command);
        }

        return res;
    }
861041
public void start() {
		this.commandWorker.start();
		while (!this.commandWorker.isRunning()) {
			// wait for the command worker to be ready
			System.out.println("waiting for worker to connect...");
			try {
				Thread.sleep(50);
			} catch (final InterruptedException e) {
				System.out.println("server thread could not wait for worker");
				e.printStackTrace();
			}
		}
	}
205722
public void run(List<String> args)
      throws ProcessHandlerException, AppEngineJavaComponentsNotInstalledException,
          InvalidJavaSdkException, IOException {
    sdk.validateAppEngineJavaComponents();
    sdk.validateJdk();

    // App Engine Java Sdk requires this system property to be set.
    // TODO: perhaps we should send this in directly to the command instead of changing the global
    // state here (see DevAppServerRunner)
    System.setProperty("appengine.sdk.root", sdk.getAppEngineSdkForJavaPath().toString());

    List<String> command = new ArrayList<>();
    command.add(sdk.getJavaExecutablePath().toString());
    command.add("-cp");
    command.add(sdk.getAppEngineToolsJar().toString());
    command.add("com.google.appengine.tools.admin.AppCfg");
    command.addAll(args);

    logger.info("submitting command: " + Joiner.on(" ").join(command));

    ProcessBuilder processBuilder = processBuilderFactory.newProcessBuilder();
    processBuilder.command(command);
    Process process = processBuilder.start();
    processHandler.handleProcess(process);
  }
1131847
public void run() {
		
		task.setSetTimerTransactionalAction(null);
		
		if (!canceled) {
			
			TimerTask previousTask = scheduler.getLocalRunningTasksMap().putIfAbsent(task.getData().getTaskID(), task);
			if(previousTask != null) {
				if (logger.isDebugEnabled()) {
					logger.debug("A task with id " + task.getData().getTaskID() + " has already been added to the local tasks, not rescheduling");
				}
			}
			
			final TimerTaskData taskData = task.getData();
			// calculate delay
			long delay = taskData.getStartTime() - System.currentTimeMillis();
			if (delay < 0) {
				delay = 0;
			}
			
			try {
				// schedule runnable
				if (taskData.getPeriod() < 0) {
					if (logger.isDebugEnabled()) {
						logger.debug("Scheduling one-shot timer with id "
								+ task.getData().getTaskID() + ", delay " + delay);
					}
					task.setScheduledFuture(scheduler.getExecutor().schedule(task, delay, TimeUnit.MILLISECONDS));
				} else {
					if (logger.isDebugEnabled()) {
						logger.debug("Scheduling periodic timer with id "
								+ task.getData().getTaskID() + ", scheduling strategy " + taskData.getPeriodicScheduleStrategy() + ", delay " + delay + ", period " + taskData.getPeriod());
					}
					if (taskData.getPeriodicScheduleStrategy() == PeriodicScheduleStrategy.withFixedDelay) {
						task.setScheduledFuture(scheduler.getExecutor().scheduleWithFixedDelay(task, delay, taskData.getPeriod(),TimeUnit.MILLISECONDS));
					}
					else {
						// default
						task.setScheduledFuture(scheduler.getExecutor().scheduleAtFixedRate(task, delay, taskData.getPeriod(),TimeUnit.MILLISECONDS));
					}					
				}		
			} catch (Throwable e) {
				logger.error(e.getMessage(), e);
				scheduler.remove(taskData.getTaskID(),true);
			}
		} else {
			if (logger.isDebugEnabled()) {
				logger.debug("Canceled scheduling periodic timer with id "
						+ task.getData().getTaskID());
			}
		}
	}
629213
public void run()
    {
        m_thread = this;
        while (m_thread != null)
        {
            int iErrorCode = Constant.NORMAL_RETURN;
            BaseMessage message = (BaseMessage)this.receiveMessage();        // Hang until a message comes through
            if ((message == null) || (m_thread == null))
                return;      // End of processing, stop this thread.
            Iterator<BaseMessageFilter> iterator = this.getFilterList(message.getMessageHeader());
            while (iterator.hasNext())
            {
                if (message.isConsumed())
                    break;     // All done. with this message, continue with the next message.
                try {
                    BaseMessageFilter filter = iterator.next();
                    if (filter.isFilterMatch(message.getMessageHeader()))
                    {
                        BaseMessage messageToSend = message;
                        for (int i = 0; ; i++)
                        {
                            JMessageListener listener = filter.getMessageListener(i);
                            if (listener == null)
                                break;
                            if (filter.isThinTarget())
                                if (listener.isThinListener())
                            {
                                if (messageToSend == message)
                                    messageToSend = message.convertToThinMessage(); // If you are sending a thick message to a thin client, convert it first. Note: don't worry about calling this with a thin message... no conversion will be done there.
                                else
                                    messageToSend = messageToSend.convertToThinMessage();   // Previously processed but not converted
                            }
                            if (listener instanceof org.jbundle.model.Remote)
                                if (filter.getRegistryID() != null)
                                    if (messageToSend.getMessageHeader() != null)
                                        if (messageToSend.getMessageHeader().getRegistryIDMatch() == null)
                            {
                                try {
                                    if (messageToSend == message)
                                        messageToSend = (BaseMessage)messageToSend.clone(); // If I change the message, I need a new copy
                                } catch (CloneNotSupportedException e) {
                                    e.printStackTrace();
                                }
                                messageToSend.getMessageHeader().setRegistryIDMatch(filter.getRegistryID());    // Typically used for remote filters to match filter ID.
                            }
                            iErrorCode = listener.handleMessage(messageToSend);
                            if (iErrorCode != Constant.NORMAL_RETURN)
                                break;
                            message.setConsumed(messageToSend.isConsumed());
                            if (message.isConsumed())
                                break;     // All done. with this message, continue with the next message.
                        }
                    }
                } catch (ConcurrentModificationException ex)    {
                    Util.getLogger().warning("Message filter Concurrent Modification");   // Warning: Someone modified the filter list while I was cruzin it.
                    iterator = this.getFilterList(message.getMessageHeader());  // Start from the beginning again
                }
            }
        }
    }
1213168
@Override
	public void run(Line line) {
		try {
			shell.console().reader().printColumns(shell.commands().keySet());
		} catch (IOException e) {
			e.printStackTrace(new PrintWriter(shell.console().reader().getOutput()));
		}
	}