com.koushikdutta.async.http
Class JSONObjectBody

java.lang.Object
  extended by com.koushikdutta.async.http.JSONObjectBody
All Implemented Interfaces:
AsyncHttpRequestBody<JSONObject>

public class JSONObjectBody
extends java.lang.Object
implements AsyncHttpRequestBody<JSONObject>


Field Summary
static java.lang.String CONTENT_TYPE
           
 
Constructor Summary
JSONObjectBody()
           
JSONObjectBody(JSONObject json)
           
 
Method Summary
 JSONObject get()
           
 java.lang.String getContentType()
           
 int length()
           
 void parse(DataEmitter emitter, CompletedCallback completed)
           
 boolean readFullyOnRequest()
           
 void write(AsyncHttpRequest request, AsyncHttpResponse sink)
           
 
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 java.lang.String CONTENT_TYPE
See Also:
Constant Field Values
Constructor Detail

JSONObjectBody

public JSONObjectBody()

JSONObjectBody

public JSONObjectBody(JSONObject json)
Method Detail

parse

public void parse(DataEmitter emitter,
                  CompletedCallback completed)
Specified by:
parse in interface AsyncHttpRequestBody<JSONObject>

write

public void write(AsyncHttpRequest request,
                  AsyncHttpResponse sink)
Specified by:
write in interface AsyncHttpRequestBody<JSONObject>

getContentType

public java.lang.String getContentType()
Specified by:
getContentType in interface AsyncHttpRequestBody<JSONObject>

readFullyOnRequest

public boolean readFullyOnRequest()
Specified by:
readFullyOnRequest in interface AsyncHttpRequestBody<JSONObject>

length

public int length()
Specified by:
length in interface AsyncHttpRequestBody<JSONObject>

get

public JSONObject get()
Specified by:
get in interface AsyncHttpRequestBody<JSONObject>