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; }
void IActorBoundChannelObserver.ChannelClose(IActorBoundChannel channel, object tag) { _channel = null; }
void IActorBoundChannelObserver.ChannelOpen(IActorBoundChannel channel, object tag) { _channel = (ActorBoundChannelRef)channel; }
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)); }
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); }