コード例 #1
0
ファイル: QuickfixjEngineTest.java プロジェクト: Rabeea/camel
  @Before
  public void setUp() throws Exception {
    settingsFile = File.createTempFile("quickfixj_test_", ".cfg");
    tempdir = settingsFile.getParentFile();
    URL[] urls = new URL[] {tempdir.toURI().toURL()};

    contextClassLoader = Thread.currentThread().getContextClassLoader();
    ClassLoader testClassLoader = new URLClassLoader(urls, contextClassLoader);
    Thread.currentThread().setContextClassLoader(testClassLoader);

    sessionID = new SessionID(FixVersions.BEGINSTRING_FIX44, "FOO", "BAR");

    settings = new SessionSettings();
    settings.setString(
        Acceptor.SETTING_SOCKET_ACCEPT_PROTOCOL,
        ProtocolFactory.getTypeString(ProtocolFactory.VM_PIPE));
    settings.setString(
        Initiator.SETTING_SOCKET_CONNECT_PROTOCOL,
        ProtocolFactory.getTypeString(ProtocolFactory.VM_PIPE));
    settings.setBool(Session.SETTING_USE_DATA_DICTIONARY, false);
    settings.setBool(QuickfixjEngine.SETTING_USE_JMX, false);
    TestSupport.setSessionID(settings, sessionID);
  }
コード例 #2
0
 private SessionSettings getClientSessionSettings(SessionID clientSessionID) {
   SessionSettings settings = new SessionSettings();
   HashMap<Object, Object> defaults = new HashMap<Object, Object>();
   defaults.put("ConnectionType", "initiator");
   defaults.put("SocketConnectProtocol", ProtocolFactory.getTypeString(transportProtocol));
   defaults.put("SocketUseSSL", "Y");
   defaults.put("SocketConnectHost", "localhost");
   defaults.put("SocketConnectPort", "9877");
   defaults.put("StartTime", "00:00:00");
   defaults.put("EndTime", "00:00:00");
   defaults.put("HeartBtInt", "30");
   defaults.put("ReconnectInterval", "2");
   defaults.put("FileStorePath", "target/data/client");
   defaults.put("ValidateUserDefinedFields", "Y");
   settings.set(defaults);
   settings.setString(clientSessionID, "BeginString", FixVersions.BEGINSTRING_FIX42);
   settings.setString(clientSessionID, "DataDictionary", "FIX42.xml");
   return settings;
 }