public class JVMFactory extends java.rmi.server.UnicastRemoteObject implements JVMFactoryRemote
Constructor and Description |
---|
JVMFactory()
Initializes the factory and starts in-process RMI registry
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
execJVMProcess(java.lang.String appName)
Executes a JVM process for given application name and returns a ClientAgent unique ID
|
JVMProcessContext |
findFreeJVM(java.lang.String appName,
java.lang.String locale)
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,
java.lang.String locale)
If there's already a warmed up JVM, returns it.
|
void |
initRegistry(int registryPort,
int portRange) |
JVMProcessContext |
launchJVM(java.lang.String appName,
java.lang.String locale)
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,
java.lang.String clientAgentId,
java.lang.String locale)
Waits until a JVM for a given application becomes available
|
clone, exportObject, exportObject, exportObject, unexportObject
public JVMFactory() throws java.lang.Exception
java.lang.Exception
public void initRegistry(int registryPort, int portRange) throws java.lang.Exception
java.lang.Exception
public JVMProcessContext getAvailableJVM(java.lang.String appName, java.lang.String locale) throws java.lang.Exception
java.lang.Exception
public JVMProcessContext findFreeJVM(java.lang.String appName, java.lang.String locale) throws java.lang.Exception
appName
- Stringjava.lang.Exception
public java.util.List getAppJvms(java.lang.String appName)
appName
- application namepublic JVMProcessContext launchJVM(java.lang.String appName, java.lang.String locale) throws java.lang.Exception
appName
- application namejava.lang.Exception
public java.lang.String execJVMProcess(java.lang.String appName) throws java.lang.Exception
appName
- application namejava.lang.Exception
public JVMProcessContext waitForJVM(java.lang.String appName, java.lang.String clientAgentId, java.lang.String locale) throws java.lang.Exception
appName
- application namejava.lang.Exception
public void registerJVM(java.lang.String appName, JVMProcessRemote jvmProcess) throws java.lang.Exception
registerJVM
in interface JVMFactoryRemote
appName
- application namejvmProcess
- JVMProcessRemotejava.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
Copyright © 2000-2012 CreamTec LLC. All Rights Reserved.