|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.rmi.server.RemoteObject java.rmi.server.RemoteServer java.rmi.server.UnicastRemoteObject creamtec.webcream.core.JVMFactory
public class JVMFactory
Creates and manages external JVMs.
Constructor Summary | |
---|---|
JVMFactory()
Initializes the factory and starts in-process RMI registry |
Method Summary | |
---|---|
void |
execJVMProcess(java.lang.String appName)
Executes a JVM process for given application name and returns |
JVMProcessContext |
findFreeJVM(java.lang.String appName)
Returns a JVM that can execute another virtual client for a given application |
java.util.List |
getAppJvms(java.lang.String appName)
Returns all JVMs for the given application |
JVMProcessContext |
getAvailableJVM(java.lang.String appName)
If there's already a warmed up JVM, returns it. |
void |
initRegistry(int registryPort,
int portRange)
|
JVMProcessContext |
launchJVM(java.lang.String appName)
Launches a new JVM for a given application and waits for it to become available |
void |
ping()
Used by JVMProcesses to check if the server is still running |
void |
registerJVM(java.lang.String appName,
JVMProcessRemote jvmProcess)
Registers external JVM with the factory. |
void |
shutdown()
Shuts down all registered external JVMs |
void |
shutdownJVM(JVMProcessContext jvmContext,
java.lang.String appName)
Shuts down the JVM identified by the JVM context and the application name |
void |
unregisterJVM(JVMProcessContext jvmContext,
java.lang.String appName)
Unregisteres external JVM with the factory |
JVMProcessContext |
waitForJVM(java.lang.String appName)
Waits until a JVM for a given application becomes available |
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 |
---|
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public JVMFactory() throws java.lang.Exception
java.lang.Exception
Method Detail |
---|
public void initRegistry(int registryPort, int portRange) throws java.lang.Exception
java.lang.Exception
public JVMProcessContext getAvailableJVM(java.lang.String appName) throws java.lang.Exception
java.lang.Exception
public JVMProcessContext findFreeJVM(java.lang.String appName) throws java.lang.Exception
appName
- String
java.lang.Exception
public java.util.List getAppJvms(java.lang.String appName)
appName
- application name
public JVMProcessContext launchJVM(java.lang.String appName) throws java.lang.Exception
appName
- application name
java.lang.Exception
public void execJVMProcess(java.lang.String appName) throws java.lang.Exception
appName
- application name
java.lang.Exception
public JVMProcessContext waitForJVM(java.lang.String appName) throws java.lang.Exception
appName
- application name
java.lang.Exception
public void registerJVM(java.lang.String appName, JVMProcessRemote jvmProcess) throws java.lang.Exception
registerJVM
in interface JVMFactoryRemote
appName
- application namejvmProcess
- JVMProcessRemote
java.lang.Exception
public void shutdownJVM(JVMProcessContext jvmContext, java.lang.String appName)
jvmContext
- JVMProcessContextappName
- application namepublic void unregisterJVM(JVMProcessContext jvmContext, java.lang.String appName)
jvmContext
- JVMProcessContextappName
- Stringpublic void shutdown()
public void ping()
ping
in interface JVMFactoryRemote
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |