src/js/lib/RTRemoteServer.js
/**
   * hander client message
   * @param {RTRemoteTask} task the remote protocol
   * @return {Promise<any>} the promise with the result
   */
hander client message
@param {RTRemoteTask} task the remote protocol
@return {Promise} the promise with the result
hander client message @param { RTRemoteTask } task the remote protocol @return { Promise } the promise with the result
handlerMessage(task) {
    switch (task.message[RTConst.MESSAGE_TYPE]) {
      case RTRemoteMessageType.GET_PROPERTY_BYNAME_REQUEST:
        return this.handlerGetPropertyByNameRequest(task);
      case RTRemoteMessageType.GET_PROPERTY_BYINDEX_REQUEST:
        return this.handlerGetPropertyByIndexRequest(task);
      case RTRemoteMessageType.SET_PROPERTY_BYNAME_REQUEST:
        return this.handlerSetPropertyByNameRequest(task);
      case RTRemoteMessageType.SET_PROPERTY_BYINDEX_REQUEST:
        return this.handlerSetPropertyByIndexRequest(task);
      case RTRemoteMessageType.METHOD_CALL_REQUEST:
        return this.handlerCallRequest(task);
      default:
        return Promise.reject(new RTException(`handlerMessage -> don't support message type ${
          task.message[RTConst.MESSAGE_TYPE]}`));
    }
  }
handlerMessage ( task ) { switch ( task . message [ RTConst . MESSAGE_TYPE ] ) { case RTRemoteMessageType . GET_PROPERTY_BYNAME_REQUEST : return this . handlerGetPropertyByNameRequest ( task ) ; case RTRemoteMessageType . GET_PROPERTY_BYINDEX_REQUEST : return this . handlerGetPropertyByIndexRequest ( task ) ; case RTRemoteMessageType . SET_PROPERTY_BYNAME_REQUEST : return this . handlerSetPropertyByNameRequest ( task ) ; case RTRemoteMessageType . SET_PROPERTY_BYINDEX_REQUEST : return this . handlerSetPropertyByIndexRequest ( task ) ; case RTRemoteMessageType . METHOD_CALL_REQUEST : return this . handlerCallRequest ( task ) ; default : return Promise . reject ( new RTException ( ` ${ task . message [ RTConst . MESSAGE_TYPE ] } ` ) ) ; } }
hander client message
 @param {RTRemoteTask} task the remote protocol
 @return {Promise<any>} the promise with the result
hander client message @param { RTRemoteTask } task the remote protocol @return { Promise<any > } the promise with the result