Package com.google.collide.dtogen.shared

Examples of com.google.collide.dtogen.shared.ServerToClientDto


   *        generally be one or more of of the constants declared in
   *        {@link RoutingTypes}.
   */
  @SuppressWarnings("unchecked")
  public static <T> T parseAsDto(String payload, int... types) {
    ServerToClientDto responseData = (ServerToClientDto) Jso.deserialize(payload);
    for (int type : types) {
      if (responseData.getType() == type) {
        return (T) responseData;
      }
    }
    throw new IllegalArgumentException("Unexpected dto type " + responseData.getType());
  }
View Full Code Here


                  RESP emptyMessage = (RESP) EmptyMessageImpl.make();
                  callback.onMessageReceived(emptyMessage);
                }
                return;
              }
              ServerToClientDto responseData =
                  (ServerToClientDto) Jso.deserialize(response.getText());
              String action = "?";
              try {
                if (callback != null) {
                  action = "invoking callback";
View Full Code Here

            ServerErrorImpl serverError = (ServerErrorImpl) jso;
            callback.onFail(serverError.getFailureReason());
            return;
          }

          ServerToClientDto messageDto = (ServerToClientDto) jso;

          @SuppressWarnings("unchecked")
          RESP resp = (RESP) messageDto;
          callback.onMessageReceived(resp);
        }
View Full Code Here

TOP

Related Classes of com.google.collide.dtogen.shared.ServerToClientDto

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.