Creating Java object from abstract Interface in Matlab
4 次查看(过去 30 天)
显示 更早的评论
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 个评论
Javier Trujillo Garcia
2015-3-11
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
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Java Client Programming 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!