Search Results for

    Show / Hide Table of Contents

    Class ListenerSupport

    This class adds IListeners capabilities to an actor.

    note

    ListenerReceive must be wired manually into the actor's OnReceive(object) method.

    Inheritance
    object
    ListenerSupport
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Akka.Routing
    Assembly: Akka.dll
    Syntax
    public class ListenerSupport

    Fields

    | Edit this page View Source

    Listeners

    The collection of registered listeners that is listening for messages from an actor.

    Declaration
    protected readonly HashSet<IActorRef> Listeners
    Field Value
    Type Description
    HashSet<IActorRef>

    Properties

    | Edit this page View Source

    ListenerReceive

    Retrieves the wiring needed to implement listening functionality.

    note

    This needs to be chained into the actor's OnReceive(object) method.

    Declaration
    public Receive ListenerReceive { get; }
    Property Value
    Type Description
    Receive

    Methods

    | Edit this page View Source

    Add(IActorRef)

    Adds the specified actor to the collection of registered listeners.

    Declaration
    public void Add(IActorRef actor)
    Parameters
    Type Name Description
    IActorRef actor

    The actor to add to the collection of registered listeners.

    | Edit this page View Source

    Gossip(object)

    Sends the supplied message to all registered listeners.

    note

    Messages sent this way use NoSender as the sender.

    Declaration
    public void Gossip(object message)
    Parameters
    Type Name Description
    object message

    The message sent to all registered listeners.

    | Edit this page View Source

    Gossip(object, IActorRef)

    Sends the supplied message to all registered listeners.

    Declaration
    public void Gossip(object message, IActorRef sender)
    Parameters
    Type Name Description
    object message

    The message sent to all registered listeners.

    IActorRef sender

    The actor that sends the message.

    | Edit this page View Source

    Remove(IActorRef)

    Removes the specified actor from the collection of registered listeners.

    Declaration
    public void Remove(IActorRef actor)
    Parameters
    Type Name Description
    IActorRef actor

    The actor to remove from the collection of registered listeners.

    Extension Methods

    ObjectExtensions.IsDefaultForType<T>(T)
    ObjectExtensions.AsOption<T>(T)
    Extensions.AsInstanceOf<T>(object)
    In this article
    • githubEdit this page
    • View Source
    Back to top
    Contribute
    • Project Chat
    • Discussion Forum
    • Source Code
    Support
    • Akka.NET Support Plans
    • Akka.NET Observability Tools
    • Akka.NET Training & Consulting
    Maintained By
    • Petabridge - The Akka.NET Company
    • Learn Akka.NET