code: public final void sendGlobal(String handler, String data) {
  		try {
  			connection.sendMessage("{\"id\":-1,\"type\":\"global\",\"handler\":"
  					+ Json.escapeString(handler) + ",\"data\":" + data + "}");
  		} catch (IOException e) {
  			e.printStackTrace();
  		}
  	}
docs: This function is mainly made for plug-in use, it sends
  data to global user handler for example to perform some tasks
  that aren't related directly to widgets. Global handler is a javascript
  function in array named 'global', under key that is passed to this function as
  handler parameter. As first argument the javascript function is given
  data object that is passed as JSON here
  
  @param handler Name of client-side handler, generally syntax
  should be [PluginName]-[HandlerName], like JWWF-UserData
  @param data    Data to send, JSON-formatted