Instance Methods
- 
    callRPC(name, data, callback, traceId) common/network/dispatcher.js, line 156
- 
    
    
    Calls an RPC. Use Dispatcher#registerRPCorDispatcher#registerAsyncRPCto register a handler for an RPC.Argument Type Attributes Description nameString Name of the RPC. dataObject Arbitrary data argument. callbackfunction Callback that receives the result of the RPC. traceIdString <optional> 
 A trace ID for the event. If not given, one will be randomly generated. 
- 
    fireEvent(name, data, traceId) common/network/dispatcher.js, line 131
- 
    
    
    Fires an event. Use Dispatcher#subscribeon the other side to listen for events. The event will be fired locally, as well, so any subscribers for the event attached to this Dispatcher will be called.Argument Type Attributes Description nameString Name of the event. dataObject <optional> 
 Event data. traceIdString <optional> 
 A trace ID for the event. If not given, one will be randomly generated. 
- 
    registerAsyncRPC(name, handler) common/network/dispatcher.js, line 200
- 
    
    
    Creates a new RPC. This version requires that the RPC asynchronously returns a value, see Dispatcher#registerAsyncRPCfor a version that allows for synchrony.Argument Type Description nameString Name of the RPC. handlerfunction Gets the a data object as the first argument, a callback as the second argument, and a trace id as the third argument. Must invoke the callback, passing in the result of the RPC. 
- 
    registerRPC(name, handler) common/network/dispatcher.js, line 184
- 
    
    
    Creates a new RPC. This version requires that the RPC synchronously returns a value, see Dispatcher#registerAsyncRPCfor a version that allows for asynchrony.Argument Type Description nameString Name of the RPC. handlerfunction Gets the a data object as the first argument and the trace id as the second argument. Must return the result of the RPC. 
- 
    subscribe(eventName, subscriber) → {Binding} common/network/dispatcher.js, line 112
- 
    
    
    Subscribes a function to be called whenever this Dispatcher receives a particular event. Use Dispatcher#fireEventon the other side to fire an event.
 Returns:Argument Type Description eventNameString Name of the event. subscriberfunction Function to call when the event is received. Gets the message data as the first argument and the trace id as the second argument. A binding, allowing the subscription to be cancelled later. 
 Lens API Documentation
				Lens API Documentation