Search in sources :

Example 6 with DataDictionary

use of quickfix.DataDictionary in project camel by apache.

the class QuickfixjMessageJsonTransformer method transform.

public String transform(Message message) throws FieldNotFound, ConfigError {
    SessionID sessionID = MessageUtils.getSessionID(message);
    Session session = Session.lookupSession(sessionID);
    DataDictionary dataDictionary = session.getDataDictionary();
    if (dataDictionary == null) {
        throw new IllegalStateException("No Data Dictionary. Exchange must reference an existing session");
    }
    return transform(message, dataDictionary);
}
Also used : DataDictionary(quickfix.DataDictionary) SessionID(quickfix.SessionID) Session(quickfix.Session)

Aggregations

DataDictionary (quickfix.DataDictionary)6 Session (quickfix.Session)4 SessionID (quickfix.SessionID)4 Message (quickfix.Message)3 Converter (org.apache.camel.Converter)1 Exchange (org.apache.camel.Exchange)1 DefaultExchange (org.apache.camel.impl.DefaultExchange)1 Test (org.junit.Test)1 DataDictionaryProvider (quickfix.DataDictionaryProvider)1 InvalidMessage (quickfix.InvalidMessage)1 SessionNotFound (quickfix.SessionNotFound)1 ApplVerID (quickfix.field.ApplVerID)1 NoHops (quickfix.fix44.Message.Header.NoHops)1