void processUpdateGroupStatus( OmmProvider provider) { ElementList serviceGroupId = EmaFactory.createElementList(); serviceGroupId.add( EmaFactory.createElementEntry().buffer( EmaRdm.ENAME_GROUP, groupId )); serviceGroupId.add( EmaFactory.createElementEntry().state( EmaRdm.ENAME_STATUS, OmmState.StreamState.CLOSED_RECOVER, OmmState.DataState.SUSPECT, OmmState.StatusCode.NONE, "Group Status Msg" ) ); FilterList filterList = EmaFactory.createFilterList(); filterList.add( EmaFactory.createFilterEntry().elementList( EmaRdm.SERVICE_GROUP_ID, FilterEntry.FilterAction.SET, serviceGroupId ) ); Map map = EmaFactory.createMap(); map.add( EmaFactory.createMapEntry().keyUInt(1, MapEntry.MapAction.UPDATE, filterList)); provider.submit( EmaFactory.createUpdateMsg().domainType( EmaRdm.MMT_DIRECTORY ). filter( EmaRdm.SERVICE_GROUP_FILTER ). payload( map ), 0); // use 0 item handle to fanout to all subscribers }
@Test public void testDataDictionary_ExtractDictionaryType() { TestUtilities.printTestHead("testDataDictionary_ExtractDictionaryType()","Test to extract dictionary type from dictionary payload's summary data.\n"); int dictionaryType = 5; Series series = EmaFactory.createSeries(); ElementList summaryData = EmaFactory.createElementList(); summaryData.add(EmaFactory.createElementEntry().buffer("Version", ByteBuffer.wrap("40.20".getBytes()))); summaryData.add(EmaFactory.createElementEntry().uintValue("Type", dictionaryType)); summaryData.add(EmaFactory.createElementEntry().intValue("DictionaryId", 5)); series.summaryData(summaryData).totalCountHint(0).add(EmaFactory.createSeriesEntry().elementList(EmaFactory.createElementList())); TestUtilities.checkResult(EmaFactory.createDataDictionary().extractDictionaryType(series) == dictionaryType, "DataDictionary.extractDictionaryType()"); }
authenticationExtended.put("".getBytes()); authenticationExtended.flip(); encodedElementList.add(EmaFactory.createElementEntry().buffer(EmaRdm.ENAME_AUTHN_EXTENDED_RESP, authenticationExtended)); encodedElementList.add(EmaFactory.createElementEntry().ascii(EmaRdm.ENAME_AUTHN_ERRORTEXT, ""));
checkResult( ee15.load().dataType() == DataTypes.BUFFER, "ElementEntry.load().dataType() == DataTypes.BUFFER" ); checkResult( ee15.code() == DataCode.NO_CODE, "ElementEntry::code() == DataCode.NO_CODE" ); checkResult( Arrays.equals(ee15.buffer().buffer().array() , new String("ABCDEFGH").getBytes()), "ElementEntry.buffer()");
encodedElementList.add(EmaFactory.createElementEntry().buffer(EmaRdm.ENAME_AUTHN_EXTENDED, authenticationExtended));
elEnc.add(EmaFactory.createElementEntry().buffer( "MY_BUFFER", ByteBuffer.wrap("ABCDEFGH".getBytes()))); TestUtilities.checkResult("ElementList.toString() == toString() not supported", elEnc.toString().equals("\nDecoding of just encoded object in the same application is not supported\n")); TestUtilities.checkResult("ElementEntry.load().dataType()== DataTypes.BUFFER", ee16.load().dataType()== DataTypes.BUFFER ); TestUtilities.checkResult("ElementEntry.code() ==Data.DataCode.NO_CODE", ee16.code() ==Data.DataCode.NO_CODE); TestUtilities.checkResult("ElementEntry.buffer()", Arrays.equals(ee16.buffer().buffer().array(), new String("ABCDEFGH").getBytes())); elEnc.add(EmaFactory.createElementEntry().buffer( "MY_BUFFER",ByteBuffer.wrap("ABCDEFGH".getBytes()))); TestUtilities.checkResult("ElementEntry.load().dataType()== DataTypes.BUFFER", ee16.load().dataType()== DataTypes.BUFFER ); TestUtilities.checkResult("ElementEntry.code() ==Data.DataCode.NO_CODE", ee16.code() ==Data.DataCode.NO_CODE); TestUtilities.checkResult("ElementEntry.buffer()", Arrays.equals(ee16.buffer().buffer().array() , new String("ABCDEFGH").getBytes()) );
el.add(EmaFactory.createElementEntry().buffer("Element - Buffer", value));
_elementList.add(EmaFactory.createElementEntry().buffer(EmaRdm.ENAME_AUTHN_EXTENDED, _authenticationExtended));
authenticationExtended(elementEntry.buffer().buffer());
authenticationExtendedResp(elementEntry.buffer().buffer());
_elementList.add(EmaFactory.createElementEntry().buffer(EmaRdm.ENAME_AUTHN_EXTENDED, _authenticationExtendedResp));
authenticationExtended.put("authenticationExtended".getBytes()); authenticationExtended.flip(); encodedElementList.add(EmaFactory.createElementEntry().buffer(EmaRdm.ENAME_AUTHN_EXTENDED, authenticationExtended));
case EmaRdm.ENAME_AUTHN_EXTENDED: assertEquals(authenticationExtended, elementEntry.buffer().buffer());
case EmaRdm.ENAME_AUTHN_EXTENDED: assertEquals(authenticationExtended, elementEntry.buffer().buffer());
authenticationExtended.put("authenticationExtended".getBytes()); authenticationExtended.flip(); encodedElementList.add(EmaFactory.createElementEntry().buffer(EmaRdm.ENAME_AUTHN_EXTENDED_RESP, authenticationExtended)); encodedElementList.add(EmaFactory.createElementEntry().uintValue(EmaRdm.ENAME_AUTHN_TT_REISSUE, 2)); encodedElementList.add(EmaFactory.createElementEntry().uintValue(EmaRdm.ENAME_AUTHN_ERRORCODE, 3));