Inheritance: InterfacedActorRef, IActorBoundChannel, IActorBoundChannel_NoReply
Example #1
0
 public static async Task <IRequestTarget> BindActorOrOpenChannel(
     this ActorBoundChannelRef channel, IActorRef actor, TaggedType[] types, ActorBindingFlags bindingFlags,
     string gatewayName, object tag, ActorBindingFlags bindingFlagsForOpenChannel)
 {
     if (string.IsNullOrEmpty(gatewayName) || (channel != null && channel.CastToIActorRef().Path.Address == actor.Path.Address))
     {
         // link an actor to channel directly
         return(await channel.BindActor(actor, types, bindingFlags));
     }
     else
     {
         // grant client to access an actor via gateway
         var gatewayRef = ((InternalActorRefBase)actor).Provider.ResolveActorRef(actor.Path.Root / "user" / gatewayName);
         var gateway    = new ActorBoundGatewayRef(new AkkaReceiverTarget(gatewayRef));
         return(await gateway.WithTimeout(TimeSpan.FromSeconds(10)).OpenChannel(actor, types, tag, bindingFlagsForOpenChannel));
     }
 }
 public EntryActor(ActorBoundChannelRef channel)
 {
     _channel = channel;
 }
Example #3
0
 void IActorBoundChannelObserver.ChannelClose(IActorBoundChannel channel, object tag)
 {
     _channel = null;
 }
Example #4
0
 void IActorBoundChannelObserver.ChannelOpen(IActorBoundChannel channel, object tag)
 {
     _channel = (ActorBoundChannelRef)channel;
 }
Example #5
0
 public static Task <IRequestTarget> BindActorOrOpenChannel(
     this ActorBoundChannelRef channel, IActorRef actor, TaggedType[] types, ActorBindingFlags bindingFlags,
     string gatewayName, object tag)
 {
     return(BindActorOrOpenChannel(channel, actor, types, bindingFlags, gatewayName, tag, bindingFlags));
 }
Example #6
0
 public UserLoginActor(ClusterNodeContext clusterContext, ActorBoundChannelRef channel, EndPoint clientRemoteEndPoint)
 {
     _logger = LogManager.GetLogger($"UserLoginActor({clientRemoteEndPoint})");
     _clusterContext = clusterContext;
     _channel = channel;
 }
 public EntryActor(EntryActorEnvironment environment, ActorBoundChannelRef channel)
 {
     _environment = environment;
     _channel = channel.WithRequestWaiter(this);
 }
 public UserLoginActor(IActorRef actorBoundChannel)
 {
     _actorBoundChannel = actorBoundChannel.Cast<ActorBoundChannelRef>().WithRequestWaiter(this);
 }