Package rocket.serialization.client

Examples of rocket.serialization.client.ObjectInputStream.readObject()


    Object result = null;
    boolean exceptionWasThrown = false;
    Method method = null;

    // read in the interface...
    final String interfaceName = (String) inputStream.readObject();
    final Class interfacee = this.getRequestedInterface(interfaceName);

    // verify the serviceProvider actually implements $interface
    this.checkServiceProvider(interfacee, serviceProvider);
View Full Code Here


    // verify the serviceProvider actually implements $interface
    this.checkServiceProvider(interfacee, serviceProvider);

    // the method name...
    final String methodName = (String) inputStream.readObject();

    // the parameter types...
    final int parameterCount = inputStream.readInt();
    final String[] parameterTypes = new String[parameterCount];
    for (int i = 0; i < parameterTypes.length; i++) {
View Full Code Here

    // the parameter types...
    final int parameterCount = inputStream.readInt();
    final String[] parameterTypes = new String[parameterCount];
    for (int i = 0; i < parameterTypes.length; i++) {
      parameterTypes[i] = (String) inputStream.readObject();
    }

    // attempt to find a method on the given interface that matches the
    // method signature...
    method = this.getMethod(serviceProvider.getClass(), methodName, parameterTypes);
View Full Code Here

    method = this.getMethod(serviceProvider.getClass(), methodName, parameterTypes);

    // deserialize parameters...
    final Object[] parameters = new Object[parameterCount];
    for (int i = 0; i < parameterCount; i++) {
      parameters[i] = inputStream.readObject();
    }

    // any exceptions that are thrown will be serialized and included in the
    // response...
    try {
View Full Code Here

    final long start = System.currentTimeMillis();

    for (int i = 0; i < iterations; i++) {
      final ObjectInputStream objectInputStream = factory.createObjectInputStream(serializedForm);
      reconstituted = (Tree) objectInputStream.readObject();
    }
    final long end = System.currentTimeMillis();
    assertEquals("comparing original and reconsituted", tree, reconstituted);

    log(ROCKET, "End of timing.");
View Full Code Here

    final String stream = this.getRocketStream();
    final long start = System.currentTimeMillis();

    for (int i = 0; i < iterations; i++) {
      final ObjectInputStream objectInputStream = factory.createObjectInputStream(stream);
      reconstituted = objectInputStream.readObject();
    }
    final long end = System.currentTimeMillis();

    log(ROCKET, "End of timing.");
    logBenchmark(ROCKET, DESERIALIZATION, iterations, start, end);
View Full Code Here

      try {
        final SerializationFactory serializationFactory = this.getSerializationFactory();
        final String stream = response.getText();
        final ObjectInputStream objectInputStream = serializationFactory.createObjectInputStream(stream);
        final boolean exceptionWasThrown = objectInputStream.readBoolean();
        final Object result = objectInputStream.readObject();

        if (exceptionWasThrown) {
          callback.onFailure((Throwable) result);
          break;
        }
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.