Class RestBackendImpl

java.lang.Object
oracle.kubernetes.operator.rest.RestBackendImpl
All Implemented Interfaces:
RestBackend

public class RestBackendImpl
extends java.lang.Object
implements RestBackend
RestBackendImpl implements the backend of the WebLogic operator REST api by making calls to Kubernetes and WebLogic. A separate instance is created for each REST request since we need to hold some per-request state.
  • Method Summary

    Modifier and Type Method Description
    protected boolean authenticateWithTokenReview()  
    java.util.Set<java.lang.String> getClusters​(java.lang.String domainUid)
    Get the names of the clusters in a WebLogic domain.
    java.util.Set<java.lang.String> getDomainUids()
    Get the unique identifiers of all the WebLogic domains that have been registered with the WebLogic operator.
    boolean isCluster​(java.lang.String domainUid, java.lang.String cluster)
    Determines whether or not a cluster exists in a WebLogic domain.
    boolean isDomainUid​(java.lang.String domainUid)
    Determines whether or not a WebLogic domain has been registered with the WebLogic operator.
    void performDomainAction​(java.lang.String domainUid, DomainAction params)
    Applies the specified command to the specified domain.
    void scaleCluster​(java.lang.String domainUid, java.lang.String cluster, int managedServerCount)
    Scales the number of managed servers in a WebLogic cluster.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • getDomainUids

      public java.util.Set<java.lang.String> getDomainUids()
      Description copied from interface: RestBackend
      Get the unique identifiers of all the WebLogic domains that have been registered with the WebLogic operator.
      Specified by:
      getDomainUids in interface RestBackend
      Returns:
      a Set of domain UIDs.
    • isDomainUid

      public boolean isDomainUid​(java.lang.String domainUid)
      Description copied from interface: RestBackend
      Determines whether or not a WebLogic domain has been registered with the WebLogic operator.
      Specified by:
      isDomainUid in interface RestBackend
      Parameters:
      domainUid - - the unique identifier assigned to a WebLogic domain.
      Returns:
      whether or not this domainUID has been registered with the WebLogic operator.
    • performDomainAction

      public void performDomainAction​(java.lang.String domainUid, DomainAction params)
      Description copied from interface: RestBackend
      Applies the specified command to the specified domain.
      Specified by:
      performDomainAction in interface RestBackend
      Parameters:
      domainUid - the unique ID of a domain
      params - an update command with optional parameters
    • getClusters

      public java.util.Set<java.lang.String> getClusters​(java.lang.String domainUid)
      Description copied from interface: RestBackend
      Get the names of the clusters in a WebLogic domain.
      Specified by:
      getClusters in interface RestBackend
      Parameters:
      domainUid - - the unique identifier assigned to the Weblogic domain when it was registered with the WebLogic operator. The caller is responsible for calling isDomainUid first and not calling this method if the domain has not been registered.
      Returns:
      a Set of Weblogic cluster names.
    • isCluster

      public boolean isCluster​(java.lang.String domainUid, java.lang.String cluster)
      Description copied from interface: RestBackend
      Determines whether or not a cluster exists in a WebLogic domain.
      Specified by:
      isCluster in interface RestBackend
      Parameters:
      domainUid - - the unique identifier assigned to the Weblogic domain when it was registered with the WebLogic operator. The caller is responsible for calling isDomainUid first and not calling this method if the domain has not been registered.
      cluster - - the name of the cluster in the WebLogic domain.
      Returns:
      whether or not a cluster with this name exists in the WebLogic domain.
    • scaleCluster

      public void scaleCluster​(java.lang.String domainUid, java.lang.String cluster, int managedServerCount)
      Description copied from interface: RestBackend
      Scales the number of managed servers in a WebLogic cluster. This method configures the desired number of managed servers, both at the Kubernetes and WebLogic cluster levels, then returns. It does not wait for the number of running managed servers to match the configured number of servers.
      Specified by:
      scaleCluster in interface RestBackend
      Parameters:
      domainUid - - the unique identifier assigned to the Weblogic domain when it was registered with the WebLogic operator. The caller is responsible for calling isDomainUid first and not calling this method if the domain has not been registered.
      cluster - - the name of the cluster in the WebLogic domain. The caller is responsible for calling isCluster first and not calling this method if the cluster does not exist.
      managedServerCount - - the desired number of WebLogic managed servers.
    • authenticateWithTokenReview

      protected boolean authenticateWithTokenReview()