edu.ucdavis.rj.VM
Class Create

java.lang.Object
  extended by edu.ucdavis.rj.VM.Create

public class Create
extends java.lang.Object

Methods for creating RJ virtual machines and RJ remote objects. (These interface to VM and rjvm, without exposing those details to the user.)


Method Summary
static RemoteRefs createInstance(java.lang.String cls, java.lang.Object... args)
          A common case of remote object creation: create a new remote object on the same host.
static RemoteRefs createInstance(VM vm, java.lang.String cls, java.lang.Object... args)
          The general case of VM creation: create a new VM on the specified host.
static VM createVM()
          A common case of VM creation: create a new VM on the same host.
static VM createVM(java.lang.String onHost)
          The general case of VM creation: create a new VM on the specified host.
static VM getThisVM()
          Equivalent to JR's vm.thisvm.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createVM

public static VM createVM()
A common case of VM creation: create a new VM on the same host. In JR, e.g., new vm();. Invokes createVM(String) on createVM(name) where name is the name of the host on which createVM is executed.


createVM

public static VM createVM(java.lang.String onHost)
The general case of VM creation: create a new VM on the specified host. In JR, e.g., new vm() on "pc17";.

Parameters:
onHost - the name of the host on which to create the new VM.

createInstance

public static RemoteRefs createInstance(java.lang.String cls,
                                        java.lang.Object... args)
A common case of remote object creation: create a new remote object on the same host. In JR, e.g., new remote X(args);. Invokes createInstance(VM,String,Object...) on createInstance(name,cls,args) where name is the name of the host on which createInstance is executed.


createInstance

public static RemoteRefs createInstance(VM vm,
                                        java.lang.String cls,
                                        java.lang.Object... args)
The general case of VM creation: create a new VM on the specified host. In JR, e.g., new remote X(args) on "pc17";.

Parameters:
vm - the host on which to create the new instance.
cls - the name of class to instantiate. (N.B., the name is a String.)
args - the arguments to cls's constructor

getThisVM

public static VM getThisVM()
Equivalent to JR's vm.thisvm.

Returns:
The current VM.