Class CloudEventsLogger
- java.lang.Object
-
- jetbrains.buildServer.clouds.server.impl.CloudEventsLogger
-
- All Implemented Interfaces:
EventListener,CloudEventListener
public class CloudEventsLogger extends Object implements CloudEventListener
- Author:
- Eugene Petrenko Created: 11.11.2009 16:16:01
-
-
Constructor Summary
Constructors Constructor Description CloudEventsLogger(CloudEventDispatcher disp)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbeforeCloudClientDisposed(CloudProfile cloudProfile, CloudClientEx client)Fired before disposing cloud client for extra actions, such as unauthorization of agents (if necessary)voidbeforeInstanceStarted(CloudProfile profile, CloudImage image, BeforeStartInstanceArguments args)Notified before instance is started.voidcloudClientFactoryRegistered(String cloudCode)Notifies of registration of new cloudClient plugingvoidimageRemoved(String projectId, String imageId)This event is called when image is removedvoidimageUpdated(String projectId, CloudImageParameters imageParameters)This event is called when a single image settings change was detected.voidinstanceAgentMatched(CloudProfile profile, CloudInstance instance, 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.voidinstanceAgentUnmatched(String profileId, String imageId, String instanceId, SBuildAgent agent)Fired if agent matched to the instance has gonevoidinstanceFailedToStart(CloudProfile profile, CloudImage cloudImage, Throwable reason)Fired if the agent start action has failedvoidinstanceFailedToStop(CloudProfile profile, CloudInstance instance, Throwable cause)Fired if an exception thrown while attempting to stop running instance.voidinstanceGone(String profileId, String imageId, String instanceId)Fired if an instance has stoped to be reported in the modelvoidinstanceStarting(CloudProfile profile, CloudInstance instance)Agent start action has just been called.voidinstanceStatusChanged(CloudProfile profile, CloudInstance instance)Notifies on cloud instance status changevoidinstanceTerminating(CloudProfile profile, CloudInstance instance)TeamCity has called terminate instance command.voidinstanceTerminating(CloudProfile profile, CloudInstance instance, TerminateInstanceReason reason)TeamCity has called terminate instance command.voidintegrationStatusChanged(String projectId, ProjectCloudIntegrationStatus integrationStatus)This event is called when project's integration status is changed.voidprofileRemoved(String projectId, String profileId)This event is called when profile is removedvoidprofileUpdated(String projectId, CloudProfile cloudProfile)This event is called when a single profile settings change was detected from the disk.
-
-
-
Constructor Detail
-
CloudEventsLogger
public CloudEventsLogger(@NotNull CloudEventDispatcher disp)
-
-
Method Detail
-
instanceAgentMatched
public void instanceAgentMatched(@NotNull CloudProfile profile, @NotNull CloudInstance instance, @NotNull SBuildAgent agent)Description copied from interface:CloudEventListenerTeamCity 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.- Specified by:
instanceAgentMatchedin interfaceCloudEventListener- Parameters:
profile- profileinstance- could instanceagent- agent
-
instanceAgentUnmatched
public void instanceAgentUnmatched(@NotNull String profileId, @NotNull String imageId, @NotNull String instanceId, @NotNull SBuildAgent agent)Description copied from interface:CloudEventListenerFired if agent matched to the instance has gone- Specified by:
instanceAgentUnmatchedin interfaceCloudEventListener- Parameters:
profileId- profileimageId- imageIdinstanceId- instanceagent- agent
-
instanceGone
public void instanceGone(@NotNull String profileId, @NotNull String imageId, @NotNull String instanceId)Description copied from interface:CloudEventListenerFired if an instance has stoped to be reported in the model- Specified by:
instanceGonein interfaceCloudEventListener- Parameters:
profileId- profileIdimageId- imageIdinstanceId- instanceId
-
instanceStarting
public void instanceStarting(@NotNull CloudProfile profile, @NotNull CloudInstance instance)Description copied from interface:CloudEventListenerAgent start action has just been called.- Specified by:
instanceStartingin interfaceCloudEventListener- Parameters:
profile- instance profileinstance- cloud instance
-
instanceFailedToStart
public void instanceFailedToStart(@NotNull CloudProfile profile, @NotNull CloudImage cloudImage, @NotNull Throwable reason)Description copied from interface:CloudEventListenerFired if the agent start action has failed- Specified by:
instanceFailedToStartin interfaceCloudEventListener- Parameters:
profile- instance profilecloudImage- image of the profilereason- reason as to why it has failed
-
cloudClientFactoryRegistered
public void cloudClientFactoryRegistered(@NotNull String cloudCode)Description copied from interface:CloudEventListenerNotifies of registration of new cloudClient pluging- Specified by:
cloudClientFactoryRegisteredin interfaceCloudEventListener- Parameters:
cloudCode- code of registered plugin
-
instanceStatusChanged
public void instanceStatusChanged(@NotNull CloudProfile profile, @NotNull CloudInstance instance)Description copied from interface:CloudEventListenerNotifies on cloud instance status change- Specified by:
instanceStatusChangedin interfaceCloudEventListener- Parameters:
profile- profileinstance- instance
-
instanceTerminating
public void instanceTerminating(@NotNull CloudProfile profile, @NotNull CloudInstance instance)Description copied from interface:CloudEventListenerTeamCity has called terminate instance command. Instance should disappear in a shoult while after.- Specified by:
instanceTerminatingin interfaceCloudEventListener- Parameters:
profile- profileinstance- instance
-
instanceTerminating
public void instanceTerminating(@NotNull CloudProfile profile, @NotNull CloudInstance instance, @NotNull TerminateInstanceReason reason)Description copied from interface:CloudEventListenerTeamCity has called terminate instance command. Instance should disappear in a shoult while after.- Specified by:
instanceTerminatingin interfaceCloudEventListener- Parameters:
profile- profileinstance- instancereason- reason
-
integrationStatusChanged
public void integrationStatusChanged(@NotNull String projectId, ProjectCloudIntegrationStatus integrationStatus)Description copied from interface:CloudEventListenerThis event is called when project's integration status is changed.- Specified by:
integrationStatusChangedin interfaceCloudEventListener- Parameters:
projectId- new loaded profilesintegrationStatus- cloud integration status
-
profileUpdated
public void profileUpdated(String projectId, @NotNull CloudProfile cloudProfile)
Description copied from interface:CloudEventListenerThis event is called when a single profile settings change was detected from the disk.- Specified by:
profileUpdatedin interfaceCloudEventListener
-
imageUpdated
public void imageUpdated(@NotNull String projectId, @NotNull CloudImageParameters imageParameters)Description copied from interface:CloudEventListenerThis event is called when a single image settings change was detected.- Specified by:
imageUpdatedin interfaceCloudEventListener
-
profileRemoved
public void profileRemoved(String projectId, @NotNull String profileId)
Description copied from interface:CloudEventListenerThis event is called when profile is removed- Specified by:
profileRemovedin interfaceCloudEventListenerprofileId- id of removed profile
-
imageRemoved
public void imageRemoved(String projectId, @NotNull String imageId)
Description copied from interface:CloudEventListenerThis event is called when image is removed- Specified by:
imageRemovedin interfaceCloudEventListenerimageId- id of removed image
-
beforeInstanceStarted
public void beforeInstanceStarted(@NotNull CloudProfile profile, @NotNull CloudImage image, @NotNull BeforeStartInstanceArguments args)Description copied from interface:CloudEventListenerNotified before instance is started. Listeners may useBeforeStartInstanceArgumentsclass to update agent properites and/or to disabled start- Specified by:
beforeInstanceStartedin interfaceCloudEventListener- Parameters:
profile- profileimage- image of the profileargs- parameters
-
instanceFailedToStop
public void instanceFailedToStop(@NotNull CloudProfile profile, @NotNull CloudInstance instance, @Nullable Throwable cause)Description copied from interface:CloudEventListenerFired if an exception thrown while attempting to stop running instance. This is a very bad thing, since it consumes user's money- Specified by:
instanceFailedToStopin interfaceCloudEventListener- Parameters:
profile- instance profileinstance- cloud instance
-
beforeCloudClientDisposed
public void beforeCloudClientDisposed(CloudProfile cloudProfile, @NotNull CloudClientEx client)
Description copied from interface:CloudEventListenerFired before disposing cloud client for extra actions, such as unauthorization of agents (if necessary)- Specified by:
beforeCloudClientDisposedin interfaceCloudEventListener
-
-