Class DefaultDestination

java.lang.Object
com.sap.cloud.sdk.cloudplatform.connectivity.DefaultDestination
All Implemented Interfaces:
Destination, DestinationProperties

public final class DefaultDestination extends Object implements Destination
Immutable default implementation of the Destination interface to be used as the "single source of truth". All other destination implementations provided will retrieve the properties out of this class.
  • Method Details

    • fromMap

      @Nonnull public static DefaultDestination.Builder fromMap(@Nonnull Map<String,?> map)
      Creates a new DefaultDestination with the given properties.
      Parameters:
      map - The properties to be used for the destination builder.
      Returns:
      A new builder instance.
      Since:
      5.0.0
    • get

      @Nonnull public io.vavr.control.Option<Object> get(@Nonnull String someKey)
      Description copied from interface: DestinationProperties
      Gets the value associated with the given key (if any).
      Specified by:
      get in interface DestinationProperties
      Parameters:
      someKey - The key to get the value for.
      Returns:
      An Option object containing the value, if any.
    • getPropertyNames

      @Nonnull public Iterable<String> getPropertyNames()
      Description copied from interface: DestinationProperties
      Retrieves the set of property keys of the destination.
      Specified by:
      getPropertyNames in interface DestinationProperties
      Returns:
      An iterable of type String which is the set of property keys for a destination
    • toString

      @Nonnull public String toString()
      Overrides:
      toString in class Object
    • toBuilder

      @Nonnull public DefaultDestination.Builder toBuilder()
      Returns a new DefaultDestination.Builder instance that is initialized with this DefaultDestination.

      Please note that this operation performs a shallow copy only. As a consequence, complex objects (such as the KeyStores) will be copied by reference only, which leads to a shared state between the destination and the DefaultHttpDestination to be created.

      Returns:
      A new DefaultDestination.Builder instance.
      Since:
      5.0.0
    • builder

      @Nonnull public static DefaultDestination.Builder builder()
      Starts a builder to be used to create a DefaultDestination with some properties.
      Returns:
      A new Builder instance.
    • equals

      public boolean equals(@Nullable Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object