Class DestinationService
- All Implemented Interfaces:
DestinationLoader
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classStatic builder class.static final classHelper class that encapsulates all caching related configuration options. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic DestinationService.Builderbuilder()Static builder.Fetches all destination properties from the BTP Destination Service.getDestinationProperties(String destinationName) Fetches the properties of a specific destination from the BTP Destination Service.io.vavr.control.Try<Iterable<Destination>>Deprecated.since 5.1.0.io.vavr.control.Try<Iterable<Destination>>tryGetAllDestinations(DestinationOptions options) Deprecated.since 5.1.0.io.vavr.control.Try<Destination>tryGetDestination(String destinationName, DestinationOptions options) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.sap.cloud.sdk.cloudplatform.connectivity.DestinationLoader
tryGetDestination
-
Constructor Details
-
DestinationService
public DestinationService()Create instance with all default settings
-
-
Method Details
-
tryGetDestination
@Nonnull public io.vavr.control.Try<Destination> tryGetDestination(@Nonnull String destinationName, @Nonnull DestinationOptions options) - Specified by:
tryGetDestinationin interfaceDestinationLoader
-
tryGetAllDestinations
Deprecated.since 5.1.0. UsegetAllDestinationProperties()instead.Fetches all destination properties from the BTP Destination Service.Caution: This will not perform any authorization flows for the destinations. Destinations obtained this way should only be used for accessing the properties of the destination configuration.
In case there exists a destination with the same name on service instance and on sub-account level, the destination at service instance level takes precedence.- Returns:
- A Try list of destinations.
-
getAllDestinationProperties
Fetches all destination properties from the BTP Destination Service.Caution: This will not perform any authorization flows for the destinations. Destinations obtained this way should only be used for accessing the properties of the destination configuration. For obtaining full destination objects, use
In case there exists a destination with the same name on service instance and on sub-account level, the destination at service instance level takes precedence.tryGetDestination(String, DestinationOptions)instead.- Returns:
- A list of destination properties.
- Since:
- 5.1.0
-
getDestinationProperties
Fetches the properties of a specific destination from the BTP Destination Service.Caution: This will not perform any authorization flows for the destination. Destinations obtained this way should only be used for accessing the properties of the destination configuration. For obtaining full destination objects, use
In case there exists a destination with the same name on service instance and on sub-account level, the destination at service instance level takes precedence.tryGetDestination(String, DestinationOptions)instead.- Parameters:
destinationName- The name of the destination.- Returns:
- A list of destination properties.
- Since:
- 5.1.0
-
tryGetAllDestinations
@Nonnull @Deprecated public io.vavr.control.Try<Iterable<Destination>> tryGetAllDestinations(@Nonnull DestinationOptions options) Deprecated.since 5.1.0. UsegetAllDestinationProperties()instead.Fetches all destination properties from the BTP Destination Service.Uses the provided configuration options. In case there exist a destination with the same name on service instance and on sub account level, then the method prioritizes the destination at service instance level.
Caution: This will not perform any authorization flows for the destinations. Destinations obtained this way should only be used for accessing the properties of the destination configuration.
- Parameters:
options- Destination configuration object.- Returns:
- A Try iterable of CF destinations.
-
builder
Static builder.- Returns:
- A builder to prepare a customised instance.
- Since:
- 4.4.0
-