public class DestinationLoaderChain extends Object implements DestinationLoader
DestinationLoader interface providing a way to define a chain
DestinationLoaders to go through until a destination was found.| Modifier and Type | Class and Description |
|---|---|
static class |
DestinationLoaderChain.DestinationLoaderChainBuilder
Builder class to construct a
DestinationLoaderChain. |
| Constructor and Description |
|---|
DestinationLoaderChain(Collection<DestinationLoader> loaders)
Instantiates a
DestinationLoaderChain based on the given loaders in the order returned by
Collection.iterator(). |
| Modifier and Type | Method and Description |
|---|---|
static DestinationLoaderChain.DestinationLoaderChainBuilder |
builder(DestinationLoader firstLoader)
Entry point to build a custom
DestinationLoaderChain. |
protected boolean |
canEqual(Object other) |
boolean |
equals(Object o) |
int |
hashCode() |
String |
toString() |
io.vavr.control.Try<Destination> |
tryGetDestination(String destinationName,
DestinationOptions options)
Retrieves a destination for the given name and configuration options.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, waittryGetDestinationpublic DestinationLoaderChain(@Nonnull Collection<DestinationLoader> loaders) throws IllegalArgumentException
DestinationLoaderChain based on the given loaders in the order returned by
Collection.iterator().loaders - The loaders to go though to find a destination.IllegalArgumentException - If the given collection of loaders is empty.@Nonnull public static DestinationLoaderChain.DestinationLoaderChainBuilder builder(@Nonnull DestinationLoader firstLoader)
DestinationLoaderChain.firstLoader - The first loader to be used by the chain.DestinationLoaderChainBuilder without any registered DestinationLoaderChain.@Nonnull public io.vavr.control.Try<Destination> tryGetDestination(@Nonnull String destinationName, @Nonnull DestinationOptions 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.
tryGetDestination in interface DestinationLoaderdestinationName - The name of the destination to obtain.options - Additional settings to modify the behaviour of the destination loader.Try object containing either the non-null Destination value or an exception.Copyright © 2021 SAP SE. All rights reserved.