Examples of SessionSettings


Examples of quickfix.SessionSettings

        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, TransportType.VM_PIPE.toString());
        settings.setString(Initiator.SETTING_SOCKET_CONNECT_PROTOCOL, TransportType.VM_PIPE.toString());
        settings.setBool(Session.SETTING_USE_DATA_DICTIONARY, false);
        TestSupport.setSessionID(settings, sessionID);
    }
View Full Code Here

Examples of quickfix.SessionSettings

    @Test
    public void configureInSpring() throws Exception {
        SessionID sessionID = new SessionID("FIX.4.2:INITIATOR->ACCEPTOR");
        QuickfixjConfiguration configuration = context.getRegistry().lookup("quickfixjConfiguration", QuickfixjConfiguration.class);

        SessionSettings springSessionSettings = configuration.createSessionSettings();
        Properties sessionProperties = springSessionSettings.getSessionProperties(sessionID, true);

        Assert.assertThat(sessionProperties.get("ConnectionType").toString(), CoreMatchers.is("initiator"));
        Assert.assertThat(sessionProperties.get("SocketConnectProtocol").toString(), CoreMatchers.is("VM_PIPE"));

        QuickfixjComponent component = context.getComponent("quickfix", QuickfixjComponent.class);
View Full Code Here

Examples of quickfix.SessionSettings

            if (endpoint == null) {
                engine = engines.get(remaining);
                if (engine == null) {
                    LOG.info("Creating QuickFIX/J engine using settings: " + remaining);
                    SessionSettings settings = engineSettings.get(remaining);
                    if (settings != null) {
                        engine = new QuickfixjEngine(uri, settings, forcedShutdown, messageStoreFactory, logFactory, messageFactory);
                    } else {
                        engine = new QuickfixjEngine(uri, remaining, forcedShutdown, messageStoreFactory, logFactory, messageFactory);
                    }
View Full Code Here

Examples of quickfix.SessionSettings

      
        contextClassLoader = Thread.currentThread().getContextClassLoader();
        ClassLoader testClassLoader = new URLClassLoader(urls, contextClassLoader);
        Thread.currentThread().setContextClassLoader(testClassLoader);
       
        settings = new SessionSettings();
        settings.setString(Acceptor.SETTING_SOCKET_ACCEPT_PROTOCOL, TransportType.VM_PIPE.toString());
        settings.setString(Initiator.SETTING_SOCKET_CONNECT_PROTOCOL, TransportType.VM_PIPE.toString());
    }
View Full Code Here

Examples of quickfix.SessionSettings

            quickfixjEngine.stop();
        }
    }

    private void createSession(SessionID sessionID) throws IOException, ConfigError, FieldConvertError, JMException, Exception {
        SessionSettings settings = new SessionSettings();
        settings.setString(Acceptor.SETTING_SOCKET_ACCEPT_PROTOCOL, TransportType.VM_PIPE.toString());
       
        settings.setString(sessionID, SessionFactory.SETTING_CONNECTION_TYPE, SessionFactory.ACCEPTOR_CONNECTION_TYPE);
        settings.setLong(sessionID, Acceptor.SETTING_SOCKET_ACCEPT_PORT, 1234);
        TestSupport.setSessionID(settings, sessionID);

        TestSupport.writeSettings(settings, settingsFile);
       
        quickfixjEngine = new QuickfixjEngine("quickfix:test", settingsFile.getName(), false);
View Full Code Here

Examples of quickfix.SessionSettings

    private static SessionSettings loadSettings(String settingsResourceName) throws ConfigError {
        InputStream inputStream = ObjectHelper.loadResourceAsStream(settingsResourceName);
        if (inputStream == null) {
            throw new IllegalArgumentException("Could not load " + settingsResourceName);
        }
        return new SessionSettings(inputStream);
    }
View Full Code Here

Examples of quickfix.SessionSettings

        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, TransportType.VM_PIPE.toString());
        settings.setString(Initiator.SETTING_SOCKET_CONNECT_PROTOCOL, TransportType.VM_PIPE.toString());
        settings.setBool(Session.SETTING_USE_DATA_DICTIONARY, false);
        settings.setBool(QuickfixjEngine.SETTING_USE_JMX, false);
        TestSupport.setSessionID(settings, sessionID);
View Full Code Here

Examples of quickfix.SessionSettings

    @Test
    public void configureInSpring() throws Exception {
        SessionID sessionID = new SessionID("FIX.4.2:INITIATOR->ACCEPTOR");
        QuickfixjConfiguration configuration = context.getRegistry().lookupByNameAndType("quickfixjConfiguration", QuickfixjConfiguration.class);

        SessionSettings springSessionSettings = configuration.createSessionSettings();
        Properties sessionProperties = springSessionSettings.getSessionProperties(sessionID, true);

        assertThat(sessionProperties.get("ConnectionType").toString(), CoreMatchers.is("initiator"));
        assertThat(sessionProperties.get("SocketConnectProtocol").toString(), CoreMatchers.is("VM_PIPE"));

        QuickfixjComponent component = context.getComponent("quickfix", QuickfixjComponent.class);
View Full Code Here

Examples of quickfix.SessionSettings

        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, TransportType.VM_PIPE.toString());
        settings.setString(Initiator.SETTING_SOCKET_CONNECT_PROTOCOL, TransportType.VM_PIPE.toString());
        settings.setBool(Session.SETTING_USE_DATA_DICTIONARY, false);
        TestSupport.setSessionID(settings, sessionID);
    }
View Full Code Here

Examples of quickfix.SessionSettings

    private static SessionSettings loadSettings(String settingsResourceName) throws ConfigError {
        InputStream inputStream = ObjectHelper.loadResourceAsStream(settingsResourceName);
        if (inputStream == null) {
            throw new IllegalArgumentException("Could not load " + settingsResourceName);
        }
        return new SessionSettings(inputStream);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.