ObjectHandler
Message handler interface
inheritance relationship
Constructor
Handler
Construct a message handler 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, initialization routing parameters
Create a JavaScript message handler
1new Handler(Function hdlr);
Call parameters:
- hdlr: Function, JavaScript processor function
Construct a fileHandler orHttpRepeater
1new Handler(String hdlr);
Call parameters:
- hdlr: String, 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 results:
- Handler, return to the next processor
toString
Returns the string representation of the object. Generally, "[Native Object]" is returned. The object can be re-implemented according to its own characteristics.
1String Handler.toString();
Return results:
- String, returns the string representation of the object
toJSON
Returns a JSON format representation of the object, generally returning a collection of readable properties defined by the object.
1Value Handler.toJSON(String key = "");
Call parameters:
- key: String, not used
Return results:
- Value, returns a value containing JSON serializable