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.
This describes the interface used to retrieve destinations from some source via the
DestinationAccessor.-
Method Summary
Modifier and TypeMethodDescriptiondefault io.vavr.control.Try<Destination>tryGetDestination(String destinationName) Retrieves a destination for the given name.io.vavr.control.Try<Destination>tryGetDestination(String destinationName, DestinationOptions options) Retrieves a destination for the given name and configuration options.
-
Method Details
-
tryGetDestination
@Nonnull default io.vavr.control.Try<Destination> tryGetDestination(@Nonnull String destinationName) Retrieves a destination for the given name.The returned
Tryobject will contain aDestinationNotFoundExceptionin case the destination could not be found or aDestinationAccessExceptionwith more details in case something else went wrong.If the returned
Tryobject contains no Exception it will always contain a non-nullDestinationvalue.- Parameters:
destinationName- The name of the destination to obtain.- Returns:
- A
Tryobject containing either the non-nullDestinationvalue 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
Tryobject will contain aDestinationNotFoundExceptionin case the destination could not be found or aDestinationAccessExceptionwith more details in case something else went wrong.If the returned
Tryobject contains no Exception it will always contain a non-nullDestinationvalue.- Parameters:
destinationName- The name of the destination to obtain.options- Additional settings to modify the behaviour of the destination loader.- Returns:
- A
Tryobject containing either the non-nullDestinationvalue or an exception.
-