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
Try
object will contain aDestinationNotFoundException
in case the destination could not be found or aDestinationAccessException
with more details in case something else went wrong.If the returned
Try
object contains no Exception it will always contain a non-nullDestination
value.- Parameters:
destinationName
- The name of the destination to obtain.- Returns:
- A
Try
object containing either the non-nullDestination
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 aDestinationNotFoundException
in case the destination could not be found or aDestinationAccessException
with more details in case something else went wrong.If the returned
Try
object contains no Exception it will always contain a non-nullDestination
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-nullDestination
value or an exception.
-