Package com.netflix.genie.web.events
Class JobStateChangeSNSPublisher
java.lang.Object
com.netflix.genie.web.events.JobStateChangeSNSPublisher
- All Implemented Interfaces:
EventListener,org.springframework.context.ApplicationListener<JobStateChangeEvent>
public class JobStateChangeSNSPublisher
extends Object
implements org.springframework.context.ApplicationListener<JobStateChangeEvent>
Publishes Amazon SNS notifications for fine-grained job state changes.
- Since:
- 4.0.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final SNSNotificationsPropertiesprotected final io.micrometer.core.instrument.MeterRegistry -
Constructor Summary
ConstructorsConstructorDescriptionJobStateChangeSNSPublisher(com.amazonaws.services.sns.AmazonSNS snsClient, SNSNotificationsProperties properties, io.micrometer.core.instrument.MeterRegistry registry, com.fasterxml.jackson.databind.ObjectMapper mapper) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidprotected voidpublishEvent(com.netflix.genie.web.events.AbstractSNSPublisher.EventType eventType, HashMap<String, Object> eventDetailsMap)
-
Field Details
-
properties
-
registry
protected final io.micrometer.core.instrument.MeterRegistry registry
-
-
Constructor Details
-
JobStateChangeSNSPublisher
public JobStateChangeSNSPublisher(com.amazonaws.services.sns.AmazonSNS snsClient, SNSNotificationsProperties properties, io.micrometer.core.instrument.MeterRegistry registry, com.fasterxml.jackson.databind.ObjectMapper mapper) Constructor.- Parameters:
snsClient- Amazon SNS clientproperties- configuration propertiesregistry- metrics registrymapper- object mapper
-
-
Method Details
-
onApplicationEvent
- Specified by:
onApplicationEventin interfaceorg.springframework.context.ApplicationListener<JobStateChangeEvent>
-
publishEvent
-