Interface CloudEventListener

    • Method Detail

      • cloudClientFactoryRegistered

        void cloudClientFactoryRegistered​(@NotNull
                                          String cloudCode)
        Notifies of registration of new cloudClient pluging
        Parameters:
        cloudCode - code of registered plugin
      • instanceStatusChanged

        void instanceStatusChanged​(@NotNull
                                   CloudProfile profile,
                                   @NotNull
                                   CloudInstance instance)
        Notifies on cloud instance status change
        Parameters:
        profile - profile
        instance - instance
      • instanceGone

        void instanceGone​(@NotNull
                          String profileId,
                          @NotNull
                          String imageId,
                          @NotNull
                          String instanceId)
        Fired if an instance has stoped to be reported in the model
        Parameters:
        profileId - profileId
        imageId - imageId
        instanceId - instanceId
      • instanceStarting

        void instanceStarting​(@NotNull
                              CloudProfile profile,
                              @NotNull
                              CloudInstance instance)
        Agent start action has just been called.
        Parameters:
        profile - instance profile
        instance - cloud instance
      • instanceFailedToStart

        void instanceFailedToStart​(@NotNull
                                   CloudProfile profile,
                                   @NotNull
                                   CloudImage cloudImage,
                                   @NotNull
                                   Throwable reason)
        Fired if the agent start action has failed
        Parameters:
        profile - instance profile
        cloudImage - image of the profile
        reason - reason as to why it has failed
      • instanceTerminating

        void instanceTerminating​(@NotNull
                                 CloudProfile profile,
                                 @NotNull
                                 CloudInstance instance,
                                 @NotNull
                                 TerminateInstanceReason reason)
        TeamCity has called terminate instance command. Instance should disappear in a shoult while after.
        Parameters:
        profile - profile
        instance - instance
        reason - reason
      • instanceAgentMatched

        void instanceAgentMatched​(@NotNull
                                  CloudProfile profile,
                                  @NotNull
                                  CloudInstance instance,
                                  @NotNull
                                  SBuildAgent agent)
        TeamCity started instance has been started and connected to TeamCity as build agent This event may be fired about same object for many times. Instances reflecting an object may change. It's to recommended storing instances.
        Parameters:
        profile - profile
        instance - could instance
        agent - agent
      • instanceAgentUnmatched

        void instanceAgentUnmatched​(@NotNull
                                    String profileId,
                                    @NotNull
                                    String imageId,
                                    @NotNull
                                    String instanceId,
                                    @NotNull
                                    SBuildAgent agent)
        Fired if agent matched to the instance has gone
        Parameters:
        profileId - profile
        imageId - imageId
        instanceId - instance
        agent - agent
      • integrationStatusChanged

        void integrationStatusChanged​(@NotNull
                                      String projectId,
                                      ProjectCloudIntegrationStatus integrationStatus)
        This event is called when project's integration status is changed.
        Parameters:
        projectId - new loaded profiles
        integrationStatus - cloud integration status
      • profileUpdated

        void profileUpdated​(String projectId,
                            @NotNull
                            CloudProfile profile)
        This event is called when a single profile settings change was detected from the disk.
        Parameters:
        projectId -
        profile -
      • imageUpdated

        void imageUpdated​(@NotNull
                          String projectId,
                          @NotNull
                          CloudImageParameters imageParameters)
        This event is called when a single image settings change was detected.
        Parameters:
        projectId -
        imageParameters -
      • profileRemoved

        void profileRemoved​(String projectId,
                            @NotNull
                            String profileId)
        This event is called when profile is removed
        Parameters:
        projectId -
        profileId - id of removed profile
      • imageRemoved

        void imageRemoved​(String projectId,
                          @NotNull
                          String imageId)
        This event is called when image is removed
        Parameters:
        projectId -
        imageId - id of removed image
      • instanceFailedToStop

        void instanceFailedToStop​(@NotNull
                                  CloudProfile profile,
                                  @NotNull
                                  CloudInstance instance,
                                  @Nullable
                                  Throwable cause)
        Fired if an exception thrown while attempting to stop running instance. This is a very bad thing, since it consumes user's money
        Parameters:
        instance - cloud instance
        profile - instance profile
      • beforeCloudClientDisposed

        void beforeCloudClientDisposed​(@NotNull
                                       CloudProfile cloudProfile,
                                       @NotNull
                                       CloudClientEx client)
        Fired before disposing cloud client for extra actions, such as unauthorization of agents (if necessary)
        Parameters:
        cloudProfile -
        client -