org.qi4j.library.scheduler.schedule.once

## Class OnceSchedule.OnceScheduleMixin

- java.lang.Object
- - org.qi4j.library.scheduler.schedule.once.OnceSchedule.OnceScheduleMixin

- All Implemented Interfaces:
    Identity, OnceSchedule, Schedule
  Enclosing interface:
    OnceSchedule

      public abstract static class OnceSchedule.OnceScheduleMixin
      extends Object
      implements OnceSchedule

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.qi4j.library.scheduler.schedule.once.OnceSchedule

      `OnceSchedule.OnceScheduleMixin`

    - ### Nested classes/interfaces inherited from interface org.qi4j.api.entity.Identity

      `Identity.IdentityMixin`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `OnceSchedule.OnceScheduleMixin()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `isTaskRunning()`
    `long` | `nextRun(long from)` Compute the next time this schedule is to be run.
    `String` | `presentationString()` Return a representation of the Schedule in a human understandable format.
    `void` | `taskCompletedSuccessfully()` Called directly after the `Runnable.run()` method has been completed and returned from the method normally.
    `void` | `taskCompletedWithException(RuntimeException ex)` Called directly after the `Runnable.run()` method has been completed but threw a RuntimeException.
    `void` | `taskStarting()` Called just before the `Runnable.run()` method is called.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface org.qi4j.library.scheduler.schedule.Schedule

      `start, task`

    - ### Methods inherited from interface org.qi4j.api.entity.Identity

      `identity`

- - ### Constructor Detail

    - #### OnceSchedule.OnceScheduleMixin

          public OnceSchedule.OnceScheduleMixin()

  - ### Method Detail

    - #### taskStarting

          public void taskStarting()

      Description copied from interface: `Schedule`
      Called just before the `Runnable.run()` method is called.
      Specified by:
        `taskStarting` in interface `Schedule`

    - #### taskCompletedSuccessfully

          public void taskCompletedSuccessfully()

      Description copied from interface: `Schedule`
      Called directly after the `Runnable.run()` method has been completed and returned from the method normally.
      Specified by:
        `taskCompletedSuccessfully` in interface `Schedule`

    - #### taskCompletedWithException

          public void taskCompletedWithException(RuntimeException ex)

      Description copied from interface: `Schedule`
      Called directly after the `Runnable.run()` method has been completed but threw a RuntimeException.
      Specified by:
        `taskCompletedWithException` in interface `Schedule`

    - #### isTaskRunning

          public boolean isTaskRunning()

      Specified by:
        `isTaskRunning` in interface `Schedule`
      Returns:
        True if the associated `Task` is currently running, false otherwise

    - #### nextRun

          public long nextRun(long from)

      Description copied from interface: `Schedule`
      Compute the next time this schedule is to be run.
      Specified by:
        `nextRun` in interface `Schedule`
      Parameters:
        `from` - The starting time when to look for the next time it will run.
      Returns:
        The exact absolute time when this Schedule is to be run next time, or -1 if never

    - #### presentationString

          public String presentationString()

      Description copied from interface: `Schedule`
      Return a representation of the Schedule in a human understandable format.
      Specified by:
        `presentationString` in interface `Schedule`
      Returns:
        A String representing this schedule.