docs: function _messageHandler(message) {
              try {
                  if (message.method) { // request
                      var method = message.method,
                          params = message.params || [];
                      if ("serviceId" in message) {
                          var service = _serviceReferences[message.serviceId];
                          if (!service) {
                              _throwError(message.id, "service not found");
                          } else if (_isTrusted(service)) {
                          	var serviceRegistry = _internalRegistry.serviceRegistry;
  	                        service = serviceRegistry.getService(service);
  	                        if (method in service) {
  	                            _callMethod(message.id, service, service[method], params);
  	                        } else {
  	                            _throwError(message.id, "method not found");
  	                        }
                      	} else {
                      		_throwError(message.id, "not trusted");
                      	}
                      } else if ("objectId" in message) {
                          var object = _objectReferences[message.objectId];
                          if (!object) {
                              _throwError(message.id, "object not found");
                          } else if (method in object) {
                              _callMethod(message.id, object, object[method], params);
                          } else {
                              _throwError(message.id, "method not found");
                          }
                      } else if ("requestId" in message) {
                          var request = _requestReferences[message.requestId];
                          if (request && method === "cancel" && request.cancel) {
                              request.cancel.apply(request, params);
                          }
                      } else if ("responseId" in message) {
                          var response = _responseReferences[message.responseId];
                          if (response && method === "progress" && response.progress) {
                              response.progress.apply(response, params);
                          }
                      } else if ("loading" === message.method) {
                          _channel.loading();
                      } else {
                          if ("plugin" === message.method) { //$NON-NLS-0$
                              _channel.connected();
                              var manifest = message.params[0];
                              _update({
                                  headers: manifest.headers,
                                  services: manifest.services
                              }).then(function() {
                                  if (_deferredLoad) {
                                      _deferredLoad.resolve(_this);
                                  }
                              });
                              if (manifest.updateRegistry) {
                              	_updateRemoteRegistry();
                          	}
                          } else if ("timeout" === message.method || "error" === message.method) {
                              if (_deferredLoad) {
                                  _deferredLoad.reject(message.error);
                              }
                          } else {
                              throw new Error("Bad method: " + message.method);
                          }
                      }
                  } else if (message.id) {
                      var deferred = _responseReferences[String(message.id)];
                      if (deferred) {
  	                    delete _responseReferences[String(message.id)];
  	                    if (message.error) {
  	                        var error = _internalRegistry.handleServiceError(_this, message.error);
  	                        deferred.reject(error);
  	                    } else {
  	                        deferred.resolve(message.result);
  	                    }
                      }
                  }
              } catch (e) {
                  console.log("Plugin._messageHandler " + e);
              }
          }