Package quickfix

Examples of quickfix.SessionID


        if (dictionaryValue instanceof DataDictionary) {
            dataDictionary = (DataDictionary) dictionaryValue;
        } else if (dictionaryValue instanceof String) {
            dataDictionary = new DataDictionary((String) dictionaryValue);
        } else {
            SessionID sessionID = exchange.getIn().getHeader(QuickfixjEndpoint.SESSION_ID_KEY, SessionID.class);
            if (sessionID != null) {
                Session session = Session.lookupSession(sessionID);
                dataDictionary = session != null ? session.getDataDictionary() : null;
            }
        }
View Full Code Here


    void sendMessage(Exchange exchange, org.apache.camel.Message camelMessage) throws Exception {
        Message message = camelMessage.getBody(Message.class);
        log.debug("Sending FIX message: {}", message);

        SessionID messageSessionID = sessionID;
        if (messageSessionID == null) {
            messageSessionID = MessageUtils.getSessionID(message);
        }

        Session session = getSession(messageSessionID);
View Full Code Here

            handleException("Invalid FIX EPR " + targetEPR + ". The EPR prefix must be " +
                    FIXConstants.FIX_PREFIX);
        }
        else {
            Hashtable<String,String> properties = BaseUtils.getEPRProperties(targetEPR);
            this.sessionID = new SessionID(
                    properties.get(FIXConstants.BEGIN_STRING),
                    properties.get(FIXConstants.SENDER_COMP_ID),
                    properties.get(FIXConstants.SENDER_SUB_ID),
                    properties.get(FIXConstants.SENDER_LOCATION_ID),
                    properties.get(FIXConstants.TARGET_COMP_ID),
View Full Code Here

    private void sendQueuedMessages(int expectedValue, String session) throws SessionNotFound {
        Map<Integer, Object[]> messages = messagesMap.get(session);
        Object[] obj = messages.get(expectedValue);
        while (obj != null) {
            Message message = (Message) obj[0];
            SessionID sessionID = (SessionID) obj[1];
            MessageContext msgCtx = null;
            String targetEPR = null;
            if (obj[2] != null) {
                msgCtx = (MessageContext) obj[2];
                targetEPR = obj[3].toString();
View Full Code Here

            Map<Integer,  Object[]> messages = messagesMap.get(session);
            while (!messages.isEmpty()) {
                Object[] obj = messages.get(expectedValue);
                if (obj != null) {
                    Message message = (Message) obj[0];
                    SessionID sessionID = (SessionID) obj[1];
                    try {
                        Session.sendToTarget(message, sessionID);
                    } catch (SessionNotFound ignore) { }

                    messages.remove(expectedValue);
View Full Code Here

        Message camelMessage = exchange.getOut();
        quickfix.Message quickfixjMessage = camelMessage.getBody(quickfix.Message.class);

        log.debug("Sending FIX message reply: {}", quickfixjMessage);

        SessionID messageSessionID = exchange.getIn().getHeader("SessionID", SessionID.class);

        Session session = getSession(messageSessionID);
        if (session == null) {
            throw new IllegalStateException("Unknown session: " + messageSessionID);
        }
View Full Code Here

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

    @Test
    public void minimalInitiatorAndAcceptor() throws Exception {
        settings.setString(sessionID, SessionFactory.SETTING_CONNECTION_TYPE, SessionFactory.ACCEPTOR_CONNECTION_TYPE);
        settings.setLong(sessionID, Acceptor.SETTING_SOCKET_ACCEPT_PORT, 1234);

        SessionID initiatorSessionID = new SessionID(FixVersions.BEGINSTRING_FIX44, "FARGLE", "BARGLE");
        settings.setString(initiatorSessionID, SessionFactory.SETTING_CONNECTION_TYPE, SessionFactory.INITIATOR_CONNECTION_TYPE);
        TestSupport.setSessionID(settings, initiatorSessionID);

        writeSettings();
View Full Code Here

        assertFalse("QFJ mbean not registered", n.isEmpty());
    }

    @Test
    public void sessionEvents() throws Exception {
        SessionID acceptorSessionID = new SessionID(FixVersions.BEGINSTRING_FIX42, "MARKET", "TRADER");
        SessionID initiatorSessionID = new SessionID(FixVersions.BEGINSTRING_FIX42, "TRADER", "MARKET");

        quickfixjEngine = new QuickfixjEngine("quickfix:test", "examples/inprocess.cfg");

        doLogonEventsTest(acceptorSessionID, initiatorSessionID, quickfixjEngine);
View Full Code Here

    void sendMessage(Exchange exchange, org.apache.camel.Message camelMessage) throws Exception {
        Message message = camelMessage.getBody(Message.class);
        log.debug("Sending FIX message: {}", message);

        SessionID messageSessionID = getEndpoint().getSessionID();
        if (messageSessionID == null) {
            messageSessionID = MessageUtils.getSessionID(message);
        }

        Session session = getSession(messageSessionID);
View Full Code Here

TOP

Related Classes of quickfix.SessionID

Copyright © 2018 www.massapicom. 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.