import quickfix.*;
import java.io.FileInputStream;

public class MyClass {

  static {
    System.loadLibrary("quickfix_jni");
  }

  public static void main(String args[]) throws Exception {
    if(args.length != 1) return;
    String fileName = args[0];

    Application application = new Application();
    SessionSettings settings = new SessionSettings(new FileInputStream(fileName));
    MessageStoreFactory storeFactory = new FileStoreFactory(settings);
    LogFactory logFactory = new FileLogFactory(settings);
    MessageFactory messageFactory = new DefaultMessageFactory();
    Acceptor acceptor = new SocketAcceptor
      (application, storeFactory, settings, logFactory, messageFactory);
    acceptor.start();
    // while( condition == true ) { do something; }
    acceptor.stop();
  }
}