com.viaoa.remote.rest.info.OARestInvokeInfo Maven / Gradle / Ivy
Show all versions of oa-core Show documentation
package com.viaoa.remote.rest.info;
import java.util.HashMap;
/**
* Runtime information for the proxy method invoke, that uses HTTP+REST to complete the task.
*
* This info has http and lower level details.
* For access this info when a method is called, a method can can include an OARestInvokeInfo for one of the method params, or for it's
* return value.
*
*
* @author vvia
*/
public class OARestInvokeInfo {
/**
* MethodInfo for this invoke.
*/
public OARestMethodInfo methodInfo;
/**
* Arguments from method that was invoked.
*/
public Object[] args;
/**
* Milisecond (timestamp) for start, http msg sent, and end.
*/
public long tsStart, tsSent, tsEnd;
/**
* HTTP method used, ex: GET, POST, etc
*/
public String httpMethod;
/**
* HTTP url path. Note: does not have to have baseUrl, or method.contextName
*/
public String urlPath;
/**
* HTTP url query.
*/
public String urlQuery;
/**
* Final http url used to connect to server.
* Created using value from urlPath & urlQuery in the format: "protocol://host[:port][/oarest|contextname]/urlPath?urlQuery"
*/
public String finalUrl;
/**
* Json object (text) for http request body
*
* Depends on methodType:
* OASearch: search param(s), if any used
* OAObjectMethodCall: JSON array, params that are annotated with MethodCallArg
* OARemote: JSON array, params that are annotated with MethodCallArg
* params that are annotated with BodyObject, BodyJson
*/
public String jsonBody;
public String contentType;
public String textBody;
/**
* Uses http content type
* Used for params annotated as FormNameValue.
*/
public String formData;
public byte[] byteArrayBody;
public HashMap hsHeaderOut = new HashMap();
public HashMap hsCookieOut = new HashMap();
// note: headers with multiple values are comma seperated
public HashMap hsHeaderIn = new HashMap();
public Class methodReturnClass;
public int responseCode;
public String responseCodeMessage;
public String responseBody;
public Exception responseException;
public Object returnObject;
public OARestInvokeInfo() {
}
}