Class ReadonlyClient

    • Constructor Detail

      • ReadonlyClient

        public ReadonlyClient​(@NotNull
                              CloudStateHolder cloudStateHolder,
                              @NotNull
                              String projectId,
                              @NotNull
                              String profileId)
    • Method Detail

      • getErrorInfo

        @Nullable
        public CloudErrorInfo getErrorInfo()
        Description copied from interface: CloudClient
        Returns currect error info if there was any or null. Can be null. Returning error info marks this profile as error-containing and not relayable.
        Specified by:
        getErrorInfo in interface CloudClient
        Specified by:
        getErrorInfo in interface CloudErrorProvider
        Returns:
        error info or null
      • isInitialized

        public boolean isInitialized()
        Description copied from interface: CloudClient
        Checks if the client data is fully ready to be queried by the system. Actually, it may take some time to communicate to the cloud service.

        All interface members may not return full information if false was returned from this method.

        Specified by:
        isInitialized in interface CloudClient
        Returns:
        true if the cloud is fully initialized.
      • findInstanceByAgent

        @Nullable
        public CloudInstance findInstanceByAgent​(@NotNull
                                                 AgentDescription agentDescription)
        Description copied from interface: CloudClient
        Checks if the agent is an instnce of one of the running instances of that cloud profile.
        Specified by:
        findInstanceByAgent in interface CloudClient
        Parameters:
        agentDescription - agent description of an agent that is going to connect
        Returns:
        corresponding CloudInstance if found or null
      • getImages

        @NotNull
        public Collection<? extends CloudImage> getImages()
                                                   throws CloudException
        Description copied from interface: CloudClient
        Lists all user selected images. The method should either return an unmodifiable snapshot of the images or a thread-safe collection.
        Specified by:
        getImages in interface CloudClient
        Returns:
        list of all available images; their order is undefined.
        Throws:
        CloudException - on error
      • canStartNewInstanceWithDetails

        @NotNull
        public CanStartNewInstanceResult canStartNewInstanceWithDetails​(@NotNull
                                                                        CloudImage image)
        Description copied from interface: CloudClient
        Call this method to check if it is possible (in theory) to start new instance of a given image in this profile.
        Specified by:
        canStartNewInstanceWithDetails in interface CloudClient
        Parameters:
        image - image to start new instance from
        Returns:
        can start new instance result with details
      • generateAgentName

        @Nullable
        public String generateAgentName​(@NotNull
                                        AgentDescription agent)
        Description copied from interface: CloudClient
        Generated name for build agent that is thought to be running as instance of this cloud client.
        Specified by:
        generateAgentName in interface CloudClient
        Parameters:
        agent - agent instance
        Returns:
        proposed build agent name or null