Interface StartTask

All Superinterfaces:
ExecTask<Long,StartTask>, Task<Long,StartTask>

public interface StartTask extends ExecTask<Long,StartTask>

Starts the project in a separate process and return.

Unlike RunTask, the execution returns right after the project application is running, leaving it running in background. A subsequent execution of StopTask is used to stop it.

A project is considered as running when a pifdile has been created which releases the execution thread. As a result, the project application is then expected to generate a pidfile. If no pidfile is provided after the timeout, a TaskExecutionException is thrown and the process is killed.

Since:
1.4
Author:
Jeremy Kuhn
  • Method Details

    • pidfile

      StartTask pidfile(Path pidfile)

      Sets the path of the file where the project application pid is stored.

      Defaults to [WORKING_PATH]/[PROJECT_NAME].pid

      Parameters:
      pidfile - the path to the pidfile
      Returns:
      the task
    • timeout

      StartTask timeout(long timeout)

      Sets the time to wait for the pidfile to be created by the project application.

      If no pidfile is present after the timeout, task execution fails with a TaskExecutionException and the process is killed.

      Defaults to 60000.

      Parameters:
      timeout - the timeout in milliseconds
      Returns:
      the task