Package dev.getelements.elements.sdk
Interface Event
public interface Event
Represents an event to be handled by
Element instances.-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringAll event names with the following prefix are considered system events. -
Method Summary
Modifier and TypeMethodDescriptionstatic Event.Builderbuilder()Returns a newEvent.BuilderforEventinstances.Get the arguments of theEvent.TheEventname.default booleanTrue if the event is a system event.
-
Field Details
-
SYSTEM_EVENT_PREFIX
All event names with the following prefix are considered system events. Applications should not use events prefixed with this string.- See Also:
-
-
Method Details
-
isSystemEvent
default boolean isSystemEvent()True if the event is a system event.- Returns:
- true if system event, false otherwise.
-
getEventName
String getEventName()TheEventname. The names of events are application specific. However, they should follow a globally unique naming pattern. Additionally,SYSTEM_EVENT_PREFIXprefixed events are reserved for the SDK and should not be used.- Returns:
- the name of hte event.
-
getEventArguments
Get the arguments of theEvent. When using argument-based matching, each argument must be non-null and must match based on exact class type. The dispatch mechanism does not honor polymorphism.- Returns:
- the arguments
-
builder
Returns a newEvent.BuilderforEventinstances.- Returns:
- the
Event.Builder
-