Interface JobHandler

  • Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public interface JobHandler
    Implementations MUST be thread-safe.
    • Method Detail

      • handle

        void handle​(JobClient client,
                    ActivatedJob job)
             throws Exception
        Handles a job. Implements the work to be done whenever a job of a certain type is received.

        In case the job handler throws an exception the job is failed and the job retries are automatically decremented by one. The failed job will contain the exception stacktrace as error message.

        If the retries reaches zero an incident will be created, which has to be resolved before the job is available again (see ZeebeClient.newResolveIncidentCommand(long)

        Throws:
        Exception