Creating Java object from abstract Interface in Matlab

3 views (last 30 days)
The following Java code makes a connection to a server. I would like to achieve the same within matlab.
import com.dukascopy.api.system.IClient;
import com.dukascopy.api.system.ClientFactory;
public class MainC {
private static String jnlpUrl = "https://server.com";
private static String userName = "DEMO";
private static String password = "demo";
public static void main(String[] args) throws Exception {
IClient client;
client = ClientFactory.getDefaultInstance();
client.connect(jnlpUrl, userName, password);
}
}
IClient is a abstract Interface. How would I deal with this in matlab ? (having done all the correct importing and path setting)
When I call the IClient I get this:
>> which com.dukascopy.api.system.IClient
com.dukascopy.api.system.IClient is a Java method % com.dukascopy.api.system.IClient constructor
>> client=com.dukascopy.api.system.IClient
No constructor 'com.dukascopy.api.system.IClient' with matching signature found.
>> methods com.dukascopy.api.system.IClient
Methods for class com.dukascopy.api.system.IClient:
addClientGUIListener getNewsFilter setCacheDirectory
addNewsFilter getStartedStrategies setErr
closeChart getSubscribedInstruments setOut
compileStrategy isConnected setSubscribedInstruments
connect loadStrategy setSystemListener
disconnect openChart startStrategy
getAvailableInstruments reconnect stopStrategy
getCaptchaImage removeClientGUIListener
getClientGUI removeNewsFilter
  1 Comment
Javier Trujillo Garcia
Javier Trujillo Garcia on 11 Mar 2015
Hi Frank,
I am also trying to work with Matlab and Dukascopy and so far I have found a lot of problems with it... Did you keep working on it? Because I am really considering trying with another platform

Sign in to comment.

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!