QScript  2.1.2
Expression and algorithm evaluator
 All Classes Namespaces Functions Variables Pages
Public Member Functions | List of all members
org.qscript.eventsonfire.EventHandler Interface Reference

Public Member Functions

Class<?>[] producer () default
 
Class<?>[] event () default
 
String[] anyTag () default
 
String[] eachTag () default
 
boolean pooled () default false
 

Detailed Description

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.

Author
Manfred HANTSCHEL

Member Function Documentation

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.

Returns
an array of strings
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.

Returns
an array of strings
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.

Returns
the allowed events
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.

Returns
the type of the invocation of the method
Deprecated:
use the PooledEventHandler annotation instead
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.

Returns
the allowed producers

The documentation for this interface was generated from the following file: