switch(dictionaryMsg.rdmMsgType()) System.out.println("\nReceived Dictionary Close for StreamId " + dictionaryMsg.streamId()); dictionaryHandler.closeStream(dictionaryMsg.streamId()); break; default: System.out.println("\nReceived Unhandled Dictionary Msg Type: " + dictionaryMsg.rdmMsgType()); break;
static void verifyDictionaryMessage(DictionaryMsg dictionaryMsg) { assertEquals(DictionaryMsgType.REFRESH, dictionaryMsg.rdmMsgType()); }
_rdmDictionaryMsg.clear(); switch(msg.msgClass()) _rdmDictionaryMsg.rdmMsgType(DictionaryMsgType.REFRESH); break; case MsgClasses.STATUS: _rdmDictionaryMsg.rdmMsgType(DictionaryMsgType.STATUS); break; default: _watchlist.reactorChannel().minorVersion()); if ((ret = _rdmDictionaryMsg.decode(_dIter, msg)) < CodecReturnCodes.SUCCESS)
DictionaryRefresh dictionaryRefresh = null; _dictionaryMsg.clear(); switch (msg.msgClass()) if (reactorChannel.state() == State.UP && reactorChannel.role().type() == ReactorRoleTypes.CONSUMER && _dictionaryMsg.rdmMsgType() == DictionaryMsgType.REFRESH && ((ConsumerRole)reactorRole).dictionaryDownloadMode() == DictionaryDownloadModes.FIRST_AVAILABLE)
_dictionaryRefresh.streamId(dictionaryRequest.streamId()); _dictionaryRefresh.dictionaryType(Dictionary.Types.FIELD_DEFINITIONS); _dictionaryRefresh.dictionary(dataDictionary); temp.append("Successfully sent field dictionary type.") .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());
/** Copies a DictionaryMsg. */ public static void copyDictionaryMsg(DictionaryMsg srcMsg, DictionaryMsg destMsg) { switch(srcMsg.rdmMsgType()) { case REQUEST: destMsg.rdmMsgType(DictionaryMsgType.REQUEST); ((DictionaryRequest)srcMsg).copy((DictionaryRequest)destMsg); break; case CLOSE: destMsg.rdmMsgType(DictionaryMsgType.CLOSE); ((DictionaryClose)srcMsg).copy((DictionaryClose)destMsg); break; case REFRESH: destMsg.rdmMsgType(DictionaryMsgType.REFRESH); ((DictionaryRefresh)srcMsg).copy((DictionaryRefresh)destMsg); break; case STATUS: destMsg.rdmMsgType(DictionaryMsgType.STATUS); ((DictionaryStatus)srcMsg).copy((DictionaryStatus)destMsg); break; default: fail("Unknown DictionaryMsgType."); break; } } }
_dictionaryRefresh.streamId(dictionaryRequest.streamId()); _dictionaryRefresh.dictionaryType(Dictionary.Types.ENUM_TABLES); _dictionaryRefresh.dictionary(dataDictionary); temp.append("Successfully sent enumeration dictionary type.") .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());
switch (dictionaryMsg.rdmMsgType()) _dictionaryProvider.sendRequestRejectReactor(provSession.clientChannelInfo(), dictionaryMsg.streamId(), DictionaryRejectReason.UNKNOWN_DICTIONARY_NAME, event.errorInfo().error()); System.out.println("Received Dictionary Close for streamId " + dictionaryMsg.streamId()); break;
DictionaryMsgType msgType = event.rdmDictionaryMsg().rdmMsgType();
_dictionaryStatus.clear(); _dictionaryStatus.streamId(dictionaryRequest.streamId()); _dictionaryStatus.applyHasState(); _dictionaryStatus.state().dataState(DataStates.SUSPECT); .append(OmmLoggerClient.CR).append("Stream Id ").append(dictionaryRequest.streamId()) .append(OmmLoggerClient.CR).append("client handle ").append(clientSession.clientHandle().value()) .append(OmmLoggerClient.CR).append("Instance Name ").append(_ommServerBaseImpl.instanceName());
switch (dictionaryMsg.rdmMsgType()) .append(OmmLoggerClient.CR).append("Stream Id ").append(dictionaryMsg.streamId()) .append(OmmLoggerClient.CR).append("Client handle ").append(clientSession.clientHandle().value()) .append(OmmLoggerClient.CR).append("Instance Name ").append(_ommServerBaseImpl.instanceName()); .append(OmmLoggerClient.CR).append("Stream Id ").append(dictionaryMsg.streamId()) .append(OmmLoggerClient.CR).append("Client handle ").append(clientSession.clientHandle().value()) .append(OmmLoggerClient.CR).append("Instance Name ").append(_ommServerBaseImpl.instanceName()); temp.append("Rejected unhandled dictionary message type ").append(dictionaryMsg.rdmMsgType().toString()); temp.append(OmmLoggerClient.CR).append("Stream Id ").append(dictionaryMsg.streamId()) .append(OmmLoggerClient.CR).append("Client handle ").append(clientSession.clientHandle().value()) .append(OmmLoggerClient.CR).append("Instance Name ").append(_ommServerBaseImpl.instanceName());
DictionaryMsgType msgType = event.rdmDictionaryMsg().rdmMsgType();
int submitMsg(MsgBase rdmMsg, ReactorSubmitOptions submitOptions, ReactorErrorInfo errorInfo) { // block user from submitting anything other than login, directory and dictionary domains if (rdmMsg.domainType() != DomainTypes.LOGIN && rdmMsg.domainType() != DomainTypes.SOURCE && rdmMsg.domainType() != DomainTypes.DICTIONARY) { return _reactor.populateErrorInfo(errorInfo, ReactorReturnCodes.INVALID_USAGE, "Watchlist.submitMsg", "Cannot submit domain type " + DomainTypes.toString(rdmMsg.domainType()) + " to watchlist as RDM message."); } // convert to Codec message _tempMsg.clear(); convertRDMToCodecMsg(rdmMsg, _tempMsg); if (rdmMsg.domainType() == DomainTypes.DICTIONARY && ((DictionaryMsg)rdmMsg).rdmMsgType() == DictionaryMsgType.REQUEST && submitOptions.serviceName() != null) { // DictionaryRequest.serviceId is not optional. If a service name was provided, let that take precedence over // serviceId -- remove the serviceId from this message so that we don't get an error for having specified both. _tempMsg.msgKey().flags(_tempMsg.msgKey().flags() & ~MsgKeyFlags.HAS_SERVICE_ID); } // submit with method that takes Codec message as argument return submitMsg(_tempMsg, submitOptions, errorInfo); }