public class EventManager extends Object
| 构造器和说明 |
|---|
EventManager() |
| 限定符和类型 | 方法和说明 |
|---|---|
static <T extends Event> |
submit(Class<T> cls,
T event)
Submit the event to cls and all of cls 's implemented super event class
|
static <T extends Event> |
submit(T event)
Submit the event to all of its implemented super event class
|
static <T extends Event> |
submitOnce(Class<T> cls,
T event)
Submit the event only to cls event class
|
static <T extends Event> |
trySubmitOnce(Class<T> cls,
T event)
Submit the event only to itself and no exception throws
|
public static <T extends Event> void submit(T event) throws EventSubmitException
T - the event typeevent - the event need to be submittedEventSubmitException - if class of this event is abstract or there is no LISTENER_HANDLER in this eventpublic static <T extends Event> void submit(Class<T> cls, T event) throws EventSubmitException
T - the event typecls - the submitting chain start eventevent - the event need to be submittedEventSubmitException - if class of this event is abstract or there is no LISTENER_HANDLER in this eventpublic static <T extends Event> void trySubmitOnce(Class<T> cls, T event)
T - the event typecls - the submitting chain start eventevent - the event need to be submittedpublic static <T extends Event> void submitOnce(Class<T> cls, T event) throws EventSubmitException
T - the event typecls - the event class the event submits toevent - the event need to be submittedEventSubmitException - if class of this event is abstract or there is no LISTENER_HANDLER in this eventCopyright © 2022. All rights reserved.