Class 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
    • 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)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • 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 client
        properties - configuration properties
        dataServices - the DataServices instance to use
        registry - metrics registry
        mapper - object mapper
    • Method Detail

      • onApplicationEvent

        public void onApplicationEvent​(JobStateChangeEvent event)
        Specified by:
        onApplicationEvent in interface org.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)