edu.ucdavis.rj.VM
Class rjvm
java.lang.Object
java.rmi.server.RemoteObject
java.rmi.server.RemoteServer
java.rmi.server.UnicastRemoteObject
edu.ucdavis.rj.VM.rjvm
- All Implemented Interfaces:
- rjvm_intf, java.io.Serializable, java.rmi.Remote
public class rjvm
- extends java.rmi.server.UnicastRemoteObject
- implements rjvm_intf
- See Also:
- Serialized Form
Fields inherited from class java.rmi.server.RemoteObject |
ref |
Constructor Summary |
protected |
rjvm(java.lang.String name,
java.lang.String host)
|
Method Summary |
static void |
ariseAndReceive()
|
TerminationData |
checkIdle()
|
protected static TerminationData |
checkLocalIdle()
|
private void |
checkPing()
|
static RemoteRefs |
createInstance(rjvm_intf vm,
java.lang.String cls,
java.lang.Class[] types,
java.lang.Object[] args)
|
static java.lang.Object |
createInstance(rjvm_intf vm,
java.lang.String cls,
java.lang.Class[] types,
java.lang.Object[] args,
java.lang.String binclass)
|
static VM |
createVM(java.lang.String onHost,
java.lang.String fromHost)
|
static VM |
createVM(java.lang.String onHost,
java.lang.String fromHost,
java.lang.String cls,
java.lang.Class[] paramTypes,
java.lang.Object[] paramValues)
|
static VM |
createVM(VM host,
java.lang.String fromHost)
|
static VM |
createVM(VM host,
java.lang.String fromHost,
java.lang.String cls,
java.lang.Class[] paramTypes,
java.lang.Object[] paramValues)
|
private static VM |
createVMProxy(java.lang.String vmType,
java.lang.String hostname,
rjvm_intf vm)
|
void |
destroyVM()
|
protected void |
die()
|
java.lang.String |
getHost()
|
java.lang.String |
getName()
|
static long |
getTimestamp()
|
RemoteRefs |
innerCreateInstance(java.lang.String cls,
java.lang.Class[] types,
java.lang.Object[] args)
|
java.lang.Object |
innerCreateInstance(java.lang.String cls,
java.lang.Class[] types,
java.lang.Object[] args,
java.lang.String binclass)
|
static void |
main(java.lang.String[] args)
private static Class [] convertTypes(Class [] types)
{...} |
private static void |
messageReceived()
|
private static void |
messageSent()
|
private static void |
notifyIdle()
|
private static void |
notifyNotIdle()
|
void |
ping()
|
static void |
registerRemote(java.rmi.server.UnicastRemoteObject rem)
|
static void |
sendAndDie()
|
static long |
setTimestamp(long ts)
|
private static void |
startmain(java.lang.String[] args)
|
private static void |
threadBirth_internal()
|
static void |
threadBirth()
|
private static void |
threadDeath_internal()
|
static void |
threadDeath()
|
private static java.lang.Object |
tryHarder(java.lang.String cls,
java.lang.Class[] types,
java.lang.Object[] args)
|
void |
unregisterAllRemote()
|
static void |
unregisterRemote(java.rmi.server.UnicastRemoteObject rem)
|
Methods inherited from class java.rmi.server.UnicastRemoteObject |
clone, exportObject, exportObject, exportObject, unexportObject |
Methods inherited from class java.rmi.server.RemoteServer |
getClientHost, getLog, setLog |
Methods inherited from class java.rmi.server.RemoteObject |
equals, getRef, hashCode, toString, toStub |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
serialVersionUID
static final long serialVersionUID
- See Also:
- Constant Field Values
name
private java.lang.String name
vmName
public static java.lang.String vmName
host
public java.lang.String host
rjx
public static RJX rjx
thisVM
public static rjvm thisVM
remTable
private static java.util.Hashtable<java.rmi.server.UnicastRemoteObject,java.rmi.server.UnicastRemoteObject> remTable
pChecker
private java.lang.Thread pChecker
reaper
private java.lang.Thread reaper
dieMutex
private java.lang.Object dieMutex
dying
private boolean dying
termination
private static Semaphore termination
implicitTermination
public static boolean implicitTermination
verbosity
private static int verbosity
NUMARGS
private static final int NUMARGS
- See Also:
- Constant Field Values
SERVER_ARG
private static final int SERVER_ARG
- See Also:
- Constant Field Values
NAME_ARG
private static final int NAME_ARG
- See Also:
- Constant Field Values
LOCAL_ARG
private static final int LOCAL_ARG
- See Also:
- Constant Field Values
PORT_ARG
private static final int PORT_ARG
- See Also:
- Constant Field Values
IMPLICIT_ARG
private static final int IMPLICIT_ARG
- See Also:
- Constant Field Values
VERBOSITY_ARG
private static final int VERBOSITY_ARG
- See Also:
- Constant Field Values
IDLE_ARG
private static final int IDLE_ARG
- See Also:
- Constant Field Values
VMTYPE_ARG
private static final int VMTYPE_ARG
- See Also:
- Constant Field Values
LOCAL_HOST
private static final java.lang.String LOCAL_HOST
- See Also:
- Constant Field Values
timestamp
private static long timestamp
time_inc
private static final long time_inc
- See Also:
- Constant Field Values
pinged
private boolean pinged
missed
private int missed
ready
private static long ready
messages
private static long messages
amIdle
private static boolean amIdle
rjvm
protected rjvm(java.lang.String name,
java.lang.String host)
throws java.rmi.RemoteException
- Throws:
java.rmi.RemoteException
getName
public java.lang.String getName()
getHost
public java.lang.String getHost()
- Specified by:
getHost
in interface rjvm_intf
destroyVM
public void destroyVM()
throws java.rmi.RemoteException
- Specified by:
destroyVM
in interface rjvm_intf
- Throws:
java.rmi.RemoteException
die
protected void die()
createInstance
public static RemoteRefs createInstance(rjvm_intf vm,
java.lang.String cls,
java.lang.Class[] types,
java.lang.Object[] args)
innerCreateInstance
public RemoteRefs innerCreateInstance(java.lang.String cls,
java.lang.Class[] types,
java.lang.Object[] args)
throws java.rmi.RemoteException
- Specified by:
innerCreateInstance
in interface rjvm_intf
- Throws:
java.rmi.RemoteException
tryHarder
private static java.lang.Object tryHarder(java.lang.String cls,
java.lang.Class[] types,
java.lang.Object[] args)
throws java.lang.Exception
- Throws:
java.lang.Exception
createInstance
public static java.lang.Object createInstance(rjvm_intf vm,
java.lang.String cls,
java.lang.Class[] types,
java.lang.Object[] args,
java.lang.String binclass)
innerCreateInstance
public java.lang.Object innerCreateInstance(java.lang.String cls,
java.lang.Class[] types,
java.lang.Object[] args,
java.lang.String binclass)
throws java.rmi.RemoteException
- Specified by:
innerCreateInstance
in interface rjvm_intf
- Throws:
java.rmi.RemoteException
startmain
private static void startmain(java.lang.String[] args)
throws java.lang.Exception
- Throws:
java.lang.Exception
main
public static void main(java.lang.String[] args)
- private static Class [] convertTypes(Class [] types)
{...}
createVMProxy
private static VM createVMProxy(java.lang.String vmType,
java.lang.String hostname,
rjvm_intf vm)
registerRemote
public static void registerRemote(java.rmi.server.UnicastRemoteObject rem)
unregisterRemote
public static void unregisterRemote(java.rmi.server.UnicastRemoteObject rem)
unregisterAllRemote
public void unregisterAllRemote()
getTimestamp
public static long getTimestamp()
setTimestamp
public static long setTimestamp(long ts)
ping
public final void ping()
throws java.rmi.RemoteException
- Specified by:
ping
in interface rjvm_intf
- Throws:
java.rmi.RemoteException
checkPing
private void checkPing()
threadBirth
public static final void threadBirth()
threadBirth_internal
private static final void threadBirth_internal()
threadDeath
public static final void threadDeath()
threadDeath_internal
private static final void threadDeath_internal()
messageSent
private static final void messageSent()
messageReceived
private static final void messageReceived()
sendAndDie
public static final void sendAndDie()
ariseAndReceive
public static final void ariseAndReceive()
notifyNotIdle
private static final void notifyNotIdle()
notifyIdle
private static final void notifyIdle()
checkIdle
public final TerminationData checkIdle()
throws java.rmi.RemoteException
- Specified by:
checkIdle
in interface rjvm_intf
- Throws:
java.rmi.RemoteException
checkLocalIdle
protected static final TerminationData checkLocalIdle()
createVM
public static VM createVM(java.lang.String onHost,
java.lang.String fromHost)
createVM
public static VM createVM(VM host,
java.lang.String fromHost)
createVM
public static VM createVM(java.lang.String onHost,
java.lang.String fromHost,
java.lang.String cls,
java.lang.Class[] paramTypes,
java.lang.Object[] paramValues)
createVM
public static VM createVM(VM host,
java.lang.String fromHost,
java.lang.String cls,
java.lang.Class[] paramTypes,
java.lang.Object[] paramValues)