Package com.lightbend.cinnamon.event
Class EventFactory
- java.lang.Object
-
- com.lightbend.cinnamon.event.EventFactory
-
public abstract class EventFactory extends java.lang.Object
EventFactory
abstraction for creating Events.
-
-
Field Summary
Fields Modifier and Type Field Description static EventFactory
NONE
Empty no-opEventFactory
.
-
Constructor Summary
Constructors Constructor Description EventFactory()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description Event
createError(Descriptor descriptor)
Create an event withEvent.Severity#ERROR
.abstract Event
createEvent(Descriptor descriptor, Event.Severity severity)
Create an event with the givenDescriptor
andEvent.Severity
.Event
createInfo(Descriptor descriptor)
Create an event withEvent.Severity#INFO
.Event
createWarning(Descriptor descriptor)
Create an event withEvent.Severity#WARNING
.
-
-
-
Field Detail
-
NONE
public static final EventFactory NONE
Empty no-opEventFactory
.
-
-
Method Detail
-
createEvent
public abstract Event createEvent(Descriptor descriptor, Event.Severity severity)
Create an event with the givenDescriptor
andEvent.Severity
.- Parameters:
descriptor
- metric descriptor for this eventseverity
- severity for this event- Returns:
- new event with given severity
-
createError
public Event createError(Descriptor descriptor)
Create an event withEvent.Severity#ERROR
.- Parameters:
descriptor
- metric descriptor for this event- Returns:
- new ERROR event
-
createWarning
public Event createWarning(Descriptor descriptor)
Create an event withEvent.Severity#WARNING
.- Parameters:
descriptor
- metric descriptor for this event- Returns:
- new WARNING event
-
createInfo
public Event createInfo(Descriptor descriptor)
Create an event withEvent.Severity#INFO
.- Parameters:
descriptor
- metric descriptor for this event- Returns:
- new INFO event
-
-