void decodeRefreshMsg(RefreshMsg refreshMsg) { System.out.println("Item Name: " + (refreshMsg.hasName() ? refreshMsg.name() : "<not set>")); System.out.println("Service Name: " + (refreshMsg.hasServiceName() ? refreshMsg.serviceName() : "<not set>")); System.out.println("Item State: " + refreshMsg.state()); System.out.println("Attribute"); decode(refreshMsg.attrib().data()); System.out.println("Payload"); decode(refreshMsg.payload().data()); }
void decode(RefreshMsg refreshMsg) { System.out.println("Item Name: " + (refreshMsg.hasName() ? refreshMsg.name() : "<not set>")); System.out.println("Service Name: " + (refreshMsg.hasServiceName() ? refreshMsg.serviceName() : "<not set>")); System.out.println("Item State: " + refreshMsg.state()); decode(refreshMsg.attrib()); decode(refreshMsg.payload()); }
void decode(RefreshMsg refreshMsg) { System.out.println("Item Name: " + (refreshMsg.hasName() ? refreshMsg.name() : "<not set>")); System.out.println("Service Name: " + (refreshMsg.hasServiceName() ? refreshMsg.serviceName() : "<not set>")); System.out.println("Item State: " + refreshMsg.state()); decode(refreshMsg.attrib()); decode(refreshMsg.payload()); }
void processLoginRequest(ReqMsg reqMsg, OmmProviderEvent event) { event.provider().submit(EmaFactory.createRefreshMsg().domainType(EmaRdm.MMT_LOGIN).name(reqMsg.name()).nameType(EmaRdm.USER_NAME). complete(true).solicited(true).state(OmmState.StreamState.OPEN, OmmState.DataState.OK, OmmState.StatusCode.NONE, "Login accepted"). attrib( EmaFactory.createElementList() ), event.handle()); }
void processLoginRequest(ReqMsg reqMsg, OmmProviderEvent event) { event.provider().submit(EmaFactory.createRefreshMsg().domainType(EmaRdm.MMT_LOGIN).name(reqMsg.name()).nameType(EmaRdm.USER_NAME). complete(true).solicited(true).state(OmmState.StreamState.OPEN, OmmState.DataState.OK, OmmState.StatusCode.NONE, "Login accepted"). attrib( EmaFactory.createElementList() ), event.handle()); }
void processLoginRequest(ReqMsg reqMsg, OmmProviderEvent event) { event.provider().submit(EmaFactory.createRefreshMsg().domainType(EmaRdm.MMT_LOGIN).name(reqMsg.name()).nameType(EmaRdm.USER_NAME). complete(true).solicited(true).state(OmmState.StreamState.OPEN, OmmState.DataState.OK, OmmState.StatusCode.NONE, "Login accepted"). attrib( EmaFactory.createElementList() ), event.handle()); loginHandle = event.handle(); }
loginRefresh.attrib( refreshAttributes );
copyRefreshMsg.attrib(refreshMsg.attrib().data()); copyRefreshMsg.payload(refreshMsg.payload().data()); TestUtilities.EmaDecode_UPAFieldListAll(decCopyRefreshMsg.attrib().fieldList(), TestUtilities.EncodingTypeFlags.PRIMITIVE_TYPES); TestUtilities.EmaDecode_UPAFieldListAll(decCopyRefreshMsg.payload().fieldList(), TestUtilities.EncodingTypeFlags.PRIMITIVE_TYPES);
copyRefreshMsg.attrib(refreshMsg.attrib().data()); copyRefreshMsg.payload(refreshMsg.payload().data()); TestUtilities.EmaDecode_UPAMapKeyUIntAll(decCopyRefreshMsg.attrib().map(), com.thomsonreuters.upa.codec.DataTypes.FIELD_LIST); TestUtilities.EmaDecode_UPAMapKeyUIntAll(decCopyRefreshMsg.payload().map(), com.thomsonreuters.upa.codec.DataTypes.FIELD_LIST);
copyRefreshMsg.attrib(refreshMsg.attrib().data()); copyRefreshMsg.payload(refreshMsg.payload().data()); TestUtilities.EmaDecode_UPAFilterListAll(decCopyRefreshMsg.attrib().filterList(), TestUtilities.EncodingTypeFlags.MESSAGE_TYPES); TestUtilities.EmaDecode_UPAFilterListAll(decCopyRefreshMsg.payload().filterList(), TestUtilities.EncodingTypeFlags.MESSAGE_TYPES);
copyRefreshMsg.attrib(refreshMsg.attrib().data()); copyRefreshMsg.payload(refreshMsg.payload().data()); TestUtilities.EmaDecode_UPASeriesAll(decCopyRefreshMsg.attrib().series(), com.thomsonreuters.upa.codec.DataTypes.FIELD_LIST); TestUtilities.EmaDecode_UPASeriesAll(decCopyRefreshMsg.payload().series(), com.thomsonreuters.upa.codec.DataTypes.FIELD_LIST);
copyRefreshMsg.attrib(refreshMsg.attrib().data()); copyRefreshMsg.payload(refreshMsg.payload().data()); TestUtilities.EmaDecode_UPAVectorAll(decCopyRefreshMsg.attrib().vector(), com.thomsonreuters.upa.codec.DataTypes.ELEMENT_LIST); TestUtilities.EmaDecode_UPAVectorAll(decCopyRefreshMsg.payload().vector(), com.thomsonreuters.upa.codec.DataTypes.ELEMENT_LIST);
copyRefreshMsg.attrib(refreshMsg.attrib().data()); copyRefreshMsg.payload(refreshMsg.payload().data()); TestUtilities.EmaDecode_UPAElementListAll(decCopyRefreshMsg.attrib().elementList(), TestUtilities.EncodingTypeFlags.PRIMITIVE_TYPES); TestUtilities.EmaDecode_UPAElementListAll(decCopyRefreshMsg.payload().elementList(), TestUtilities.EncodingTypeFlags.PRIMITIVE_TYPES);
copyRefreshMsg.attrib(refreshMsg.attrib().data()); copyRefreshMsg.payload(refreshMsg.payload().data()); TestUtilities.EmaDecode_UPARefreshMsgAll(decCopyRefreshMsg.attrib().refreshMsg(), com.thomsonreuters.upa.codec.DataTypes.FIELD_LIST); TestUtilities.EmaDecode_UPARefreshMsgAll(decCopyRefreshMsg.payload().refreshMsg(), com.thomsonreuters.upa.codec.DataTypes.FIELD_LIST);
encRefreshMsg.attrib(encodedElementList);
@Test public void decodeLoginRefreshInvalidTypeTest() { ElementList encodedElementList = EmaFactory.createElementList(); encodedElementList.add( EmaFactory.createElementEntry().ascii(EmaRdm.ENAME_ALLOW_SUSPECT_DATA, "1")); com.thomsonreuters.upa.codec.DataDictionary dictionary = com.thomsonreuters.upa.codec.CodecFactory .createDataDictionary(); TestUtilities.upa_encodeDictionaryMsg(dictionary); RefreshMsg encRefreshMsg = EmaFactory.createRefreshMsg(); encRefreshMsg.domainType(EmaRdm.MMT_LOGIN); encRefreshMsg.attrib(encodedElementList); RefreshMsg decRefreshMsg = JUnitTestConnect.createRefreshMsg(); JUnitTestConnect.setRsslData(decRefreshMsg, encRefreshMsg, Codec.majorVersion(), Codec.minorVersion(), dictionary, null); LoginRefresh loginRefresh = EmaFactory.Domain.createLoginRefresh(); exception.expect(OmmInvalidUsageException.class); exception.expectMessage("Decoding error for AllowSuspectData element. Attempt to uintValue() while actual entry data type is Ascii"); loginRefresh.message(decRefreshMsg); }
TestUtilities.checkResult(emaRefreshMsg.attrib().dataType() == com.thomsonreuters.ema.access.DataType.DataTypes.FIELD_LIST, "RefreshMsg.attrib().dataType()");
refreshMsg.attrib(_elementList);
JUnitTestConnect.setRsslData(decodedEl, decRefreshMsg.attrib().elementList(), Codec.majorVersion(), Codec.minorVersion(), dictionary, null);
encRefreshMsg.attrib(encodedElementList);