ProxyFactory

interface ProxyFactory

A factory which creates instances of MatlabProxy.

Author:Joshua Kaplan

Methods

getProxy

public MatlabProxy getProxy()

Returns a 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. While this method blocks the calling thread until a proxy is created (or the timeout is reached), any number of threads may call getProxy() simultaneously.

Throws:
Returns:

proxy

requestProxy

public Request requestProxy(RequestCallback callback)

Requests a 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 Request instance provides information about the request and can be used to cancel the request. This method is non-blocking. Any number of requests may be made simultaneously from the same thread or different threads.

Throws:
Returns:

request