Class Binding

java.lang.Object
org.springframework.cloud.bindings.Binding

public final class Binding extends Object
A representation of a binding as defined by the Kubernetes Service Binding Specification.
  • Field Details

  • Constructor Details

    • Binding

      public Binding(Path path)
      Creates a new Binding instance using the specified file system root.
      Parameters:
      path - the path to the Binding.
    • Binding

      public Binding(String name, Path path, Map<String,String> secret)
      Creates a new Binding instance using the specified content.
      Parameters:
      name - the name of the Binding.
      path - the path to the Binding.
      secret - the secret of the Binding.
  • Method Details

    • getName

      public String getName()
      Returns the name of the binding.
      Returns:
      the name of the binding
    • getPath

      public Path getPath()
      Returns the path of the binding.
      Returns:
      the path of the binding
    • getSecret

      public Map<String,String> getSecret()
      Returns the secret of the binding.
      Returns:
      a Map of the secret of the binding
    • getType

      public String getType()
      Returns the type of the binding.
      Returns:
      the type of the binding
    • getProvider

      @Nullable public String getProvider()
      Returns the provider of the binding.
      Returns:
      the provider of the binding
    • getSecretFilePath

      public Path getSecretFilePath(String name)
      Returns the Path to a secret file on disk.
      Parameters:
      name - the name of the secret key.
      Returns:
      the Path to a secret file on disk.
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object