Examples of RestResponseBuilder


Examples of com.linkedin.r2.message.rest.RestResponseBuilder

  /**
   * @return {@link RestResponse} based on this exception
   */
  public RestResponse buildRestResponse()
  {
    RestResponseBuilder builder = new RestResponseBuilder().setStatus(_status);
    if (getMessage() != null)
    {
      builder.setEntity(ByteString.copyString(getMessage(), Charset.defaultCharset()));
    }

    return builder.build();
  }
View Full Code Here

Examples of com.linkedin.r2.message.rest.RestResponseBuilder

  }

  @Test
  public void testEmptyErrorResponse()
  {
    RestResponse response = new RestResponseBuilder().setStatus(200).build();
    RestLiResponseException e = new RestLiResponseException(response, null, new ErrorResponse());

    Assert.assertNull(e.getServiceErrorMessage());
    Assert.assertNull(e.getErrorDetails());
    Assert.assertNull(e.getErrorSource());
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.