Class EventFactory


  • public abstract class EventFactory
    extends java.lang.Object
    EventFactory abstraction for creating Events.
    • Field Detail

      • NONE

        public static final EventFactory NONE
        Empty no-op EventFactory.
    • Constructor Detail

      • EventFactory

        public EventFactory()
    • Method Detail

      • createEvent

        public abstract Event createEvent​(Descriptor descriptor,
                                          Event.Severity severity)
        Create an event with the given Descriptor and Event.Severity.
        Parameters:
        descriptor - metric descriptor for this event
        severity - severity for this event
        Returns:
        new event with given severity
      • createError

        public Event createError​(Descriptor descriptor)
        Create an event with Event.Severity#ERROR.
        Parameters:
        descriptor - metric descriptor for this event
        Returns:
        new ERROR event
      • createWarning

        public Event createWarning​(Descriptor descriptor)
        Create an event with Event.Severity#WARNING.
        Parameters:
        descriptor - metric descriptor for this event
        Returns:
        new WARNING event
      • createInfo

        public Event createInfo​(Descriptor descriptor)
        Create an event with Event.Severity#INFO.
        Parameters:
        descriptor - metric descriptor for this event
        Returns:
        new INFO event