You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Generated messages should have overridden getHeader() method to return header that corresponds to used protocol version.
Describe the solution you'd like
In order to set header fields I would like to have returned header that if specific to fix version that message comes from.
I presented that with code example in additional context.
What I think would be nice is to make method getHeader return quickfix.fix44.Message.Header so building messages can be done without any casting, making it more fluent.
What is more changing behavior to one I described would make it easier to work with for new devs, because IDE would hint available methods.
Describe alternatives you've considered
Casting quickfix.Message.Header to actual header, for example quickfix.fix44.Message.Header
Additional context
Example code pattern that I currently use, but it is a bit tedious to write it each time I add fields in header.
importquickfix.Message;
importquickfix.field.TargetSubID;
importquickfix.fix44.QuoteRequest;
classMain {
publicstaticvoidmain(String[] args) {
QuoteRequestquoteRequest = newQuoteRequest();
Message.Headerheader = quoteRequest.getHeader();
// header.set(new TargetSubID("subId")); // Does not work// casting is neededquickfix.fix44.Message.Headerfix44Header = (quickfix.fix44.Message.Header) header;
fix44Header.set(newTargetSubID("subId"));
}
}
The text was updated successfully, but these errors were encountered:
That was one of my attempts and while it is working I think that having it type safe makes it great and generated classes are really good with that hence my idea.
Is your feature request related to a problem? Please describe.
Generated messages should have overridden
getHeader()
method to return header that corresponds to used protocol version.Describe the solution you'd like
In order to set header fields I would like to have returned header that if specific to fix version that message comes from.
I presented that with code example in additional context.
What I think would be nice is to make method
getHeader
returnquickfix.fix44.Message.Header
so building messages can be done without any casting, making it more fluent.What is more changing behavior to one I described would make it easier to work with for new devs, because IDE would hint available methods.
Describe alternatives you've considered
Casting
quickfix.Message.Header
to actual header, for examplequickfix.fix44.Message.Header
Additional context
Example code pattern that I currently use, but it is a bit tedious to write it each time I add fields in header.
The text was updated successfully, but these errors were encountered: