Package com.google.greaze.definition.webservice

Examples of com.google.greaze.definition.webservice.ResponseBodyGsonTypeAdapterFactory


    ResponseBody responseBody = new ResponseBody.Builder(bodySpec)
      .setListBody(results)
      .build();
    WebServiceResponse response = new WebServiceResponse(responseHeaders, responseBody);
    Gson gson = gsonBuilder.get()
        .registerTypeAdapterFactory(new ResponseBodyGsonTypeAdapterFactory(bodySpec))
        .create();
    ResponseSender responseSender = new ResponseSender(gson);
    responseSender.send(res, response);
  }
View Full Code Here


    GsonBuilder gsonBuilder = injector.getInstance(GsonBuilder.class);
    RequestReceiver requestReceiver = new RequestReceiver(gsonBuilder, requestSpec);
    WebServiceRequest webServiceRequest = requestReceiver.receive(req);

    Gson gson = injector.getInstance(GsonBuilder.class)
        .registerTypeAdapterFactory(new ResponseBodyGsonTypeAdapterFactory(responseSpec.getBodySpec()))
        .create();
    ResponseSender responseSender = new ResponseSender(gson);
    WebServiceResponse response = buildResponse(responseSpec, webServiceRequest);
    responseSender.send(res, response);
  }
View Full Code Here

TOP

Related Classes of com.google.greaze.definition.webservice.ResponseBodyGsonTypeAdapterFactory

Copyright © 2018 www.massapicom. 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.