public void Dispose() { if (fOut != null) { fOut.Dispose(); fOut = null; } }
/// <summary> /// Open the SIFResponseSender to send SIF_Response messages to a specific zone. /// </summary> /// <param name="zone">The zone to send messages to</param> /// <param name="sifRequestMsgId">The SIF_MsgId from the original SIF_Request message. /// You can obtain this by accessing the value returned from <see cref="OpenADK.Library.SifMessageInfo.MsgId"/> /// on the SIFMessageInfo parameter passed to the Publisher.onRequest /// method. NOTE: Do not call <see cref="OpenADK.Library.SifMessageInfo.SIFRequestMsgId"/> /// as it will return a <c>null</c> value and is only intended to be called /// on SIF_Response messages.</param> /// <param name="sifRequestSourceId">The SIF_SourceId from the original SIF_Request message. /// You can obtain this by accessing the value returned from <see cref="OpenADK.Library.SifMessageInfo.SourceId"/> /// on the SIFMessageInfo parameter passed to the Publisher.onRequest /// method.</param> /// <param name="sifVersion">The SIF_Version value from the original SIF_Request message. /// You can obtain this by accessing the value returned from <see cref="OpenADK.Library.SifMessageInfo.SIFRequestVersions"/> /// on the SIFMessageInfo parameter passed to the Publisher.onRequest /// method.</param> /// <param name="maxBufferSize">The SIF_MaxBufferSize value from the original SIF_Request. /// You can obtain this by accessing the value returned from <see cref="OpenADK.Library.SifMessageInfo.MaxBufferSize"/> /// on the SIFMessageInfo parameter passed to the Publisher.onRequest /// method.</param> /// <param name="query">An optional array of ElementDef constants, obtained or /// reconstructed from the <see cref="OpenADK.Library.Query.FieldRestrictions"/> /// property from the original SIF_Request, that identify the subset of SIF elements /// to include in the data objects written to SIF_Response messages. If this array /// is provided, data objects will only have those elements specified; otherwise /// data objects contain all of their elements.</param> /// <exception cref="System.ArgumentException">thrown if any of the parameter are invalid</exception> /// <exception cref="AdkException">thrown if an error occurs preparing the output stream</exception> public void Open( IZone zone, String sifRequestMsgId, String sifRequestSourceId, SifVersion sifVersion, int maxBufferSize, Query query) { fZone = zone; fOut = DataObjectOutputStreamImpl.NewInstance(); fOut.Initialize (zone, query, sifRequestSourceId, sifRequestMsgId, sifVersion, maxBufferSize); }
/// <summary> /// Open the SIFResponseSender to send SIF_Response messages to a specific zone. /// </summary> /// <param name="zone">The zone to send messages to</param> /// <param name="sifRequestMsgId">The SIF_MsgId from the original SIF_Request message. /// You can obtain this by accessing the value returned from <see cref="OpenADK.Library.SifMessageInfo.MsgId"/> /// on the SIFMessageInfo parameter passed to the Publisher.onRequest /// method. NOTE: Do not call <see cref="OpenADK.Library.SifMessageInfo.SIFRequestMsgId"/> /// as it will return a <c>null</c> value and is only intended to be called /// on SIF_Response messages.</param> /// <param name="sifRequestSourceId">The SIF_SourceId from the original SIF_Request message. /// You can obtain this by accessing the value returned from <see cref="OpenADK.Library.SifMessageInfo.SourceId"/> /// on the SIFMessageInfo parameter passed to the Publisher.onRequest /// method.</param> /// <param name="sifVersion">The SIF_Version value from the original SIF_Request message. /// You can obtain this by accessing the value returned from <see cref="OpenADK.Library.SifMessageInfo.SIFRequestVersions"/> /// on the SIFMessageInfo parameter passed to the Publisher.onRequest /// method.</param> /// <param name="maxBufferSize">The SIF_MaxBufferSize value from the original SIF_Request. /// You can obtain this by accessing the value returned from <see cref="OpenADK.Library.SifMessageInfo.MaxBufferSize"/> /// on the SIFMessageInfo parameter passed to the Publisher.onRequest /// method.</param> /// <param name="fieldRestrictions">An optional array of ElementDef constants, obtained or /// reconstructed from the <see cref="OpenADK.Library.Query.FieldRestrictions"/> /// property from the original SIF_Request, that identify the subset of SIF elements /// to include in the data objects written to SIF_Response messages. If this array /// is provided, data objects will only have those elements specified; otherwise /// data objects contain all of their elements.</param> /// <exception cref="System.ArgumentException">thrown if any of the parameter are invalid</exception> /// <exception cref="AdkException">thrown if an error occurs preparing the output stream</exception> public void Open( IZone zone, String sifRequestMsgId, String sifRequestSourceId, SifVersion sifVersion, int maxBufferSize, IElementDef [] fieldRestrictions) { fZone = zone; fOut = DataObjectOutputStreamImpl.NewInstance(); fOut.Initialize (zone, fieldRestrictions, sifRequestSourceId, sifRequestMsgId, sifVersion, maxBufferSize); }