public class Request
extends java.lang.Object
implements java.io.Serializable
Constructor and Description |
---|
Request() |
Request(java.lang.String id,
java.lang.String method,
boolean async,
java.lang.Object[] params) |
Request(java.lang.String id,
java.lang.String method,
boolean async,
java.lang.Object[] params,
boolean multi) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getId() |
java.lang.String |
getMethod() |
java.lang.Object[] |
getParams() |
int |
getRetries() |
long |
getTimeout() |
int |
getWait() |
boolean |
isAsync() |
boolean |
isMulti() |
static Request |
newAsyncRequest(java.lang.String id,
java.lang.String method,
java.lang.Object[] params,
boolean multi)
This method creates a new asynchronous request
|
static Request |
newSyncRequest(java.lang.String id,
java.lang.String method,
java.lang.Object[] params)
This method creates a new synchronous request
|
static Request |
newSyncRequest(java.lang.String id,
java.lang.String method,
java.lang.Object[] params,
int retries,
long timeout,
boolean multi,
int wait)
This method creates a new synchronous request
|
void |
setAsync(boolean async) |
void |
setId(java.lang.String id) |
void |
setMethod(java.lang.String method) |
void |
setMulti(boolean multi) |
void |
setParams(java.lang.Object[] params) |
void |
setRetries(int retries) |
void |
setTimeout(long timeout) |
void |
setWait(int wait) |
public Request()
public Request(java.lang.String id, java.lang.String method, boolean async, java.lang.Object[] params)
public Request(java.lang.String id, java.lang.String method, boolean async, java.lang.Object[] params, boolean multi)
public static Request newSyncRequest(java.lang.String id, java.lang.String method, java.lang.Object[] params)
id
- - correlation id of this invocationmethod
- - method name wanted to callparams
- - parameters of this methodpublic static Request newSyncRequest(java.lang.String id, java.lang.String method, java.lang.Object[] params, int retries, long timeout, boolean multi, int wait)
id
- - correlation id of this invocationmethod
- - method name wanted to callparams
- - parameters of this methodretries
- - How many retries will be donetimeout
- - Timeout for every retrymulti
- - If the method is multiwait
- - If the method is multi how many responses will be listenedpublic static Request newAsyncRequest(java.lang.String id, java.lang.String method, java.lang.Object[] params, boolean multi)
id
- - correlation id of this invocationmethod
- - method name wanted to callparams
- - parameters of this methodmulti
- - If the method is multipublic java.lang.String getId()
public void setId(java.lang.String id)
public java.lang.String getMethod()
public void setMethod(java.lang.String method)
public java.lang.Object[] getParams()
public void setParams(java.lang.Object[] params)
public boolean isAsync()
public void setAsync(boolean async)
public long getTimeout()
public void setTimeout(long timeout)
public int getRetries()
public void setRetries(int retries)
public boolean isMulti()
public void setMulti(boolean multi)
public int getWait()
public void setWait(int wait)