Example #1
0
 /// <summary>
 /// TBD
 /// </summary>
 /// <param name="recipient">TBD</param>
 /// <param name="recipientAddress">TBD</param>
 /// <param name="serializedMessage">TBD</param>
 /// <param name="senderOptional">TBD</param>
 /// <param name="seq">TBD</param>
 public Message(IInternalActorRef recipient, Address recipientAddress, SerializedMessage serializedMessage, IActorRef senderOptional = null, SeqNo seq = null)
 {
     Seq               = seq;
     SenderOptional    = senderOptional;
     SerializedMessage = serializedMessage;
     RecipientAddress  = recipientAddress;
     Recipient         = recipient;
 }
Example #2
0
        /// <summary>
        /// TBD
        /// </summary>
        /// <param name="localAddress">TBD</param>
        /// <param name="recipient">TBD</param>
        /// <param name="serializedMessage">TBD</param>
        /// <param name="senderOption">TBD</param>
        /// <param name="seqOption">TBD</param>
        /// <param name="ackOption">TBD</param>
        /// <returns>TBD</returns>
        public override ByteString ConstructMessage(Address localAddress, IActorRef recipient, SerializedMessage serializedMessage,
                                                    IActorRef senderOption = null, SeqNo seqOption = null, Ack ackOption = null)
        {
            var ackAndEnvelope = new AckAndEnvelopeContainer();
            var envelope       = new RemoteEnvelope()
            {
                Recipient = SerializeActorRef(recipient.Path.Address, recipient)
            };

            if (senderOption != null && senderOption.Path != null)
            {
                envelope.Sender = SerializeActorRef(localAddress, senderOption);
            }
            if (seqOption != null)
            {
                envelope.Seq = (ulong)seqOption.RawValue;
            }
            else
            {
                envelope.Seq = SeqUndefined;
            }
            if (ackOption != null)
            {
                ackAndEnvelope.Ack = AckBuilder(ackOption);
            }
            envelope.Message        = serializedMessage;
            ackAndEnvelope.Envelope = envelope;

            return(ackAndEnvelope.ToByteString());
        }
Example #3
0
 /// <summary>
 /// TBD
 /// </summary>
 /// <param name="localAddress">TBD</param>
 /// <param name="recipient">TBD</param>
 /// <param name="serializedMessage">TBD</param>
 /// <param name="senderOption">TBD</param>
 /// <param name="seqOption">TBD</param>
 /// <param name="ackOption">TBD</param>
 /// <returns>TBD</returns>
 public abstract ByteString ConstructMessage(Address localAddress, IActorRef recipient,
                                             SerializedMessage serializedMessage, IActorRef senderOption = null, SeqNo seqOption = null, Ack ackOption = null);