Package com.netflix.genie.web.events
Class JobFinishedSNSPublisher
java.lang.Object
com.netflix.genie.web.events.JobFinishedSNSPublisher
- All Implemented Interfaces:
EventListener
,org.springframework.context.ApplicationListener<JobStateChangeEvent>
public class JobFinishedSNSPublisher
extends Object
implements org.springframework.context.ApplicationListener<JobStateChangeEvent>
Publishes Amazon SNS notifications with detailed information about each completed job.
- Since:
- 4.0.0
-
Field Summary
Modifier and TypeFieldDescriptionprotected final SNSNotificationsProperties
protected final io.micrometer.core.instrument.MeterRegistry
-
Constructor Summary
ConstructorDescriptionJobFinishedSNSPublisher
(com.amazonaws.services.sns.AmazonSNS snsClient, SNSNotificationsProperties properties, DataServices dataServices, io.micrometer.core.instrument.MeterRegistry registry, com.fasterxml.jackson.databind.ObjectMapper mapper) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
protected void
publishEvent
(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
-
JobFinishedSNSPublisher
public JobFinishedSNSPublisher(com.amazonaws.services.sns.AmazonSNS snsClient, SNSNotificationsProperties properties, DataServices dataServices, io.micrometer.core.instrument.MeterRegistry registry, com.fasterxml.jackson.databind.ObjectMapper mapper) Constructor.- Parameters:
snsClient
- Amazon SNS clientproperties
- configuration propertiesdataServices
- theDataServices
instance to useregistry
- metrics registrymapper
- object mapper
-
-
Method Details
-
onApplicationEvent
- Specified by:
onApplicationEvent
in interfaceorg.springframework.context.ApplicationListener<JobStateChangeEvent>
-
publishEvent
-