forked from quickfix/quickfix
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapplication_2.html
More file actions
27 lines (23 loc) · 833 Bytes
/
Copy pathapplication_2.html
File metadata and controls
27 lines (23 loc) · 833 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<B><CODE><PRE>
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();
}
}
</PRE></CODE></B>