public class ECHOQuery
extends java.lang.Object
| 修飾子とタイプ | メソッドと説明 |
|---|---|
static JSONObject |
deleteRequest(java.lang.String path)
Sends a DELETE request
|
static <T extends ECHODataObject<T>> |
doFind(boolean sync,
java.lang.String listKey,
java.lang.String resourceType,
FindCallback<T> callback,
java.lang.String instanceId,
JSONObject fParams,
ECHODataObjectFactory<T> factory)
Does Find objects from the remote server.
|
static JSONObject |
getRequest(java.lang.String path)
Sends a GET request.
|
static JSONObject |
getRequest(java.lang.String path,
JSONObject query)
Sends a GET request with optional request parameters.
|
static JSONObject |
multipartPostRequest(java.lang.String path,
JSONObject data)
Sends a multipart POST request.
|
static JSONObject |
multipartPutRequest(java.lang.String path,
JSONObject data)
Sends a multipart PUT request.
|
static JSONObject |
postRequest(java.lang.String path,
JSONObject data)
Sends a POST request.
|
static JSONObject |
putRequest(java.lang.String path,
JSONObject data)
Sends a PUT request.
|
static JSONObject |
request(java.lang.String path,
java.lang.String httpMethod)
Sends a HTTP request.
|
static JSONObject |
request(java.lang.String path,
java.lang.String httpMethod,
JSONObject data)
Sends a HTTP request.
|
static JSONObject |
request(java.lang.String path,
java.lang.String httpMethod,
JSONObject data,
boolean multipart)
Sends a HTTP request with optional request contents/parameters.
|
static java.io.InputStream |
requestRaw(java.lang.String path,
java.lang.String httpMethod,
JSONObject data,
boolean multipart)
Sends a HTTP request with optional request contents/parameters.
|
public static <T extends ECHODataObject<T>> ECHOList<T> doFind(boolean sync, java.lang.String listKey, java.lang.String resourceType, FindCallback<T> callback, java.lang.String instanceId, JSONObject fParams, ECHODataObjectFactory<T> factory) throws ECHOException
sync - : if set TRUE, then the main (UI) thread is waited for complete the finding in a background thread.
(a synchronous communication)listKey - the key associated with the object listclazz - the object classcallback - invoked after the finding is completedinstanceId - the reference ID of the finding target instanceresourceType - the type of this objectparams - to control the output objectsECHOExceptionpublic static JSONObject getRequest(java.lang.String path)
throws ECHOException
path - a request url pathECHOExceptionpublic static JSONObject getRequest(java.lang.String path,
JSONObject query)
throws ECHOException
path - a request url pathquery - optional request parametersECHOExceptionpublic static JSONObject postRequest(java.lang.String path,
JSONObject data)
throws ECHOException
path - a request url pathdata - request contentsECHOExceptionpublic static JSONObject multipartPostRequest(java.lang.String path,
JSONObject data)
throws ECHOException
path - a request url pathdata - request contentsECHOExceptionpublic static JSONObject putRequest(java.lang.String path,
JSONObject data)
throws ECHOException
path - a request url pathdata - request contentsECHOExceptionpublic static JSONObject multipartPutRequest(java.lang.String path,
JSONObject data)
throws ECHOException
path - a request url pathdata - request contentsECHOExceptionpublic static JSONObject deleteRequest(java.lang.String path)
throws ECHOException
path - a request url pathECHOExceptionpublic static JSONObject request(java.lang.String path,
java.lang.String httpMethod)
throws ECHOException
path - a request url pathhttpMethod - a request method (GET/POST/PUT/DELETE)ECHOExceptionpublic static JSONObject request(java.lang.String path,
java.lang.String httpMethod,
JSONObject data)
throws ECHOException
path - a request url pathhttpMethod - a request method (GET/POST/PUT/DELETE)data - request contents/parametersECHOExceptionpublic static JSONObject request(java.lang.String path,
java.lang.String httpMethod,
JSONObject data,
boolean multipart)
throws ECHOException
path - a request url pathhttpMethod - a request method (GET/POST/PUT/DELETE)data - request contents/parametersmultipart - use multipart/form-data to encode the contentsECHOExceptionpublic static java.io.InputStream requestRaw(java.lang.String path,
java.lang.String httpMethod,
JSONObject data,
boolean multipart)
throws ECHOException
path - a request url pathhttpMethod - a request method (GET/POST/PUT/DELETE)data - request contents/parametersmultipart - use multipart/form-data to encode the contentsECHOException