Inheritance: InterfacedActorRef, IActorBoundChannel, IActorBoundChannel_NoReply
Exemplo n.º 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;
 }
Exemplo n.º 3
0
 void IActorBoundChannelObserver.ChannelClose(IActorBoundChannel channel, object tag)
 {
     _channel = null;
 }
Exemplo n.º 4
0
 void IActorBoundChannelObserver.ChannelOpen(IActorBoundChannel channel, object tag)
 {
     _channel = (ActorBoundChannelRef)channel;
 }
Exemplo n.º 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));
 }
Exemplo n.º 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);
 }
Exemplo n.º 8
0
 public UserLoginActor(IActorRef actorBoundChannel)
 {
     _actorBoundChannel = actorBoundChannel.Cast<ActorBoundChannelRef>().WithRequestWaiter(this);
 }