public class ScpXfDestinationLoader extends ScpVcapDestinationLoader<ScpXfDestinationData>
ScpVcapDestinationLoader.ScpVcapServiceData
Constructor and Description |
---|
ScpXfDestinationLoader() |
Modifier and Type | Method and Description |
---|---|
protected ScpCfDestination |
createDestination(ScpXfDestinationData data)
Create an instance of
ScpCfDestination from the structured data, which was retrieved from the VCAP lookup |
io.vavr.control.Try<Destination> |
tryGetDestination(String destinationName)
Retrieves a destination for the given name.
|
tryGetDestination
@Nonnull protected ScpCfDestination createDestination(@Nonnull ScpXfDestinationData data)
ScpCfDestination
from the structured data, which was retrieved from the VCAP lookupcreateDestination
in class ScpVcapDestinationLoader<ScpXfDestinationData>
data
- The structured data which could be serialized from the JSON response of the VCAP lookup.ScpCfDestination
.@Nonnull public io.vavr.control.Try<Destination> tryGetDestination(@Nonnull String destinationName)
The returned Try
object will contain a
DestinationAccessException
with more details in
case something went wrong.
If the returned Try
object contains no Exception it will always contain a non-null Destination
value.
destinationName
- The name of the destination to obtain.Try
object containing either the non-null Destination
value or an exception.Copyright © 2019 SAP SE. All rights reserved.