Public Member Functions | |
Class<?>[] | producer () default |
Class<?>[] | event () default |
String[] | anyTag () default |
String[] | eachTag () default |
boolean | pooled () default false |
Tags a method as event handler within a consumer, which may be called by the Events class. The method needs two arguments, the producer and the event. The producer is optional. The method will only be called if the type of the producer and the event fits the parameters and optionally the specified types.
String [] org.qscript.eventsonfire.EventHandler.anyTag | ( | ) |
Optional. One or more tags - the event has to be fired with at least one of these tags to trigger the event handler.
String [] org.qscript.eventsonfire.EventHandler.eachTag | ( | ) |
Optional. One or more tags - the event has to be fired with all of these tags to trigger the event handler.
Class<?> [] org.qscript.eventsonfire.EventHandler.event | ( | ) |
Optional. One or more classes of events handled by the method. Checked against the event argument. If empty, all classes are allowed that fit the events argument.
boolean org.qscript.eventsonfire.EventHandler.pooled | ( | ) |
Optional. If set to true, the invocation of the method will be delegated to a thread pool. The execution of the method will not block the event thread. The default value is false, because usually event handler are quite fast and should be execute one after another.
Class<?> [] org.qscript.eventsonfire.EventHandler.producer | ( | ) |
Optional. One or more classes of producers handled by the method. Checked against the optional producer argument. If empty and a producer argument is specified, all classes are allowed that fit the producer argument. If empty and no producer argument is specified, all producers are allowed.