Package com.netflix.genie.web.events
Class JobFinishedSNSPublisher
- java.lang.Object
-
- com.netflix.genie.web.events.JobFinishedSNSPublisher
-
- All Implemented Interfaces:
java.util.EventListener
,org.springframework.context.ApplicationListener<JobStateChangeEvent>
public class JobFinishedSNSPublisher extends java.lang.Object implements org.springframework.context.ApplicationListener<JobStateChangeEvent>
Publishes Amazon SNS notifications with detailed information about each completed job.- Since:
- 4.0.0
-
-
Field Summary
Fields Modifier and Type Field Description protected SNSNotificationsProperties
properties
protected io.micrometer.core.instrument.MeterRegistry
registry
-
Constructor Summary
Constructors Constructor Description JobFinishedSNSPublisher(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
onApplicationEvent(JobStateChangeEvent event)
protected void
publishEvent(com.netflix.genie.web.events.AbstractSNSPublisher.EventType eventType, java.util.HashMap<java.lang.String,java.lang.Object> eventDetailsMap)
-
-
-
Field Detail
-
properties
protected final SNSNotificationsProperties properties
-
registry
protected final io.micrometer.core.instrument.MeterRegistry registry
-
-
Constructor Detail
-
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 Detail
-
onApplicationEvent
public void onApplicationEvent(JobStateChangeEvent event)
- Specified by:
onApplicationEvent
in interfaceorg.springframework.context.ApplicationListener<JobStateChangeEvent>
-
publishEvent
protected void publishEvent(com.netflix.genie.web.events.AbstractSNSPublisher.EventType eventType, java.util.HashMap<java.lang.String,java.lang.Object> eventDetailsMap)
-
-