Class RestConfigImpl

java.lang.Object
oracle.kubernetes.operator.rest.RestConfigImpl
All Implemented Interfaces:
RestConfig

public class RestConfigImpl
extends java.lang.Object
implements RestConfig
RestConfigImpl provides the WebLogic Operator REST api configuration.
  • Constructor Details

    • RestConfigImpl

      public RestConfigImpl​(java.lang.String principal, java.util.function.Supplier<java.util.Collection<java.lang.String>> domainNamespaces)
      Constructs a RestConfigImpl.
      Parameters:
      principal - is the name of the Kubernetes User or Service Account to use when calling the Kubernetes REST API.
      domainNamespaces - returns a list of the Kubernetes Namespaces covered by this Operator.
  • Method Details

    • getHost

      public java.lang.String getHost()
      Description copied from interface: RestConfig
      Gets the in-pod hostname of the WebLogic operator REST api.
      Specified by:
      getHost in interface RestConfig
      Returns:
      the in-pod hostname
    • getExternalHttpsPort

      public int getExternalHttpsPort()
      Description copied from interface: RestConfig
      Gets the external https port's in-pod port number.
      Specified by:
      getExternalHttpsPort in interface RestConfig
      Returns:
      the port number
    • getInternalHttpsPort

      public int getInternalHttpsPort()
      Description copied from interface: RestConfig
      Gets the internal https port's in-pod port number.
      Specified by:
      getInternalHttpsPort in interface RestConfig
      Returns:
      the port number
    • getOperatorExternalCertificateData

      public java.lang.String getOperatorExternalCertificateData()
      Description copied from interface: RestConfig
      Gets the external https port's certificate.
      Specified by:
      getOperatorExternalCertificateData in interface RestConfig
      Returns:
      base64 encoded PEM containing the certificate, or null if getOperatorExternalCertificateFile should be used instead to get the certificate.
    • getOperatorInternalCertificateData

      public java.lang.String getOperatorInternalCertificateData()
      Description copied from interface: RestConfig
      Gets the internal https port's certificate.
      Specified by:
      getOperatorInternalCertificateData in interface RestConfig
      Returns:
      base64 encoded PEM containing the certificate, or null if getOperatorInternalCertificateFile should be used instead to get the certificate.
    • getOperatorExternalCertificateFile

      public java.lang.String getOperatorExternalCertificateFile()
      Description copied from interface: RestConfig
      Gets external https port's certificate.
      Specified by:
      getOperatorExternalCertificateFile in interface RestConfig
      Returns:
      the pathname of a PEM file containing the certificate or null if getOperatorExternalCertificateData should be used instead to get the certificate.
    • getOperatorInternalCertificateFile

      public java.lang.String getOperatorInternalCertificateFile()
      Description copied from interface: RestConfig
      Gets internal https port's certificate.
      Specified by:
      getOperatorInternalCertificateFile in interface RestConfig
      Returns:
      the pathname of a PEM file containing the certificate or null if getOperatorInternalCertificateData should be used instead to get the certificate.
    • getOperatorExternalKeyData

      public java.lang.String getOperatorExternalKeyData()
      Description copied from interface: RestConfig
      Gets the external https port's private key.
      Specified by:
      getOperatorExternalKeyData in interface RestConfig
      Returns:
      base64 encoded PEM containing the private key, or null if getOperatorExternalKeyFile should be used instead to get the private key.
    • getOperatorInternalKeyData

      public java.lang.String getOperatorInternalKeyData()
      Description copied from interface: RestConfig
      Gets the internal https port's private key.
      Specified by:
      getOperatorInternalKeyData in interface RestConfig
      Returns:
      base64 encoded PEM containing the private key, or null if getOperatorInternalKeyFile should be used instead to get the private key.
    • getOperatorExternalKeyFile

      public java.lang.String getOperatorExternalKeyFile()
      Description copied from interface: RestConfig
      Gets external https port's private key.
      Specified by:
      getOperatorExternalKeyFile in interface RestConfig
      Returns:
      the pathname of a PEM file containing the private key or null if getOperatorExternalKeyData should be used instead to get the private key.
    • getOperatorInternalKeyFile

      public java.lang.String getOperatorInternalKeyFile()
      Description copied from interface: RestConfig
      Gets internal https port's private key.
      Specified by:
      getOperatorInternalKeyFile in interface RestConfig
      Returns:
      the pathname of a PEM file containing the private key or null if getOperatorInternalKeyData should be used instead to get the private key.
    • getBackend

      public RestBackend getBackend​(java.lang.String accessToken)
      Description copied from interface: RestConfig
      Gets a RestBackend instance that does the real work behind a single WebLogic Operator REST api request.
      Specified by:
      getBackend in interface RestConfig
      Parameters:
      accessToken - contains the Kubernetes service account token that should be used to authenticate and authorize this request.
      Returns:
      a RestBackend instance that can be used to process this request (but not other requests).