|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmatlabcontrol.MatlabProxyFactory
public class MatlabProxyFactory
Creates instances of MatlabProxy
. 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.
Nested Class Summary | |
---|---|
static interface |
MatlabProxyFactory.Request
A request for a proxy. |
static interface |
MatlabProxyFactory.RequestCallback
Provides the requested proxy. |
Constructor Summary | |
---|---|
MatlabProxyFactory()
Constructs the factory using default options. |
|
MatlabProxyFactory(MatlabProxyFactoryOptions options)
Constructs the factory with the specified options . |
Method Summary | |
---|---|
MatlabProxy |
getProxy()
Returns a MatlabProxy . |
MatlabProxyFactory.Request |
requestProxy(MatlabProxyFactory.RequestCallback callback)
Requests a MatlabProxy . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MatlabProxyFactory()
MatlabConnectionException
public MatlabProxyFactory(MatlabProxyFactoryOptions options)
options
. Depending on the whether the factory is running inside
MATLAB or outside MATLAB will determine if a given option is used.
options
- Method Detail |
---|
public MatlabProxy getProxy() throws MatlabConnectionException
MatlabProxy
. If a connection cannot be established before the timeout then this method will end
execution and an exception will be thrown. A timeout can be specified with the options provided to this factory.
If no timeout was specified, then a default of 180 seconds will be used.
getProxy()
simultaneously.
MatlabConnectionException
public MatlabProxyFactory.Request requestProxy(MatlabProxyFactory.RequestCallback callback) throws MatlabConnectionException
MatlabProxy
. When the proxy has been created it will be provided to the callback
. The
proxy may be provided to the callback before this method returns. There is no timeout. The returned
MatlabProxyFactory.Request
instance provides information about the request and can be used to cancel the request.
MatlabConnectionException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |