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 String
All event names with the following prefix are considered system events. -
Method Summary
Modifier and TypeMethodDescriptionstatic Event.Builder
builder()
Returns a newEvent.Builder
forEvent
instances.Get the arguments of theEvent
.TheEvent
name.default boolean
True 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()TheEvent
name. The names of events are application specific. However, they should follow a globally unique naming pattern. Additionally,SYSTEM_EVENT_PREFIX
prefixed 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.Builder
forEvent
instances.- Returns:
- the
Event.Builder
-