Package com.google.gwt.dev.shell.BrowserChannel

Examples of com.google.gwt.dev.shell.BrowserChannel.ReturnMessage


    synchronized (handler.getHtmlPage()) {
      try {
        new InvokeSpecialMessage(channel, SpecialDispatchId.GetProperty, args).send();
        // TODO: refactor in order to remove cast.
        ReturnMessage returnMessage = ((BrowserChannelClient) channel).reactToMessagesWhileWaitingForReturn(handler);
        if (!returnMessage.isException()) {
          return returnMessage.getReturnValue();
        }
      } catch (IOException e) {
      } catch (BrowserChannelException e) {
      }
    }
View Full Code Here


    args[1].setInt(dispatchId);
    args[2] = value;
    synchronized (handler.getHtmlPage()) {
      try {
        new InvokeSpecialMessage(channel, SpecialDispatchId.SetProperty, args).send();
        ReturnMessage returnMessage = ((BrowserChannelClient) channel).reactToMessagesWhileWaitingForReturn(handler);
        if (!returnMessage.isException()) {
          return true;
        }
      } catch (IOException e) {
      } catch (BrowserChannelException e) {
      }
View Full Code Here

        new InvokeOnServerMessage(channel, dispatchId, thisValue, valueArgs).send();
      } 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

  public void testReturnMessage() throws IOException,
      BrowserChannelException {
    Value val = new Value();
    val.setInt(42);
    new ReturnMessage(channel, false, val).send();
    MessageType type = channel.readMessageType();
    assertEquals(MessageType.RETURN, type);
    ReturnMessage message = ReturnMessage.receive(channel);
    assertFalse(message.isException());
    Value valRecv = message.getReturnValue();
    assertEquals(ValueType.INT, valRecv.getType());
    assertEquals(42, valRecv.getInt());
  }
View Full Code Here

    args[1].setInt(dispatchId);

    synchronized (handler.getSynchronizationObject()) {
      try {
        new InvokeSpecialMessage(channel, SpecialDispatchId.GetProperty, args).send();
        ReturnMessage returnMessage = channel.reactToMessagesWhileWaitingForReturn(handler);
        if (!returnMessage.isException()) {
          return returnMessage.getReturnValue();
        }
      } catch (IOException e) {
      } catch (BrowserChannelException e) {
      }
    }
View Full Code Here

    args[1].setInt(dispatchId);
    args[2] = value;
    synchronized (handler.getSynchronizationObject()) {
      try {
        new InvokeSpecialMessage(channel, SpecialDispatchId.SetProperty, args).send();
        ReturnMessage returnMessage = channel.reactToMessagesWhileWaitingForReturn(handler);
        if (!returnMessage.isException()) {
          return true;
        }
      } catch (IOException e) {
      } catch (BrowserChannelException e) {
      }
View Full Code Here

        new InvokeOnServerMessage(channel, dispatchId, thisValue, valueArgs).send();
      } catch (IOException e) {
        return DEFAULT_VALUE;
      }
      try {
        ReturnMessage returnMessage = 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

TOP

Related Classes of com.google.gwt.dev.shell.BrowserChannel.ReturnMessage

Copyright © 2018 www.massapicom. 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.