Interface CloudEventListener
-
- All Superinterfaces:
EventListener
- All Known Implementing Classes:
CloudEventAdapter
,CloudEventsLogger
public interface CloudEventListener extends EventListener
- Author:
- Eugene Petrenko Created: 28.07.2009 14:22:12
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description void
beforeCloudClientDisposed(CloudProfile cloudProfile, CloudClientEx client)
Fired before disposing cloud client for extra actions, such as unauthorization of agents (if necessary)void
beforeInstanceStarted(CloudProfile profile, CloudImage image, BeforeStartInstanceArguments args)
Notified before instance is started.void
cloudClientFactoryRegistered(String cloudCode)
Notifies of registration of new cloudClient plugingvoid
imageRemoved(String projectId, String imageId)
This event is called when image is removedvoid
imageUpdated(String projectId, CloudImageParameters imageParameters)
This event is called when a single image settings change was detected.void
instanceAgentMatched(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.void
instanceAgentUnmatched(String profileId, String imageId, String instanceId, SBuildAgent agent)
Fired if agent matched to the instance has gonevoid
instanceFailedToStart(CloudProfile profile, CloudImage cloudImage, Throwable reason)
Fired if the agent start action has failedvoid
instanceFailedToStop(CloudProfile profile, CloudInstance instance, Throwable cause)
Fired if an exception thrown while attempting to stop running instance.void
instanceGone(String profileId, String imageId, String instanceId)
Fired if an instance has stoped to be reported in the modelvoid
instanceStarting(CloudProfile profile, CloudInstance instance)
Agent start action has just been called.void
instanceStatusChanged(CloudProfile profile, CloudInstance instance)
Notifies on cloud instance status changevoid
instanceTerminating(CloudProfile profile, CloudInstance instance)
void
instanceTerminating(CloudProfile profile, CloudInstance instance, TerminateInstanceReason reason)
TeamCity has called terminate instance command.void
integrationStatusChanged(String projectId, ProjectCloudIntegrationStatus integrationStatus)
This event is called when project's integration status is changed.void
profileRemoved(String projectId, String profileId)
This event is called when profile is removedvoid
profileUpdated(String projectId, CloudProfile profile)
This event is called when a single profile settings change was detected from the disk.
-
-
-
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
- profileinstance
- 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
- profileIdimageId
- imageIdinstanceId
- instanceId
-
beforeInstanceStarted
void beforeInstanceStarted(@NotNull CloudProfile profile, @NotNull CloudImage image, @NotNull BeforeStartInstanceArguments args)
Notified before instance is started. Listeners may useBeforeStartInstanceArguments
class to update agent properites and/or to disabled start- Parameters:
profile
- profileimage
- image of the profileargs
- parameters
-
instanceStarting
void instanceStarting(@NotNull CloudProfile profile, @NotNull CloudInstance instance)
Agent start action has just been called.- Parameters:
profile
- instance profileinstance
- 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 profilecloudImage
- image of the profilereason
- reason as to why it has failed
-
instanceTerminating
@Deprecated void instanceTerminating(@NotNull CloudProfile profile, @NotNull CloudInstance instance)
TeamCity has called terminate instance command. Instance should disappear in a shoult while after.- Parameters:
profile
- profileinstance
- instance
-
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
- profileinstance
- instancereason
- 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
- profileinstance
- could instanceagent
- 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
- profileimageId
- imageIdinstanceId
- instanceagent
- agent
-
integrationStatusChanged
void integrationStatusChanged(@NotNull String projectId, ProjectCloudIntegrationStatus integrationStatus)
This event is called when project's integration status is changed.- Parameters:
projectId
- new loaded profilesintegrationStatus
- 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 instanceprofile
- 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
-
-
-