Package com.google.protobuf.MessageLite

Examples of com.google.protobuf.MessageLite.Builder.build()


    // Send and receive first
    Connection persistent = persistentFactory.createConnection();
    persistent.sendProtoMessage(MESSAGE2);
    Builder builder = Request.newBuilder();
    persistent.receiveProtoMessage(builder);
    assertEquals(MESSAGE1, builder.build());
    persistent.close();

    // Receive and send second
    persistent = persistentFactory.createConnection();
    builder = Request.newBuilder();
View Full Code Here


    // Receive and send second
    persistent = persistentFactory.createConnection();
    builder = Request.newBuilder();
    persistent.receiveProtoMessage(builder);
    assertEquals(MESSAGE2, builder.build());
    persistent.sendProtoMessage(MESSAGE1);
    persistent.close();

    // Send and receive third
    persistent = persistentFactory.createConnection();
View Full Code Here

    // Send and receive third
    persistent = persistentFactory.createConnection();
    persistent.sendProtoMessage(MESSAGE2);
    builder = Request.newBuilder();
    persistent.receiveProtoMessage(builder);
    assertEquals(MESSAGE1, builder.build());
    persistent.close();

    // Get 3 messages from output
    ByteArrayInputStream is = new ByteArrayInputStream(
        socket.getOutputBytes());
View Full Code Here

          connection.sendProtoMessage(MESSAGE2);
        } catch (IOException e) {
          failed.set(true);
          throw new RuntimeException(e);
        }
        assertEquals(MESSAGE1, builder.build());
      }
    }).start();
  }

  private class FakeConnection implements Connection {
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.