Class EntityRef<M>

  • All Implemented Interfaces:
    RecipientRef<M>
    Direct Known Subclasses:
    EntityRefImpl

    public abstract class EntityRef<M>
    extends java.lang.Object
    implements RecipientRef<M>
    Send a message to the entity referenced by this EntityRef using *at-most-once* messaging semantics.
    • Constructor Detail

      • EntityRef

        public EntityRef()
    • Method Detail

      • asScala

        public EntityRef<M> asScala()
        INTERNAL API
        Returns:
        (undocumented)
      • ask

        public abstract <U> java.util.concurrent.CompletionStage<U> ask​(Function<ActorRef<U>,​M> message,
                                                                        Timeout timeout)
        Allows to "ask" the EntityRef for a reply. See AskPattern for a complete write-up of this pattern

        Note that if you are inside of an actor you should prefer akka.actor.typed.javadsl.ActorContext.ask as that provides better safety.

        Parameters:
        message - (undocumented)
        timeout - (undocumented)
        Returns:
        (undocumented)
      • tell

        public abstract void tell​(M msg)
        Description copied from interface: RecipientRef
        Send a message to the destination referenced by this RecipientRef using *at-most-once* messaging semantics.
        Specified by:
        tell in interface RecipientRef<M>
        Parameters:
        msg - (undocumented)