Annotation Interface ExecuteOn


@Documented @Retention(RUNTIME) @Target({METHOD,TYPE}) @Inherited @InterceptorBinding public @interface ExecuteOn
Annotates a CDI bean method that shall be executed on a new thread. If the method returns CompletableFuture or CompletionStage, it is assumed to be asynchronous.
  • Element Details

    • value

      Thread type for invocation.
      Returns:
      thread type
      Default:
      PLATFORM
    • timeout

      long timeout
      Waiting timeout, used when the method is synchronous.
      Returns:
      waiting timeout
      Default:
      10000L
    • unit

      TimeUnit unit
      Waiting time unit, used when the method is synchronous.
      Returns:
      waiting time unit
      Default:
      MILLISECONDS
    • executorName

      String executorName
      Name of executor when ExecuteOn.ThreadType.EXECUTOR is selected.
      Returns:
      executor name
      Default:
      ""