예제 #1
0
 public ActorMessageEnvelope <P> Send <R, P>(ActorIdentity remoteActor, ActorMessageEnvelope <R> request)
 {
     return(Send <R, P>(remoteActor, request, TimeSpan.FromSeconds(30)));
 }
예제 #2
0
 public ActorMessageEnvelope <P> Send <R, P>(ActorIdentity remoteActor, ActorMessageEnvelope <R> request, TimeSpan timeout)
 {
     return(_localActor.SendMessage <R, P>(remoteActor, request, timeout));
 }
예제 #3
0
 public P Send <R, P>(ActorIdentity remoteActor, R request)
 {
     return(Send <R, P>(remoteActor, request, TimeSpan.FromSeconds(30)));
 }
예제 #4
0
 public void BeginSend <T>(ActorIdentity remoteActor, ActorMessageEnvelope <T> message)
 {
     _localActor.BeginSend(remoteActor, message);
 }
예제 #5
0
 public async Task ErrorFlowAsync(ActorIdentity currentActor, FlowInstanceId flowId, object payload, Exception exception, CancellationToken cancellationToken)
 {
     throw new NotImplementedException();
     //  var flowProxy = ActorProxy.Create<IFlowService>(new ActorId(flowId.Id), _flowServiceInfo.ServiceUri);
     // await flowProxy.ErrorFlowAsync(new ActorRequestContext(currentActor.ActorId, BaseFlowActor.ERROR_FLOW_ACTION_NAME, Guid.NewGuid().ToString()), flowId, BaseFlowActor.ERROR_FLOW_ACTION_NAME, null, exception, cancellationToken);
 }
예제 #6
0
 public Task ErrorStepAsync(ActorIdentity currentActor, FlowInstanceId flowId, Step step, object payload, Exception exception, CancellationToken cancellationToken)
 {
     throw new NotImplementedException();
 }
예제 #7
0
 public async Task CompleteStepAsync(ActorIdentity currentActor, FlowInstanceId flowId, Step step, object payload, CancellationToken cancellationToken)
 {
     throw new NotImplementedException();
     // var flowProxy = ActorProxy.Create<IFlowService>(new ActorId(flowId.Id), _flowServiceInfo.ServiceUri);
     // await flowProxy.SetCurrentStep(new ActorRequestContext(currentActor.ActorId, BaseFlowActor.SET_CURRENT_STEP_ACTION_NAME, Guid.NewGuid().ToString()), flowId, step, cancellationToken);
 }
예제 #8
0
 public IAsyncResult BeginSend <T>(ActorIdentity remoteActor, ActorMessageEnvelope <T> message, AsyncCallback callback, object state)
 {
     return(_localActor.BeginSend(remoteActor, message, callback, state));
 }
예제 #9
0
 public void RegisterService(ActorIdentity actor, Type serviceType, IEnumerable <string> tags)
 {
 }
예제 #10
0
 public void DeregisterService(ActorIdentity actor, Type serviceType)
 {
 }
 public Task ChainNextActorAsync <T>(ActorRequestContext nextActorRequestContext, T payload, ActorIdentity actorIdentity, CancellationToken cancellationToken)
 {
     return(ChainNextActorAsync(nextActorRequestContext, payload, typeof(T), actorIdentity, cancellationToken));
 }
        public async Task ChainNextActorAsync(ActorRequestContext nextActorRequestContext, object payload, Type typeOfPayload, ActorIdentity actorIdentity, CancellationToken cancellationToken)
        {
            if (actorIdentity?.ActorId == null || actorIdentity?.ActorServiceUri == null)
            {
                throw new ArgumentNullException($"MessagingActorClient failed at ChainNextActorAsync due to null of {nameof(actorIdentity)}. The client could not chain to next actor which is null.");
            }
            //put more logic on to the orchestration collection later. Now it is just get the single one
            var proxy = ActorProxy.Create <IBaseMessagingActor>(
                new ActorId(actorIdentity.ActorId),
                new Uri(actorIdentity.ActorServiceUri));

            var serializedPayload = _binaryMessageSerializer.SerializePayload(payload, typeOfPayload);
            await proxy.ChainProcessMessageAsync(nextActorRequestContext, serializedPayload, cancellationToken);
        }
예제 #13
0
 public void EndSend(ActorIdentity remoteActor, IAsyncResult asyncResult)
 {
     _localActor.EndSend(remoteActor, asyncResult);
 }
예제 #14
0
 private void OnOrderStatusChangedNotification(ActorIdentity remoteActor, ActorMessageEnvelope <OrderStatusChangedNotification> message)
 {
     _log.DebugFormat("OnOrderStatusChangedNotification, order changed, MessageID[{0}], CorrelationID[{1}].",
                      message.MessageID, message.CorrelationID);
 }
예제 #15
0
 public async Task CreateFlowAsync(ActorIdentity currentActor, FlowInstanceId flowId, StartFlowRequest startFlowRequest, CancellationToken cancellationToken)
 {
     throw new NotImplementedException();
     // var flowProxy = ActorProxy.Create<IFlowService>(new ActorId(flowId.Id), _flowServiceInfo.ServiceUri);
     //     await flowProxy.CreateFlowAsync(new ActorRequestContext(currentActor.ActorId, BaseFlowActor.CREATE_FLOW_ACTION_NAME, Guid.NewGuid().ToString()), startFlowRequest, cancellationToken);
 }
        public void Can_serialize_ActorIdentityWithoutActorRef()
        {
            var actorIdentity = new ActorIdentity("message", null);

            AssertEqual(actorIdentity);
        }
예제 #17
0
파일: RouteActor.cs 프로젝트: hhq365/Redola
 public void Send <T>(ActorIdentity remoteActor, ActorMessageEnvelope <T> message)
 {
     Send(remoteActor, message.ToBytes(this.Encoder));
 }