_dictionaryRequest.clear(); _dictionaryRequest.dictionaryName().data(dictName); _dictionaryRequest.streamId(streamId); _dictionaryRequest.serviceId(serviceId); _dictionaryRequest.verbosity(Dictionary.VerbosityValues.NORMAL); ret = _dictionaryRequest.encode(_encodeIter); if (ret != CodecReturnCodes.SUCCESS)
streamId = (_enumDictionaryRequest.streamId() == 0 ? ENUM_DICTIONARY_STREAM_ID : _enumDictionaryRequest.streamId()); _enumDictionaryRequest.clear(); streamId == _fieldDictionaryRequest.streamId()) _enumDictionaryRequest.rdmMsgType(DictionaryMsgType.REQUEST); _enumDictionaryRequest.streamId(streamId); _enumDictionaryRequest.applyStreaming(); _enumDictionaryRequest.verbosity(Dictionary.VerbosityValues.NORMAL); _enumDictionaryRequest.dictionaryName(_enumTypeDictionaryName);
@Test public void dictionaryRequestCopyTests() { DictionaryRequest reqRDMMsg1 = (DictionaryRequest)DictionaryMsgFactory.createMsg(); reqRDMMsg1.rdmMsgType(DictionaryMsgType.REQUEST); reqRDMMsg1.applyStreaming(); DictionaryRequest reqRDMMsg2 = (DictionaryRequest)DictionaryMsgFactory.createMsg(); reqRDMMsg2.rdmMsgType(DictionaryMsgType.REQUEST); int streamId = -5; int serviceId = 273; int verbosity = Dictionary.VerbosityValues.VERBOSE; String dictionaryName = "RWFFld"; System.out.println("DictionaryRequest copy tests..."); reqRDMMsg1.rdmMsgType(DictionaryMsgType.REQUEST); reqRDMMsg1.streamId(streamId); reqRDMMsg1.serviceId(serviceId); reqRDMMsg1.verbosity(verbosity); reqRDMMsg1.dictionaryName().data(dictionaryName); reqRDMMsg1.applyStreaming(); int ret = reqRDMMsg1.copy(reqRDMMsg2); assertEquals(CodecReturnCodes.SUCCESS, ret); assertTrue(reqRDMMsg1.dictionaryName() != reqRDMMsg2.dictionaryName()); assertEquals(reqRDMMsg1.dictionaryName().toString(), reqRDMMsg2.dictionaryName().toString()); assertEquals(reqRDMMsg1.flags(), reqRDMMsg2.flags()); assertEquals(reqRDMMsg1.serviceId(), reqRDMMsg2.serviceId()); assertEquals(reqRDMMsg1.checkStreaming(), reqRDMMsg2.checkStreaming()); assertEquals(reqRDMMsg1.streamId(), reqRDMMsg2.streamId()); assertEquals(reqRDMMsg1.verbosity(), reqRDMMsg2.verbosity()); System.out.println("Done."); }
private void closeStream(int streamId) { // find original request information associated with streamId for (DictionaryRequestInfo dictionraryReqInfo : _dictionaryRequestInfoList) { if (dictionraryReqInfo.dictionaryRequest.streamId() == streamId && dictionraryReqInfo.isInUse) { // clear original request information System.out.println("Closing dictionary stream id " + dictionraryReqInfo.dictionaryRequest.streamId() + " with dictionary name: " + dictionraryReqInfo.dictionaryRequest.dictionaryName()); dictionraryReqInfo.clear(); break; } } }
dictRequestInfo.dictionaryRequest.streamId() == dictionaryRequest.streamId()) if (!dictionaryRequest.dictionaryName().equals(dictRequestInfo.dictionaryRequest.dictionaryName())) if(dictionaryRequest.copy(dictRequestInfo.dictionaryRequest) == CodecReturnCodes.FAILURE) return null;
encRDMMsg.rdmMsgType(DictionaryMsgType.REQUEST); DictionaryRequest decRDMMsg = (DictionaryRequest)DictionaryMsgFactory.createMsg(); decRDMMsg.rdmMsgType(DictionaryMsgType.REQUEST); encRDMMsg.clear(); encRDMMsg.streamId(streamId); encRDMMsg.flags(flags); encRDMMsg.serviceId(serviceId); encRDMMsg.verbosity(verbosity); encRDMMsg.dictionaryName().data(dictionaryName); if ((flags & DictionaryRequestFlags.STREAMING) != 0) assertTrue(encRDMMsg.checkStreaming()); int ret = encRDMMsg.encode(encIter); assertEquals(CodecReturnCodes.SUCCESS, ret); ret = msg.decode(dIter); assertEquals(CodecReturnCodes.SUCCESS, ret); ret = decRDMMsg.decode(dIter, msg); assertEquals(CodecReturnCodes.SUCCESS, ret); assertEquals(decRDMMsg.rdmMsgType(), DictionaryMsgType.REQUEST); assertEquals(encRDMMsg.streamId(), decRDMMsg.streamId()); assertEquals(encRDMMsg.serviceId(), decRDMMsg.serviceId()); assertEquals(encRDMMsg.verbosity(), decRDMMsg.verbosity()); assertTrue(encRDMMsg.dictionaryName().equals(decRDMMsg.dictionaryName()));
private void verifyDictionaryRequest(DictionaryRequest dictionaryRequest, int streamId, String name) { assertEquals(DictionaryMsgType.REQUEST, dictionaryRequest.rdmMsgType()); assertEquals(true, dictionaryRequest.checkStreaming()); assertEquals(Dictionary.VerbosityValues.NORMAL, dictionaryRequest.verbosity()); assertEquals(streamId, dictionaryRequest.streamId()); assertTrue(dictionaryRequest.dictionaryName().toString().equals(name)); }
_dictionaryRefresh.streamId(_dictionaryRequest.streamId()); _dictionaryRefresh.applySolicited(); _dictionaryRefresh.dictionaryType(Dictionary.Types.ENUM_TABLES); _dictionaryRefresh.dictionary(_dictionary); _dictionaryRefresh.verbosity(_dictionaryRequest.verbosity()); _dictionaryRefresh.dictionaryName().data(_dictionaryRequest.dictionaryName().data(), _dictionaryRequest.dictionaryName().position(), _dictionaryRequest.dictionaryName().length()); _dictionaryRefresh.applyRefreshComplete();
_dictionaryRefresh.dictionaryType(Dictionary.Types.FIELD_DEFINITIONS); _dictionaryRefresh.dictionary(dataDictionary); _dictionaryRefresh.verbosity(((DictionaryRequest)dictionaryRequest).verbosity()); _dictionaryRefresh.serviceId(((DictionaryRequest)dictionaryRequest).serviceId()); _dictionaryRefresh.dictionaryName(((DictionaryRequest)dictionaryRequest).dictionaryName()); _dictionaryRefresh.applySolicited(); .append(OmmLoggerClient.CR).append("Dictionary name ").append(((DictionaryRequest)dictionaryRequest).dictionaryName()) .append(OmmLoggerClient.CR).append("Stream Id ").append(dictionaryRequest.streamId()) .append(OmmLoggerClient.CR).append("Client handle ").append(clientSession.clientHandle().value());
public DictionaryRequestInfo() { dictionaryRequest = (DictionaryRequest) DictionaryMsgFactory.createMsg(); dictionaryRequest.rdmMsgType(DictionaryMsgType.REQUEST); channel = null; isInUse = false; }
_dictionaryRequest.clear(); int ret = _dictionaryRequest.decode(dIter, msg); if (ret != CodecReturnCodes.SUCCESS) System.out.println("Received Dictionary Request for DictionaryName: " + dictionaryRequestInfo.dictionaryRequest.dictionaryName()); if (FIELD_DICTIONARY_DOWNLOAD_NAME.equals(dictionaryRequestInfo.dictionaryRequest.dictionaryName())) else if (ENUM_TYPE_DOWNLOAD_NAME.equals(dictionaryRequestInfo.dictionaryRequest.dictionaryName()))
dictionaryRequest.rdmMsgType(DictionaryMsgType.REQUEST); dictionaryRequest.decode(dIter, msg); break; case MsgClasses.REFRESH: if (msg.streamId() == ((ConsumerRole)reactorRole).rdmFieldDictionaryRequest().streamId() && dictionaryRefresh != null && dictionaryRefresh.checkRefreshComplete()) if (msg.streamId() == ((ConsumerRole)reactorRole).rdmEnumDictionaryRequest().streamId() && dictionaryRefresh != null && dictionaryRefresh.checkRefreshComplete())
private boolean sendDictionaryResponse(ReactorChannel reactorChannel, DictionaryMsg dictionaryRequest, ReactorErrorInfo error) _dictionaryNameAndServiceId.append(((DictionaryRequest)dictionaryRequest).dictionaryName().toString()).append(((DictionaryRequest)dictionaryRequest).serviceId());
if (rsslDictRequest.checkStreaming()) rsslRequestMsg.applyStreaming(); msgKey.applyHasName(); msgKey.applyHasFilter(); msgKey.filter(rsslDictRequest.verbosity()); msgKey.name(rsslDictRequest.dictionaryName()); rsslRequestMsg.streamId(3); .append(rsslDictRequest.dictionaryName().toString()).append(OmmLoggerClient.CR) .append("from Service ").append(directory.serviceName()).append(OmmLoggerClient.CR) .append("on Channel ").append(OmmLoggerClient.CR) if (rsslEnumDictRequest.checkStreaming()) rsslRequestMsg.applyStreaming(); msgKey.applyHasName(); msgKey.applyHasFilter(); msgKey.filter(rsslEnumDictRequest.verbosity()); msgKey.name(rsslEnumDictRequest.dictionaryName()); rsslRequestMsg.streamId(4); .append(rsslDictRequest.dictionaryName().toString()).append(OmmLoggerClient.CR) .append("from Service ").append(directory.serviceName()).append(OmmLoggerClient.CR) .append("on Channel ").append(OmmLoggerClient.CR)
dictionaryRequest.rdmMsgType(DictionaryMsgType.REQUEST); dictionaryRequest.streamId(33); consumerRole.rdmFieldDictionaryRequest(dictionaryRequest); consumerRole.initDefaultRDMFieldDictionaryRequest(); verifyDictionaryRequest(consumerRole.rdmFieldDictionaryRequest(), 33, "RWFFld"); dictionaryRequest.streamId(0); consumerRole.rdmFieldDictionaryRequest(dictionaryRequest); consumerRole.initDefaultRDMFieldDictionaryRequest(); dictionaryRequest.streamId(ConsumerRole.DIRECTORY_STREAM_ID); consumerRole.rdmFieldDictionaryRequest(dictionaryRequest); consumerRole.initDefaultRDMFieldDictionaryRequest(); dictionaryRequest.rdmMsgType(DictionaryMsgType.REQUEST); dictionaryRequest.streamId(44); consumerRole.rdmEnumDictionaryRequest(dictionaryRequest); consumerRole.initDefaultRDMEnumDictionaryRequest(); dictionaryRequest.streamId(0); consumerRole.rdmEnumDictionaryRequest(dictionaryRequest); consumerRole.initDefaultRDMEnumDictionaryRequest(); dictionaryRequest.streamId(ConsumerRole.FIELD_DICTIONARY_STREAM_ID); consumerRole.rdmEnumDictionaryRequest(dictionaryRequest); consumerRole.initDefaultRDMEnumDictionaryRequest();
/** * Sends the dictionary close status message(s) for a channel. This consists * of finding all request information for this channel and sending the close * status messages to the channel. * * @param chnl - The channel to send close status message(s) to * @param error the error * @return {@link CodecReturnCodes} */ public int sendCloseStatusMsgs(Channel chnl, Error error) { int ret = 0; for (DictionaryRequestInfo dictionraryReqInfo : _dictionaryRequestInfoList) { if (dictionraryReqInfo.isInUse && dictionraryReqInfo.channel == chnl) { ret = sendCloseStatusMsg(chnl, dictionraryReqInfo.dictionaryRequest.streamId(), error); if (ret != CodecReturnCodes.SUCCESS) return ret; } } return CodecReturnCodes.SUCCESS; }
int ret = _dictionaryRequest.decode(dIter, msg); if (ret != CodecReturnCodes.SUCCESS) System.out.println("Received Dictionary Request for DictionaryName: " + _dictionaryRequest.dictionaryName()); if (fieldDictionaryDownloadName.equals(_dictionaryRequest.dictionaryName())) else if (enumTypeDictionaryDownloadName.equals(_dictionaryRequest.dictionaryName()))
_rsslFidDictReq.rdmMsgType(DictionaryMsgType.REQUEST); _rsslFidDictReq.applyStreaming(); _rsslEnumDictReq.rdmMsgType(DictionaryMsgType.REQUEST); _rsslEnumDictReq.applyStreaming();
dictionaryRequest.copy(_dictionaryProvider.dictionaryRequest()); System.out.println("Received Dictionary Request for DictionaryName: " + dictionaryRequest.dictionaryName()); if (_dictionaryProvider.fieldDictionaryDownloadName().equals(dictionaryRequest.dictionaryName())) else if (_dictionaryProvider.enumTypeDictionaryDownloadName().equals(dictionaryRequest.dictionaryName()))
boolean validateDictRequest() { if (_rsslFidDictReq != null && _rsslEnumDictReq != null) { if ((_fidDictReqServiceIdSet && _enumDictReqServiceIdSet && _rsslFidDictReq.serviceId() != _rsslEnumDictReq.serviceId()) || (_fidDictReqServiceName != null && !_fidDictReqServiceName.isEmpty() && _enumDictReqServiceName != null && !_enumDictReqServiceName.isEmpty() && !_fidDictReqServiceName.equals(_enumDictReqServiceName) )) { _rsslFidDictReq = null; _rsslEnumDictReq = null; return false; } } return true; }