Class MatlabEnginePool
- java.lang.Object
-
- org.eclipse.epsilon.emc.simulink.engine.MatlabEnginePool
-
public class MatlabEnginePool extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.String
engineJarPath
protected static MatlabEnginePool
instance
protected static java.lang.String
libraryPath
protected java.lang.Class<?>
matlabEngineClass
protected java.util.Set<MatlabEngine>
pool
protected java.util.Map<java.lang.String,MatlabEngine>
projectEngine
protected static java.net.URLClassLoader
systemURLClassLoader
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description MatlabEngine
getEngineForProject(java.lang.String absoluteLocation)
java.lang.String
getEngineJarPath()
static MatlabEnginePool
getInstance()
static MatlabEnginePool
getInstance(java.lang.String libraryPath, java.lang.String engineJarPath)
java.lang.String
getLibraryPath()
MatlabEngine
getMatlabEngine()
static void
main(java.lang.String[] args)
void
release(MatlabEngine engine)
static void
reset()
static boolean
resolve(java.lang.String library, java.lang.String engineJar)
static boolean
resolveFromEnv()
Attempts to locate a MATLAB installation.
-
-
-
Field Detail
-
instance
protected static MatlabEnginePool instance
-
systemURLClassLoader
protected static java.net.URLClassLoader systemURLClassLoader
-
libraryPath
protected static java.lang.String libraryPath
-
engineJarPath
protected static java.lang.String engineJarPath
-
pool
protected java.util.Set<MatlabEngine> pool
-
matlabEngineClass
protected java.lang.Class<?> matlabEngineClass
-
projectEngine
protected java.util.Map<java.lang.String,MatlabEngine> projectEngine
-
-
Method Detail
-
getInstance
public static MatlabEnginePool getInstance(java.lang.String libraryPath, java.lang.String engineJarPath) throws MatlabRuntimeException
- Throws:
MatlabRuntimeException
-
getInstance
public static MatlabEnginePool getInstance() throws MatlabRuntimeException
- Throws:
MatlabRuntimeException
-
reset
public static void reset()
-
getEngineForProject
public MatlabEngine getEngineForProject(java.lang.String absoluteLocation) throws MatlabException, java.lang.Exception
- Throws:
MatlabException
java.lang.Exception
-
getMatlabEngine
public MatlabEngine getMatlabEngine() throws java.lang.Exception
- Throws:
java.lang.Exception
-
release
public void release(MatlabEngine engine)
-
getEngineJarPath
public java.lang.String getEngineJarPath()
-
getLibraryPath
public java.lang.String getLibraryPath()
-
main
public static void main(java.lang.String[] args) throws java.lang.Exception
- Throws:
java.lang.Exception
-
resolveFromEnv
public static boolean resolveFromEnv()
Attempts to locate a MATLAB installation.- Returns:
true
iff the paths could be resolved.- Since:
- 1.6
-
resolve
public static boolean resolve(java.lang.String library, java.lang.String engineJar)
- Parameters:
library
- The MATLAB library path.engineJar
- The MATLAB engine.jar file path.- Returns:
true
iff the paths exist.
-
-