@Test public void testMessageCreate() throws Exception { assertMessage(quickfix.fix40.Advertisement.class, MsgType.ADVERTISEMENT, factory.create(BEGINSTRING_FIX40, MsgType.ADVERTISEMENT)); assertMessage(quickfix.fix41.Advertisement.class, MsgType.ADVERTISEMENT, factory.create(BEGINSTRING_FIX41, MsgType.ADVERTISEMENT)); assertMessage(quickfix.fix42.Advertisement.class, MsgType.ADVERTISEMENT, factory.create(BEGINSTRING_FIX42, MsgType.ADVERTISEMENT)); assertMessage(quickfix.fix43.Advertisement.class, MsgType.ADVERTISEMENT, factory.create(BEGINSTRING_FIX43, MsgType.ADVERTISEMENT)); assertMessage(quickfix.fix44.Advertisement.class, MsgType.ADVERTISEMENT, factory.create(BEGINSTRING_FIX44, MsgType.ADVERTISEMENT)); assertMessage(quickfix.fix50.Advertisement.class, MsgType.ADVERTISEMENT, factory.create(FixVersions.FIX50, MsgType.ADVERTISEMENT)); assertMessage(quickfix.fix50sp1.Advertisement.class, MsgType.ADVERTISEMENT, factory.create(FixVersions.FIX50SP1, MsgType.ADVERTISEMENT)); assertMessage(quickfix.fix50sp2.Advertisement.class, MsgType.ADVERTISEMENT, factory.create(FixVersions.FIX50SP2, MsgType.ADVERTISEMENT)); assertMessage(quickfix.Message.class, MsgType.ADVERTISEMENT, factory.create("unknown", MsgType.ADVERTISEMENT)); }
@Override public Message create(String beginString, String msgType) { return create(beginString, defaultApplVerID, msgType); }
DefaultMessageFactory implements MessageFactory { @Override public Message create(String beginString, String msgType) { return create(beginString, defaultApplVerID, msgType); } }
DefaultMessageFactory implements MessageFactory { @Override public Message create(String beginString, String msgType) { return create(beginString, defaultApplVerID, msgType); } DefaultMessageFactory();  DefaultMessageFactory(String defaultApplVerID); }
DefaultMessageFactory implements MessageFactory { @Override public Message create(String beginString, String msgType) { return create(beginString, defaultApplVerID, msgType); } DefaultMessageFactory();  DefaultMessageFactory(String defaultApplVerID); @SuppressWarnings("unchecked") void addFactory(String beginString, String factoryClassName); void addFactory(String beginString, Class<? extends MessageFactory> factoryClass); @Override Message create(String beginString, String msgType); @Override Message create(String beginString, ApplVerID applVerID, String msgType); Group create(String beginString, String msgType, int correspondingFieldID); }
DefaultMessageFactory implements MessageFactory { @Override public Message create(String beginString, String msgType) { return create(beginString, defaultApplVerID, msgType); } DefaultMessageFactory();  DefaultMessageFactory(String defaultApplVerID); @SuppressWarnings("unchecked") void addFactory(String beginString, String factoryClassName); void addFactory(String beginString, Class<? extends MessageFactory> factoryClass); @Override Message create(String beginString, String msgType); @Override Message create(String beginString, ApplVerID applVerID, String msgType); Group create(String beginString, String msgType, int correspondingFieldID);  }