Interface DestinationLoader

All Known Implementing Classes:
DefaultDestinationLoader, DestinationLoaderChain, DestinationService, EnvVarDestinationLoader
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 DestinationLoader
This describes the interface used to retrieve destinations from some source via the DestinationAccessor.
  • Method Details

    • tryGetDestination

      @Nonnull default io.vavr.control.Try<Destination> tryGetDestination(@Nonnull String destinationName)
      Retrieves a destination for the given name.

      The returned Try object will contain a DestinationNotFoundException in case the destination could not be found or a DestinationAccessException with more details in case something else went wrong.

      If the returned Try object contains no Exception it will always contain a non-null Destination value.

      Parameters:
      destinationName - The name of the destination to obtain.
      Returns:
      A Try object containing either the non-null Destination value or an exception.
    • tryGetDestination

      @Nonnull io.vavr.control.Try<Destination> tryGetDestination(@Nonnull String destinationName, @Nonnull DestinationOptions options)
      Retrieves a destination for the given name and configuration options.

      The returned Try object will contain a DestinationNotFoundException in case the destination could not be found or a DestinationAccessException with more details in case something else went wrong.

      If the returned Try object contains no Exception it will always contain a non-null Destination value.

      Parameters:
      destinationName - The name of the destination to obtain.
      options - Additional settings to modify the behaviour of the destination loader.
      Returns:
      A Try object containing either the non-null Destination value or an exception.