/** * The DictionaryClose to be sent to close the EnumType Dictionary stream. * This corresponds to the EnumType DictionaryRequest sent during the * connection establishment process. * * @return the dictionary close */ DictionaryClose rdmEnumDictionaryClose() { if (_enumDictionaryRequest == null) return null; if (_enumDictionaryClose == null) { _enumDictionaryClose = (DictionaryClose)DictionaryMsgFactory.createMsg(); _enumDictionaryClose.rdmMsgType(DictionaryMsgType.CLOSE); } _enumDictionaryClose.streamId(_enumDictionaryRequest.streamId()); return _enumDictionaryClose; }
/** * The DictionaryClose to be sent to close the Field Dictionary stream. * This corresponds to the Field DictionaryRequest sent during the * connection establishment process. * * @return the dictionary close */ DictionaryClose rdmFieldDictionaryClose() { if (_fieldDictionaryRequest == null) return null; if (_fieldDictionaryClose == null) { _fieldDictionaryClose = (DictionaryClose)DictionaryMsgFactory.createMsg(); _fieldDictionaryClose.rdmMsgType(DictionaryMsgType.CLOSE); } _fieldDictionaryClose.streamId(_fieldDictionaryRequest.streamId()); return _fieldDictionaryClose; }
@Test public void dictionaryCloseToStringTests() { DictionaryClose closeRDMMsg1 = (DictionaryClose)DictionaryMsgFactory.createMsg(); closeRDMMsg1.rdmMsgType(DictionaryMsgType.CLOSE); int streamId = -5; closeRDMMsg1.streamId(streamId); System.out.println("DictionaryClose toString coverage tests..."); assertNotNull(closeRDMMsg1.toString()); System.out.println("Done."); }
@Test public void dictionaryCloseCopyTests() { DictionaryClose closeRDMMsg1 = (DictionaryClose)DictionaryMsgFactory.createMsg(); DictionaryClose closeRDMMsg2 = (DictionaryClose)DictionaryMsgFactory.createMsg(); closeRDMMsg1.rdmMsgType(DictionaryMsgType.CLOSE); closeRDMMsg2.rdmMsgType(DictionaryMsgType.CLOSE); int streamId = -5; closeRDMMsg1.streamId(streamId); System.out.println("DictionaryClose copy tests..."); // deep copy int ret = closeRDMMsg1.copy(closeRDMMsg2); assertEquals(CodecReturnCodes.SUCCESS, ret); // verify deep copy assertEquals(closeRDMMsg1.streamId(), closeRDMMsg2.streamId()); System.out.println("Done."); }
/** * Instantiates a new dictionary handler. */ public DictionaryHandler() { _dictionary = CodecFactory.createDataDictionary(); _states = new State[2]; _states[0] = CodecFactory.createState(); _states[1] = CodecFactory.createState(); _dictionaryRequest = (DictionaryRequest)DictionaryMsgFactory.createMsg(); _dictionaryClose = (DictionaryClose)DictionaryMsgFactory.createMsg(); _dictionaryRefresh = (DictionaryRefresh)DictionaryMsgFactory.createMsg(); _dictionaryRefresh.rdmMsgType(DictionaryMsgType.REFRESH); _dictionaryRequest.rdmMsgType(DictionaryMsgType.REQUEST); _dictionaryClose.rdmMsgType(DictionaryMsgType.CLOSE); _encIter = CodecFactory.createEncodeIterator(); }
/** * Instantiates a new dictionary handler. */ public DictionaryHandler() { dictionary = CodecFactory.createDataDictionary(); states = new State[2]; states[0] = CodecFactory.createState(); states[1] = CodecFactory.createState(); dictionaryRequest = (DictionaryRequest)DictionaryMsgFactory.createMsg(); dictionaryClose = (DictionaryClose)DictionaryMsgFactory.createMsg(); dictionaryRefresh = (DictionaryRefresh)DictionaryMsgFactory.createMsg(); dictionaryRefresh.rdmMsgType(DictionaryMsgType.REFRESH); dictionaryRequest.rdmMsgType(DictionaryMsgType.REQUEST); dictionaryClose.rdmMsgType(DictionaryMsgType.CLOSE); encIter = CodecFactory.createEncodeIterator(); }
_dictionaryClose.rdmMsgType(DictionaryMsgType.CLOSE);
dictionaryClose.rdmMsgType(DictionaryMsgType.CLOSE);
@Test public void dictionaryCloseTests() { DictionaryClose encRDMMsg = (DictionaryClose)DictionaryMsgFactory.createMsg(); DictionaryClose decRDMMsg = (DictionaryClose)DictionaryMsgFactory.createMsg(); decRDMMsg.rdmMsgType(DictionaryMsgType.CLOSE); encRDMMsg.rdmMsgType(DictionaryMsgType.CLOSE); int streamId = -5; dIter.clear(); encIter.clear(); Buffer membuf = CodecFactory.createBuffer(); membuf.data(ByteBuffer.allocate(1024)); System.out.println("DictionaryClose tests..."); encRDMMsg.clear(); encRDMMsg.streamId(streamId); encIter.setBufferAndRWFVersion(membuf, Codec.majorVersion(), Codec.minorVersion()); int ret = encRDMMsg.encode(encIter); assertEquals(CodecReturnCodes.SUCCESS, ret); dIter.setBufferAndRWFVersion(membuf, Codec.majorVersion(), Codec.minorVersion()); ret = msg.decode(dIter); assertEquals(CodecReturnCodes.SUCCESS, ret); ret = decRDMMsg.decode(dIter, msg); assertEquals(CodecReturnCodes.SUCCESS, ret); assertEquals(streamId, decRDMMsg.streamId()); System.out.println("Done."); }
case MsgClasses.CLOSE: DictionaryClose dictionaryClose = (DictionaryClose)_dictionaryMsg; dictionaryClose.rdmMsgType(DictionaryMsgType.CLOSE); dictionaryClose.decode(dIter, msg); break;