Voyager ORB

com.objectspace.voyager.message
Class Sync

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

public class Sync
extends java.lang.Object

A Sync message invokes a method, waits for the reply, and then returns a Result object that holds the reply.

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 Sync is constructed with returnProxy == true, a proxy to the result is returned, even if the target object is local.

Version:
3.0

Method Summary
static Result invoke(java.lang.Object object, java.lang.String signature, java.lang.Object[] args)
          Invoke a method on the specified object and then return the reply wrapped in a Result.
static Result invoke(java.lang.Object object, java.lang.String signature, java.lang.Object[] args, boolean returnProxy)
          Invoke a method on the specified object and then return the reply wrapped in a Result.
static Result invoke(java.lang.String classname, java.lang.String signature, java.lang.Object[] args, java.lang.String url)
          Invoke a static method on the specified class and then return the reply wrapped in a Result.
static Result invoke(java.lang.String classname, java.lang.String signature, java.lang.Object[] args, java.lang.String url, boolean returnProxy)
          Invoke a static method on the specified class and then return the reply wrapped in a Result.
 
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)
Invoke a method on the specified object and then return the reply wrapped in a Result.
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)
Invoke a method on the specified object and then return the reply wrapped in a Result.
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.

invoke

public static Result invoke(java.lang.String classname,
                            java.lang.String signature,
                            java.lang.Object[] args,
                            java.lang.String url)
Invoke a static method on the specified class and then return the reply wrapped in a Result.
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)
Invoke a static method on the specified class and then return the reply wrapped in a Result.
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.

ObjectSpace Inc.

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