Examples of ExceptionOrReturnValue


Examples of com.google.gwt.dev.shell.BrowserChannel.SessionHandler.ExceptionOrReturnValue

            final FreeMessage freeMsg = FreeMessage.receive(this);
            handler.freeValue(this, freeMsg.getIds());
            break;
          case INVOKE:
            InvokeOnServerMessage imsg = InvokeOnServerMessage.receive(this);
            ExceptionOrReturnValue result = handler.invoke(this, imsg.getThis(),
                imsg.getMethodDispatchId(), imsg.getArgs());
            sendFreedValues();
            ReturnMessage.send(this, result);
            break;
          case INVOKE_SPECIAL:
View Full Code Here

Examples of com.google.gwt.dev.shell.BrowserChannel.SessionHandler.ExceptionOrReturnValue

            break;
          case RETURN:
            return ReturnMessage.receive(this);
          case INVOKE:
            InvokeOnServerMessage imsg = InvokeOnServerMessage.receive(this);
            ExceptionOrReturnValue result = handler.invoke(this, imsg.getThis(),
                imsg.getMethodDispatchId(), imsg.getArgs());
            sendFreedValues();
            ReturnMessage.send(this, result);
            break;
          case INVOKE_SPECIAL:
View Full Code Here

Examples of com.google.gwt.dev.shell.BrowserChannel.SessionHandler.ExceptionOrReturnValue

  private void handleInvokeSpecial(SessionHandler handler) throws IOException,
      BrowserChannelException {
    final InvokeSpecialMessage ismsg = InvokeSpecialMessage.receive(this);
    Value[] args = ismsg.getArgs();
    ExceptionOrReturnValue retExc = null;
    switch (ismsg.getDispatchId()) {
      case GetProperty:
        assert args.length == 2;
        retExc = handler.getProperty(this, args[0].getInt(), args[1].getInt());
        break;
View Full Code Here

Examples of com.google.gwt.dev.shell.BrowserChannel.SessionHandler.ExceptionOrReturnValue

  private ReturnMessage reactToMessages(
      HtmlUnitSessionHandler htmlUnitSessionHandler, boolean expectReturn)
      throws IOException, BrowserChannelException {
    while (true) {
      ExceptionOrReturnValue returnValue;
      MessageType type = Message.readMessageType(getStreamFromOtherSide());
      logger.log(TreeLogger.INFO, "client: received " + type + ", thread: "
          + Thread.currentThread().getName());
      try {
        switch (type) {
          case INVOKE:
            InvokeOnClientMessage invokeMessage = InvokeOnClientMessage.receive(this);
            returnValue = htmlUnitSessionHandler.invoke(this,
                invokeMessage.getThis(), invokeMessage.getMethodName(),
                invokeMessage.getArgs());
            htmlUnitSessionHandler.sendFreeValues(this);
            new ReturnMessage(this, returnValue.isException(),
                returnValue.getReturnValue()).send();          
            break;
          case INVOKE_SPECIAL:
            InvokeSpecialMessage invokeSpecialMessage = InvokeSpecialMessage.receive(this);
            logger.log(TreeLogger.DEBUG, type + " message " + ", thisRef: "
                + invokeSpecialMessage.getArgs());
            returnValue = htmlUnitSessionHandler.invokeSpecial(this,
                invokeSpecialMessage.getDispatchId(),
                invokeSpecialMessage.getArgs());
            htmlUnitSessionHandler.sendFreeValues(this);
            new ReturnMessage(this, returnValue.isException(),
                returnValue.getReturnValue()).send();
            break;
          case FREE_VALUE:
            FreeMessage freeMessage = FreeMessage.receive(this);
            logger.log(TreeLogger.DEBUG, type + " message "
                + freeMessage.getIds());
View Full Code Here

Examples of com.google.gwt.dev.shell.BrowserChannel.SessionHandler.ExceptionOrReturnValue

            final FreeMessage freeMsg = FreeMessage.receive(this);
            handler.freeValue(this, freeMsg.getIds());
            break;
          case INVOKE:
            InvokeOnServerMessage imsg = InvokeOnServerMessage.receive(this);
            ExceptionOrReturnValue result = handler.invoke(this, imsg.getThis(),
                imsg.getMethodDispatchId(), imsg.getArgs());
            sendFreedValues();
            ReturnMessage.send(this, result);
            break;
          case INVOKE_SPECIAL:
View Full Code Here

Examples of com.google.gwt.dev.shell.BrowserChannel.SessionHandler.ExceptionOrReturnValue

            break;
          case RETURN:
            return ReturnMessage.receive(this);
          case INVOKE:
            InvokeOnServerMessage imsg = InvokeOnServerMessage.receive(this);
            ExceptionOrReturnValue result = handler.invoke(this, imsg.getThis(),
                imsg.getMethodDispatchId(), imsg.getArgs());
            sendFreedValues();
            ReturnMessage.send(this, result);
            break;
          case INVOKE_SPECIAL:
View Full Code Here

Examples of com.google.gwt.dev.shell.BrowserChannel.SessionHandler.ExceptionOrReturnValue

  private void handleInvokeSpecial(SessionHandler handler) throws IOException,
      BrowserChannelException {
    final InvokeSpecialMessage ismsg = InvokeSpecialMessage.receive(this);
    Value[] args = ismsg.getArgs();
    ExceptionOrReturnValue retExc = null;
    switch (ismsg.getDispatchId()) {
      case GetProperty:
        assert args.length == 2;
        retExc = handler.getProperty(this, args[0].getInt(), args[1].getInt());
        break;
View Full Code Here

Examples of com.google.gwt.dev.shell.BrowserChannel.SessionHandler.ExceptionOrReturnValue

      } catch (IOException e) {
        return DEFAULT_VALUE;
      }
      try {
        ReturnMessage returnMessage = ((BrowserChannelClient) channel).reactToMessagesWhileWaitingForReturn(sessionHandler);
        return new ExceptionOrReturnValue(returnMessage.isException(),
            returnMessage.getReturnValue());
      } catch (IOException e) {
        return DEFAULT_VALUE;
      } catch (BrowserChannelException e) {
        return DEFAULT_VALUE;
View Full Code Here

Examples of com.google.gwt.dev.shell.BrowserChannel.SessionHandler.ExceptionOrReturnValue

    Value thisValue = sessionData.getSessionHandler().makeValueFromJsval(cx,
        args[1]);
    int dispatchId = ((Number) args[0]).intValue();

    ExceptionOrReturnValue returnValue = getReturnFromJavaMethod(cx,
        sessionData.getSessionHandler(), sessionData.getChannel(), dispatchId,
        thisValue, valueArgs);
    /*
     * Return a object array ret. ret[0] is a boolean indicating whether an
     * exception was thrown or not. ret[1] is the exception or the return value.
     */
    Object ret[] = new Object[2];
    ret[0] = returnValue.isException();
    ret[1] = sessionData.getSessionHandler().makeJsvalFromValue(cx,
        returnValue.getReturnValue());
    return ret;
  }
View Full Code Here

Examples of com.google.gwt.dev.shell.BrowserChannel.SessionHandler.ExceptionOrReturnValue

  }

  private ReturnMessage reactToMessages(SessionHandlerClient handler,
      boolean expectReturn) throws IOException, BrowserChannelException {
    while (true) {
      ExceptionOrReturnValue returnValue;
      MessageType type = Message.readMessageType(getStreamFromOtherSide());
      if (logger.isLoggable(TreeLogger.INFO)) {
        logger.log(TreeLogger.INFO, "client: received " + type + ", thread: "
            + Thread.currentThread().getName());
      }
      try {
        switch (type) {
          case INVOKE:
            InvokeOnClientMessage invokeMessage = InvokeOnClientMessage.receive(this);
            returnValue = handler.invoke(this, invokeMessage.getThis(),
                invokeMessage.getMethodName(), invokeMessage.getArgs());
            new ReturnMessage(this, returnValue.isException(),
                returnValue.getReturnValue()).send();
            break;
          case FREE_VALUE:
            FreeMessage freeMessage = FreeMessage.receive(this);
            if (logger.isLoggable(TreeLogger.DEBUG)) {
              logger.log(TreeLogger.DEBUG,
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.