AeroGear Android Library 1.1.0

org.jboss.aerogear.android.impl.pipeline
Class GsonRequestBuilder<T>

java.lang.Object
  extended by org.jboss.aerogear.android.impl.pipeline.GsonRequestBuilder<T>
All Implemented Interfaces:
RequestBuilder<T>

public class GsonRequestBuilder<T>
extends Object
implements RequestBuilder<T>


Field Summary
static String CONTENT_TYPE
           
 
Constructor Summary
GsonRequestBuilder()
           
GsonRequestBuilder(com.google.gson.Gson gson)
           
 
Method Summary
 byte[] getBody(T data)
          This method creates the body of a request for a Pipe to use.
 String getContentType()
           
 com.google.gson.Gson getGson()
          Deprecated. This method exists to support another deprecated method while we transition off of it. PipeConfig.setGsonBuilder(com.google.gson.GsonBuilder)
 void setGson(com.google.gson.Gson gson)
          Deprecated. This method exists to support another deprecated method while we transition off of it. PipeConfig.setGsonBuilder(com.google.gson.GsonBuilder)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONTENT_TYPE

public static final String CONTENT_TYPE
See Also:
Constant Field Values
Constructor Detail

GsonRequestBuilder

public GsonRequestBuilder()

GsonRequestBuilder

public GsonRequestBuilder(com.google.gson.Gson gson)
Method Detail

getBody

public byte[] getBody(T data)
Description copied from interface: RequestBuilder
This method creates the body of a request for a Pipe to use. This is basically a serialization style operation.

Specified by:
getBody in interface RequestBuilder<T>
Parameters:
data - an object to form a body out of.
Returns:
A request body which represents the data parameter

getGson

@Deprecated
public com.google.gson.Gson getGson()
Deprecated. This method exists to support another deprecated method while we transition off of it. PipeConfig.setGsonBuilder(com.google.gson.GsonBuilder)


setGson

@Deprecated
public void setGson(com.google.gson.Gson gson)
Deprecated. This method exists to support another deprecated method while we transition off of it. PipeConfig.setGsonBuilder(com.google.gson.GsonBuilder)


getContentType

public String getContentType()
Specified by:
getContentType in interface RequestBuilder<T>
Returns:
the Content-Type header to be sent to the server.

AeroGear Android Library 1.1.0

Copyright © 2013 JBoss by Red Hat. All Rights Reserved.