Beispiel #1
0
        public IncomingEntry ReturnMessage(ComplianceMessage message)
        {
            IncomingEntry incomingEntry = this.GetIncomingEntry(message, true);

            incomingEntry.CompleteOutgoingEntry(message);
            return(incomingEntry);
        }
Beispiel #2
0
        public IncomingEntry ReceiveMessage(ComplianceMessage message, out bool shouldProcess)
        {
            shouldProcess = true;
            message.ProtocolContext.Direction = ProtocolContext.MessageDirection.Incoming;
            IncomingEntry incomingEntry = this.GetIncomingEntry(message, false);

            if (incomingEntry != null)
            {
                if (incomingEntry.Status == IncomingEntry.IncomingEntryStatus.Processed)
                {
                    shouldProcess = false;
                }
                else if (incomingEntry.Status == IncomingEntry.IncomingEntryStatus.Completed)
                {
                    shouldProcess = false;
                    incomingEntry.RequestReissued();
                }
            }
            OutgoingEntry outgoingEntry = incomingEntry.ReturnOutgoingEntry(message);

            if (outgoingEntry != null && outgoingEntry.Status != OutgoingEntry.OutgoingEntryStatus.Completed)
            {
                message.ProtocolContext.Direction = ProtocolContext.MessageDirection.Return;
                if (!shouldProcess)
                {
                    shouldProcess = true;
                }
            }
            return(incomingEntry);
        }
Beispiel #3
0
        public OutgoingEntry SendMessage(ComplianceMessage message)
        {
            message.ProtocolContext.Direction = ProtocolContext.MessageDirection.Outgoing;
            IncomingEntry incomingEntry = this.GetIncomingEntry(message, true);

            return(incomingEntry.AddOutgoingEntry(message));
        }
Beispiel #4
0
        private IncomingEntry GetIncomingEntry(ComplianceMessage message, bool outbound)
        {
            if (!outbound && message.ComplianceMessageType == ComplianceMessageType.RecordResult)
            {
                outbound = true;
            }
            IncomingEntry incomingEntry = new IncomingEntry(message, outbound);

            return(incomingEntry.UpdateCache(RoutingCache.Instance.RoutingTable) as IncomingEntry);
        }
Beispiel #5
0
        public IncomingEntry ProcessedMessage(ComplianceMessage message)
        {
            IncomingEntry incomingEntry = this.GetIncomingEntry(message, false);

            if (message.ComplianceMessageType != ComplianceMessageType.RecordResult)
            {
                incomingEntry.Status = IncomingEntry.IncomingEntryStatus.Processed;
            }
            return(incomingEntry);
        }
Beispiel #6
0
        protected override void UpdateExistingEntry(Entry existing)
        {
            IncomingEntry incomingEntry = (IncomingEntry)existing;

            if (incomingEntry.Message == null && base.Message != null)
            {
                incomingEntry.Message = base.Message;
                incomingEntry.EvaluateState(false);
            }
        }
Beispiel #7
0
        public void DispatchedMessage(ComplianceMessage message)
        {
            IncomingEntry incomingEntry = message.ProtocolContext.DispatchData as IncomingEntry;

            if (incomingEntry != null)
            {
                incomingEntry.Status = IncomingEntry.IncomingEntryStatus.Completed;
                return;
            }
            OutgoingEntry outgoingEntry = message.ProtocolContext.DispatchData as OutgoingEntry;

            if (outgoingEntry != null)
            {
                outgoingEntry.Status = OutgoingEntry.OutgoingEntryStatus.Delivered;
            }
        }
Beispiel #8
0
        public void RecordResult(ComplianceMessage message, Func <ResultBase, ResultBase> commitFunction)
        {
            IncomingEntry incomingEntry = this.GetIncomingEntry(message, true);

            incomingEntry.RecordResult(message, commitFunction);
        }