Package com.linkedin.r2.sample.echo

Examples of com.linkedin.r2.sample.echo.EchoService.echo()


  {
    final EchoService client = getEchoClient(_client, Bootstrap.getEchoURI());

    final String msg = "This is a simple echo message";
    final FutureCallback<String> callback = new FutureCallback<String>();
    client.echo(msg, callback);

    Assert.assertEquals(callback.get(), msg);
  }

  @Test
View Full Code Here


  {
    final EchoService client = getEchoClient(_client, URI.create("/unknown-service"));

    final String msg = "This is a simple echo message";
    final FutureCallback<String> callback = new FutureCallback<String>();
    client.echo(msg, callback);

    try
    {
      callback.get();
      Assert.fail("Should have thrown an exception");
View Full Code Here

      return;
    }

    final String msg = "This is a simple echo message";
    final FutureCallback<String> callback = new FutureCallback<String>();
    client.echo(msg, callback);

    try
    {
      callback.get();
      Assert.fail("Should have thrown an exception");
View Full Code Here

  {
    final EchoService client = getEchoClient(_client, Bootstrap.getThrowingEchoURI());

    final String msg = "This is a simple echo message";
    final FutureCallback<String> callback = new FutureCallback<String>();
    client.echo(msg, callback);

    try
    {
      callback.get();
      Assert.fail("Should have thrown an exception");
View Full Code Here

  {
    final EchoService client = getEchoClient(_client, Bootstrap.getOnExceptionEchoURI());

    final String msg = "This is a simple echo message";
    final FutureCallback<String> callback = new FutureCallback<String>();
    client.echo(msg, callback);

    try
    {
      callback.get();
      Assert.fail("Should have thrown an exception");
View Full Code Here

    final EchoService client = getEchoClient(_client, Bootstrap.getEchoURI());

    final String msg = "This is a simple echo message";
    final FutureCallback<String> callback = new FutureCallback<String>();

    client.echo(msg, callback);
    callback.get();

    // Make sure the server got its wire attribute
    Assert.assertEquals(_serverCaptureFilter.getRequest().get(_toServerKey), _toServerValue);
View Full Code Here

    final EchoService client = getEchoClient(_client, URI.create("/unknown-service"));

    final String msg = "This is a simple echo message";
    final FutureCallback<String> callback = new FutureCallback<String>();

    client.echo(msg, callback);
    try
    {
      callback.get();
      Assert.fail("Should have thrown an exception");
    }
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.