Object Handler
Message processor interface
Inheritance
Constructor
Handler
Construct a message processor chain processing object
1new Handler(Array hdlrs);
Call parameters:
- hdlrs: Array, processor array
Create a message handler routing object
1new Handler(Object map);
Call parameters:
- map: Object, initialize routing parameters
Create a JavaSvript message processor
1new Handler(Function hdlr);
Call parameters:
- hdlr: Function, JavaScript processor function
Construct a fileHandler or HttpRepeater
1new Handler(String hdlr);
Call parameters:
- hdlr: String, the address parameter of the processor
Member function
invoke
Process a message or object
1Handler Handler.invoke(object v) async;
Call parameters:
- v: object, Specify the message or object to be processed
Return result:
- Handler, Return to the next processor
toString
Returns the string representation of the object, generally returns "[Native Object]", the object can be re-implemented according to its own characteristics
1String Handler.toString();
Return result:
- String, Returns the string representation of the object
toJSON
Returns the JSON format representation of the object, generally returns a collection of readable attributes defined by the object
1Value Handler.toJSON(String key = "");
Call parameters:
- key: String, unused
Return result:
- Value, Returns a value containing JSON serializable