internal CommunicationsData RetrieveData(CNDCommunicationsEnvironment.Data.CommunicationsDataRequest datarequest) { P2PData dataResult = default(P2PData); dataResult = this._p2pPortClient.RetrieveData(datarequest.P2PDataRequest); CommunicationsData dataRetrieved = default(CommunicationsData); dataRetrieved = CommunicationsData.GetCommunicationsDataObject(datarequest.RemoteAddresseComponentName, datarequest.SenderComponentName, dataResult.DataName, dataResult.Value); return(dataRetrieved); }
public CommunicationsData RequestDataFromRemoteComponent(CNDCommunicationsEnvironment.Data.CommunicationsDataRequest dataRequest) { if (this._remoteHandlersContainer.ContainsHandlerForRemoteComponent(dataRequest.RemoteAddresseComponentName)) { RemoteComponentComunicationsHandler handler = this._remoteHandlersContainer.GetHandler(dataRequest.RemoteAddresseComponentName); return(handler.RetrieveData(dataRequest)); } else { RemoteComponentComunicationsHandler newhandler = this.GetRemoteHandlerForComponent(dataRequest.RemoteAddresseComponentName); this._remoteHandlersContainer.AddNewHandler(newhandler); return(newhandler.RetrieveData(dataRequest)); } }
public Services.P2PCommunicationsScheme.Data.P2PData RetrieveData(Services.P2PCommunicationsScheme.Data.P2PDataRequest request, int P2PPortNumber) { string adresseComponentName = System.Convert.ToString(request.GetRequestParameter("ADDRESSE_COMPONENT")); if (adresseComponentName == null) { throw (new Exception("Can\'t retrieve data because the parameter \'ADDRESSE_COMPONENT\' was missing in the request structure")); } string senderComponentName = System.Convert.ToString(request.GetRequestParameter("SENDER_COMPONENT")); if (senderComponentName == null) { throw (new Exception("Can\'t retrieve data because the parameter \'SENDER_COMPONENT\' was missing in the request structure")); } CNDCommunicationsEnvironment.Data.CommunicationsDataRequest commdDataRequest = new CNDCommunicationsEnvironment.Data.CommunicationsDataRequest(adresseComponentName, senderComponentName, System.Convert.ToString(request.RequestedDataName)); CommunicationsData dataResult = ((CNDCommunicationsEnvironment.Interfaces.IUseCNDCommunicationsScheme) this._componentOwner).RetrieveDataToRemoteComponent(commdDataRequest); P2PData resultData = P2PData.GetP2PDataObject(dataResult.P2PData.DataName, dataResult.P2PData.Value); return(resultData); }