public class Event extends EventObject
| Modifier and Type | Class and Description |
|---|---|
static class |
Event.ParamsBuilder
This class is a fluent builder class for building up the parameter map.
|
source| Constructor and Description |
|---|
Event(Object source,
String eventID,
EventSeverity severity,
Locale locale,
Map<String,Object> params)
Creates a new Event.
|
Event(Object source,
String eventID,
EventSeverity severity,
Map<String,Object> params)
Creates a new Event using default locale.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getEventGroupID()
Returns the event group identifier.
|
String |
getEventID()
Returns the event identifier.
|
String |
getEventKey()
Returns the event key.
|
Locale |
getLocale()
Returns the locale.
|
Object |
getParam(String key)
Returns a parameter.
|
Map<String,Object> |
getParams()
Returns an unmodifiable
Map with all event parameters. |
EventSeverity |
getSeverity()
Returns the severity level.
|
static Event.ParamsBuilder |
paramsBuilder()
Creates and returns a fluent builder object for building up the parameter map.
|
void |
setSeverity(EventSeverity severity)
Sets the event's severity level.
|
getSource, toStringpublic Event(Object source, String eventID, EventSeverity severity, Map<String,Object> params)
source - the object that creates the eventeventID - the unique identifier of the eventseverity - the severity levelparams - the event parameters (a map of name/value pairs)public Event(Object source, String eventID, EventSeverity severity, Locale locale, Map<String,Object> params)
source - the object that creates the eventeventID - the unique identifier of the eventseverity - the severity levellocale - to use when formatting event (or null, which means use default locale)params - the event parameters (a map of name/value pairs)public String getEventID()
public String getEventGroupID()
public String getEventKey()
public EventSeverity getSeverity()
public void setSeverity(EventSeverity severity)
severity - the new event severitypublic Locale getLocale()
public Object getParam(String key)
key - the key to the parameterpublic Map<String,Object> getParams()
Map with all event parameters.public static Event.ParamsBuilder paramsBuilder()
Copyright © 2025 Apache Software Foundation. All rights reserved.