Interface ReactiveValidator

All Known Implementing Classes:
DefaultAnnotatedElementValidator, DefaultValidator

public interface ReactiveValidator
Interface for reactive bean validation.
Since:
1.2
Author:
graemerocher
  • Method Summary

    Modifier and Type
    Method
    Description
    <T> @NonNull CompletionStage<T>
    validateCompletionStage(@NonNull CompletionStage<T> completionStage, @NonNull io.micronaut.core.type.Argument<T> argument, Class<?>... groups)
    Validate the given CompletionStage by returning a new CompletionStage that validates the emitted value.
    <T> @NonNull org.reactivestreams.Publisher<T>
    validatePublisher(@NonNull io.micronaut.core.type.ReturnType<?> returnType, @NonNull org.reactivestreams.Publisher<T> publisher, Class<?>... groups)
    Validate the given publisher by returning a new Publisher that validates each emitted value.
  • Method Details

    • validatePublisher

      @NonNull <T> @NonNull org.reactivestreams.Publisher<T> validatePublisher(@NonNull @NonNull io.micronaut.core.type.ReturnType<?> returnType, @NonNull @NonNull org.reactivestreams.Publisher<T> publisher, Class<?>... groups)
      Validate the given publisher by returning a new Publisher that validates each emitted value. If a constraint violation error occurs a ConstraintViolationException will be thrown.
      Type Parameters:
      T - The generic type
      Parameters:
      returnType - The required type of publisher
      publisher - The publisher
      groups - The groups
      Returns:
      The publisher
    • validateCompletionStage

      @NonNull <T> @NonNull CompletionStage<T> validateCompletionStage(@NonNull @NonNull CompletionStage<T> completionStage, @NonNull @NonNull io.micronaut.core.type.Argument<T> argument, Class<?>... groups)
      Validate the given CompletionStage by returning a new CompletionStage that validates the emitted value. If a constraint violation error occurs a ConstraintViolationException will be thrown.
      Type Parameters:
      T - The generic type
      Parameters:
      completionStage - The completion stage
      argument - The completion stage element argument
      groups - The groups
      Returns:
      The publisher