Added getResponseTimeout() to RemoteObject
This commit is contained in:
parent
d7b7f94c1e
commit
add5b96263
|
@ -48,6 +48,13 @@ interface RemoteObject {
|
|||
*/
|
||||
void setResponseTimeout(int timeoutMillis);
|
||||
|
||||
/**
|
||||
* Returns the ResponseTimeout, which is the the milliseconds to wait for a method to return a value. Default is 3000, 0 disables (waits forever)
|
||||
*
|
||||
* @return the number of milliseconds a method will wait for a response
|
||||
*/
|
||||
int getResponseTimeout();
|
||||
|
||||
/**
|
||||
* Sets the blocking behavior when invoking a remote method. Default is false (blocking)
|
||||
*
|
||||
|
|
|
@ -171,6 +171,9 @@ class RmiProxyHandler implements InvocationHandler {
|
|||
this.timeoutMillis = (Integer) args[0];
|
||||
return null;
|
||||
}
|
||||
else if (name.equals("getResponseTimeout")) {
|
||||
return this.timeoutMillis;
|
||||
}
|
||||
else if (name.equals("setAsync")) {
|
||||
this.isAsync = (Boolean) args[0];
|
||||
return null;
|
||||
|
|
Loading…
Reference in New Issue
Block a user