Examples of prepareToRead()


Examples of com.google.gwt.rpc.server.CommandServerSerializationStreamReader.prepareToRead()

      throw new IncompatibleRemoteServiceException(
          "Client does not have a type sent by the server", e);
    }
    CommandServerSerializationStreamReader reader = new CommandServerSerializationStreamReader();
    if (decoder.getThrownValue() != null) {
      reader.prepareToRead(Collections.singletonList(decoder.getThrownValue()));
      try {
        throw new RemoteException((Throwable) reader.readObject());
      } catch (ClassCastException e) {
        throw new RemoteException(
            "The remote end threw something other than a Throwable", e);
View Full Code Here

Examples of com.google.gwt.rpc.server.CommandServerSerializationStreamReader.prepareToRead()

        throw new RemoteException(
            "The remote end threw an exception which could not be deserialized",
            e);
      }
    } else {
      reader.prepareToRead(decoder.getValues());
    }
    return reader;
  }

  public static SerializationStreamWriter createWriter(
View Full Code Here

Examples of com.google.gwt.rpc.server.CommandServerSerializationStreamReader.prepareToRead()

      throw new IncompatibleRemoteServiceException(
          "Client does not have a type sent by the server", e);
    }
    CommandServerSerializationStreamReader reader = new CommandServerSerializationStreamReader();
    if (decoder.getThrownValue() != null) {
      reader.prepareToRead(Collections.singletonList(decoder.getThrownValue()));
      try {
        throw new RemoteException((Throwable) reader.readObject());
      } catch (ClassCastException e) {
        throw new RemoteException(
            "The remote end threw something other than a Throwable", e);
View Full Code Here

Examples of com.google.gwt.rpc.server.CommandServerSerializationStreamReader.prepareToRead()

        throw new RemoteException(
            "The remote end threw an exception which could not be deserialized",
            e);
      }
    } else {
      reader.prepareToRead(decoder.getValues());
    }
    return reader;
  }

  @SuppressWarnings("unused") // used by super-source peer
View Full Code Here

Examples of com.google.gwt.user.client.rpc.impl.ClientSerializationStreamReader.prepareToRead()

  public <T extends Serializable> T parse(String message) throws SerializationException {
    if (getMode() == SerialMode.RPC) {
      try {
        Serializer serializer = getSerializer();
        ClientSerializationStreamReader reader = new ClientSerializationStreamReader(serializer);
        reader.prepareToRead(message);
        return (T) reader.readObject();
      }
      catch (RuntimeException e) {
        throw new SerializationException(e);
      }
View Full Code Here

Examples of com.google.gwt.user.client.rpc.impl.ClientSerializationStreamReader.prepareToRead()

        List<Object> objects = new ArrayList<Object>(messages.size());
        for (String message : messages) {
            try {
                Serializer serializer = getRPCSerializer();
                ClientSerializationStreamReader reader = new ClientSerializationStreamReader(serializer);
                reader.prepareToRead(message);
                objects.add(reader.readObject());
            } catch (RuntimeException e) {
                throw new SerializationException(e);
            }
        }
View Full Code Here

Examples of com.google.gwt.user.client.rpc.impl.ClientSerializationStreamReader.prepareToRead()

        if (encoded.startsWith("//OK") || encoded.startsWith("//EX")) {
            encoded = encoded.substring(4);
        }

        clientSerializationStreamReader.prepareToRead(encoded);
        return clientSerializationStreamReader;
    }

    /**
     * Creates an object stream writer.
View Full Code Here

Examples of com.google.gwt.user.client.rpc.impl.ClientSerializationStreamReader.prepareToRead()

  public <T extends Serializable> T parse(String message) throws SerializationException {
    if (getMode() == SerialMode.RPC) {
      try {
        Serializer serializer = getSerializer();
        ClientSerializationStreamReader reader = new ClientSerializationStreamReader(serializer);
        reader.prepareToRead(message);
        return (T) reader.readObject();
      }
      catch (RuntimeException e) {
        throw new SerializationException(e);
      }
View Full Code Here

Examples of com.google.gwt.user.client.rpc.impl.ClientSerializationStreamReader.prepareToRead()

    final HasSerializer serializerHost = (HasSerializer) proxy;
    final Serializer serializer = serializerHost.getSerializer();

    final ClientSerializationStreamReader deserializer = new ClientSerializationStreamReader(serializer);
    deserializer.prepareToRead(serializedForm);
    return deserializer;
  }

  protected void throwRocketJarClasspathProblem() {
    throw new CometException(
View Full Code Here

Examples of com.google.gwt.user.client.rpc.impl.ClientSerializationStreamReader.prepareToRead()

    final long start = System.currentTimeMillis();
    Tree reconstituted = null;

    for (int i = 0; i < iterations; i++) {
      final ClientSerializationStreamReader reader = new ClientSerializationStreamReader(serializer);
      reader.prepareToRead(serverEncodedResponse);
      reconstituted = (Tree) reader.readObject();
    }
    final long end = System.currentTimeMillis();

    assertEquals("comparing original and reconsituted", tree, reconstituted);
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.