It is possible to do this already
public class Main {
static IClient client;
static File destDir;
public static void main(String[] args) throws Exception {
//get the instance of the IClient interface
client = ClientFactory.getDefaultInstance();
//...
//start the strategy
client.startStrategy(new Dummy());
}
public static void startNext() {
client.startStrategy(new Strategy());
}
public static class Dummy implements IStrategy {
public void onStart(IContext context) throws JFException {
destDir = context.getFilesDir();
startNext();
context.stop();
}
public void onAccount(IAccount account) throws JFException {
}
public void onMessage(IMessage message) throws JFException {
}
public void onStop() throws JFException {
}
public void onTick(Instrument instrument, ITick tick) throws JFException {
}
public void onBar(Instrument instrument, Period period, IBar askBar, IBar bidBar) throws JFException {
}
}