E - The type of an events API Payloadpublic abstract class EventHandler<E extends EventsApiPayload<?>> extends Object
| Constructor and Description |
|---|
EventHandler() |
| Modifier and Type | Method and Description |
|---|---|
void |
acceptUntypedObject(Object payload)
Used only internally.
|
Class<E> |
getEventPayloadClass()
Returns the Class object of the EventApiPayload implementation.
|
String |
getEventSubtype()
Returns the subtype of the event (e.g., "message_changed" for type: message)
|
abstract String |
getEventType()
Returns the type value of the event (e.g., MessageEvent.TYPE_NAME)
|
abstract void |
handle(E payload)
Implement your logic in this method.
|
public abstract String getEventType()
public String getEventSubtype()
public Class<E> getEventPayloadClass()
public abstract void handle(E payload)
payload - Events API payloadpublic void acceptUntypedObject(Object payload)
payload - Events API payloadCopyright © 2020. All rights reserved.