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