Voyager ORB

com.objectspace.voyager.message
Class Future

java.lang.Object
  |
  +--com.objectspace.voyager.message.Future

public class Future
extends java.lang.Object
implements java.lang.Runnable

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.

Version:
3.0
See Also:
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

invoke

public 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.
Parameters:
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.

invoke

public 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.
Parameters:
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.

invoke

public 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.
Parameters:
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.

invoke

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)
Spawn a thread to invoke a static method on the specified class and immediately return a Result placeholder.
Parameters:
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.

(c) Copyright 1997-1999 ObjectSpace, Inc.
14850 Quorum Drive, Suite 500
Dallas, Texas 75240