|
Voyager ORB | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.objectspace.voyager.message.Future
A Future message spawns a new thread to invoke a method and immediately returns a Result object as a placeholder for the result.
If the target object is remote, a serialized copy of the result is returned by default. If the remote result implements IRemote, a proxy to the result is returned instead.
If a Future is constructed with returnProxy == true, a proxy to the result is returned, even if the target object is local.
An optional timeout value may be specified.
Result
Method Summary | |
static Result |
invoke(java.lang.Object object,
java.lang.String signature,
java.lang.Object[] args)
Spawn a thread to invoke a method on the specified object and immediately return a Result placeholder. |
static Result |
invoke(java.lang.Object object,
java.lang.String signature,
java.lang.Object[] args,
boolean returnProxy,
long timeout,
ResultListener[] listeners)
Spawn a thread to invoke a method on the specified object and immediately return a Result placeholder. |
static Result |
invoke(java.lang.String classname,
java.lang.String signature,
java.lang.Object[] args,
java.lang.String url)
Spawn a thread to invoke a static method on the specified class and immediately return a Result placeholder. |
static Result |
invoke(java.lang.String classname,
java.lang.String signature,
java.lang.Object[] args,
java.lang.String url,
boolean returnProxy,
long timeout,
ResultListener[] listeners)
Spawn a thread to invoke a static method on the specified class and immediately return a Result placeholder. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Method Detail |
public static Result invoke(java.lang.Object object, java.lang.String signature, java.lang.Object[] args)
object
- The destination object, which can be a regular Java reference or a proxy.signature
- The simple name or the full method signature.args
- Either null (no arguments) or an array of arguments with primitives wrapped in their object equivalents.public static Result invoke(java.lang.Object object, java.lang.String signature, java.lang.Object[] args, boolean returnProxy, long timeout, ResultListener[] listeners)
object
- The destination object, which can be a regular Java reference or a proxy.signature
- The simple name or the full method signature.args
- Either null (no arguments) or an array of arguments with primitives wrapped in their object equivalents.returnProxy
- If true, return a proxy to the result.timeout
- The timeout in milliseconds, zero means no timeout.listeners
- An array of listeners to notify when the reply is received by the Result.public static Result invoke(java.lang.String classname, java.lang.String signature, java.lang.Object[] args, java.lang.String url)
classname
- The full name of the destination class.signature
- The simple name or the full method signature.args
- Either null (no arguments) or an array of arguments with primitives wrapped in their object equivalents.url
- The URL of the remote VM.public static Result invoke(java.lang.String classname, java.lang.String signature, java.lang.Object[] args, java.lang.String url, boolean returnProxy, long timeout, ResultListener[] listeners)
classname
- The full name of the destination class.signature
- The simple name or the full method signature.args
- Either null (no arguments) or an array of arguments with primitives wrapped in their object equivalents.url
- The URL of the remote VM.returnProxy
- If true, return a proxy to the result.timeout
- The timeout in milliseconds, zero means no timeout.listeners
- An array of listeners to notify when the reply is received by the Result.
|
ObjectSpace Inc. | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |