Package matlabcontrol
Class MatlabProxyFactory
- java.lang.Object
-
- matlabcontrol.MatlabProxyFactory
-
public class MatlabProxyFactory extends java.lang.ObjectCreates instances ofMatlabProxy. Any number of proxies may be created with a factory.
How the proxies will connect to a session of MATLAB depends on whether the factory is running inside or outside MATLAB:
Running inside MATLAB
The proxy will connect to the session of MATLAB this factory is running in.
Running outside MATLAB
By default a new session of MATLAB will be started and connected to, but the factory may be configured via the options provided to this factory to connect to a previously controlled session.
This class is unconditionally thread-safe. Any number of proxies may be created simultaneously.- Since:
- 4.0.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceMatlabProxyFactory.CopyPasteCallbackA callback interface for receiving the commands which must be copy-pasted into MATLAB to initiate a connection.static interfaceMatlabProxyFactory.RequestA request for a proxy.static interfaceMatlabProxyFactory.RequestCallbackProvides the requested proxy.
-
Constructor Summary
Constructors Constructor Description MatlabProxyFactory()Constructs the factory using default options.MatlabProxyFactory(MatlabProxyFactoryOptions options)Constructs the factory with the specifiedoptions.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MatlabProxygetProxy()MatlabProxyFactory.RequestrequestProxy(MatlabProxyFactory.RequestCallback callback)
-
-
-
Constructor Detail
-
MatlabProxyFactory
public MatlabProxyFactory()
Constructs the factory using default options.- Throws:
MatlabConnectionException
-
MatlabProxyFactory
public MatlabProxyFactory(MatlabProxyFactoryOptions options)
Constructs the factory with the specifiedoptions. Depending on the whether the factory is running inside MATLAB or outside MATLAB will determine if a given option is used.- Parameters:
options-
-
-
Method Detail
-
getProxy
public MatlabProxy getProxy() throws MatlabConnectionException
- Throws:
MatlabConnectionException
-
requestProxy
public MatlabProxyFactory.Request requestProxy(MatlabProxyFactory.RequestCallback callback) throws MatlabConnectionException
- Throws:
MatlabConnectionException
-
-