|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmatlabcontrol.RemoteMatlabProxyFactory
public class RemoteMatlabProxyFactory
Use this class to create instances of RemoteMatlabProxy
. Creating a
proxy will launch MATLAB. Each proxy created will control the session
launched.
Constructor Summary | |
---|---|
RemoteMatlabProxyFactory()
Constructs this factory with a default location or alias for the MATLAB executable (on an operating system specific basis). |
|
RemoteMatlabProxyFactory(java.lang.String matlabLocation)
Constructs this factory with a specified location or alias for the MATLAB executable. |
Method Summary | |
---|---|
void |
addConnectionListener(MatlabConnectionListener listener)
Adds a listener to be notified when MATLAB connections are established and lost. |
java.lang.String |
getMatlabLocation()
Returns the location or alias of the MATLAB program. |
RemoteMatlabProxy |
getProxy()
Returns a RemoteMatlabProxy . |
RemoteMatlabProxy |
getProxy(long timeout)
Returns a RemoteMatlabProxy . |
void |
removeConnectionListener(MatlabConnectionListener listener)
Removes a listener so that it is no longer notified. |
java.lang.String |
requestProxy()
Requests a RemoteMatlabProxy . |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RemoteMatlabProxyFactory(java.lang.String matlabLocation) throws MatlabConnectionException
the other constructor
will be the
preferred option. The location or alias specified by
matlabLocation
will not be verified at construction time,
and so if the value is invalid it will not cause this constructor to
throw an exception. If it is invalid then an exception will be thrown
when creating a proxy with requestProxy()
, getProxy()
,
or getProxy(long)
.
matlabLocation
-
MatlabConnectionException
- thrown if the initialization necessary
for connecting to MATLAB cannot be
properly configuredpublic RemoteMatlabProxyFactory() throws MatlabConnectionException
the other constructor
so that
the correct location or alias can be specified.
MatlabConnectionException
- thrown if the initialization necessary
for connecting to MATLAB cannot be
properly configuredMethod Detail |
---|
public java.lang.String getMatlabLocation()
public java.lang.String requestProxy() throws MatlabConnectionException
RemoteMatlabProxy
. When the proxy has been made
(there is a possibility it will not be if errors occur), all
listeners will be notified. The identifier of the proxy that will be
created is returned. A proxy's identifier can be accessed by calling
RemoteMatlabProxy.getIdentifier()
.
MatlabConnectionException
addConnectionListener(MatlabConnectionListener)
,
RemoteMatlabProxy.getIdentifier()
,
getProxy()
,
getProxy(long)
public RemoteMatlabProxy getProxy() throws MatlabConnectionException
RemoteMatlabProxy
. This will take some time as it
involves launching MATLAB. If a connection cannot be established within
60 seconds then this method will end execution and an exception will be
thrown.
MatlabConnectionException
requestProxy()
,
getProxy(long)
public RemoteMatlabProxy getProxy(long timeout) throws MatlabConnectionException
RemoteMatlabProxy
. This will take some time as it
involves launching MATLAB. If a connection cannot be established within
the specified number of milliseconds specified by timeout
then this method will end execution and an exception will be thrown.
timeout
- time to wait in milliseconds for a proxy to be created
MatlabConnectionException
requestProxy()
,
getProxy()
public void addConnectionListener(MatlabConnectionListener listener)
listener
- public void removeConnectionListener(MatlabConnectionListener listener)
listener
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |