Skip to content

Annotation overview

Simon Taddiken edited this page Jan 25, 2020 · 9 revisions

This page gives a quick overview of annoations that are handled by the framework. These annotations reside in the package de.skuzzle.inject.async.methods.annotation and de.skuzzle.inject.async.schedule.annotation.

  • Asynchronous methods
    • @Async - (Mandatory) Marks a method to be intercepted and executed asynchronously.
    • @Executor - Specifies the executor to use for calling the method asynchronously.
  • Scheduled methods
    • @Scheduled - (Mandatory) Marks a method to be scheduled by the time an instance of its containing class is created.
    • @Scheduler - Specifies the scheduler to use for scheduling the method.
    • @OnError - Allows to specify an ExceptionHandler which will be called each time the scheduled method raises an exception.
    • @ManuallyStarted - Marks a method to be not automatically scheduled during Injector setup.
    • Triggers (Mandatory)
      • @CronTrigger - Allows to specify a cron pattern for defining scheduling behavior.
      • @SimpleTrigger - Allows to specify simple scheduling in terms of the scheduling API provided by an ScheduledExecutorService.
      • @DelayedTrigger - Specifies to execute the method only once after a certain delay.
      • (@Trigger) - Meta annotation to define custom trigger strategies.
    • Scopes
      • @ScheduledScope - Allows to bind classes to being instantiated again for every @Scheduled method.
      • @ExecutionScope - Pertains to a single scheduled method execution.