Search Results for

    Show / Hide Table of Contents

    Class Router

    Implements a router - including:

    • The RoutingLogic
    • The Routees

    It's used internally by the routing system

    Inheritance
    object
    Router
    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 Router

    Constructors

    | Edit this page View Source

    Router(RoutingLogic, params Routee[])

    TBD

    Declaration
    public Router(RoutingLogic logic, params Routee[] routees)
    Parameters
    Type Name Description
    RoutingLogic logic

    TBD

    Routee[] routees

    TBD

    Properties

    | Edit this page View Source

    Routees

    The set of Routees that this router is currently targeting.

    Declaration
    public IEnumerable<Routee> Routees { get; }
    Property Value
    Type Description
    IEnumerable<Routee>
    | Edit this page View Source

    RoutingLogic

    The logic used to determine which Routee will process a given message.

    Declaration
    public RoutingLogic RoutingLogic { get; }
    Property Value
    Type Description
    RoutingLogic

    Methods

    | Edit this page View Source

    AddRoutee(ActorSelection)

    Create a new instance with one more routee and the same RoutingLogic.

    Declaration
    public Router AddRoutee(ActorSelection routee)
    Parameters
    Type Name Description
    ActorSelection routee

    TBD

    Returns
    Type Description
    Router

    TBD

    | Edit this page View Source

    AddRoutee(IActorRef)

    Create a new instance with one more routee and the same RoutingLogic.

    Declaration
    public Router AddRoutee(IActorRef routee)
    Parameters
    Type Name Description
    IActorRef routee

    TBD

    Returns
    Type Description
    Router

    TBD

    | Edit this page View Source

    AddRoutee(Routee)

    Create a new instance with one more routee and the same RoutingLogic.

    Declaration
    public virtual Router AddRoutee(Routee routee)
    Parameters
    Type Name Description
    Routee routee

    The routee to add.

    Returns
    Type Description
    Router

    A new Router instance with this routee added.

    | Edit this page View Source

    RemoveRoutee(ActorSelection)

    Create a new instance without the specified routee.

    Declaration
    public Router RemoveRoutee(ActorSelection routee)
    Parameters
    Type Name Description
    ActorSelection routee

    The ActorSelection routee to remove.

    Returns
    Type Description
    Router

    A new Router instance with this same configuration, sans routee.

    | Edit this page View Source

    RemoveRoutee(IActorRef)

    Create a new instance without the specified routee.

    Declaration
    public Router RemoveRoutee(IActorRef routee)
    Parameters
    Type Name Description
    IActorRef routee

    The IActorRef routee to remove.

    Returns
    Type Description
    Router

    A new Router instance with this same configuration, sans routee.

    | Edit this page View Source

    RemoveRoutee(Routee)

    Create a new instance without the specified routee.

    Declaration
    public virtual Router RemoveRoutee(Routee routee)
    Parameters
    Type Name Description
    Routee routee

    The routee to remove.

    Returns
    Type Description
    Router

    A new Router instance with this same configuration, sans routee.

    | Edit this page View Source

    Route(object, IActorRef)

    Uses the RoutingLogic to select an appropriate routee (or routees) and then delivers the message to them via Tell(object, IActorRef).

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

    The message to send.

    IActorRef sender

    The sender of this message - which will be propagated to the routee.

    | Edit this page View Source

    Send(Routee, object, IActorRef)

    Sends the message to the routee from the sender - and unwraps any special RouterEnvelopeS first so the routee only receives the intended message.

    Declaration
    protected virtual void Send(Routee routee, object message, IActorRef sender)
    Parameters
    Type Name Description
    Routee routee

    The routee who has been selected by the RoutingLogic.

    object message

    The message to send.

    IActorRef sender

    The sender of this message - which will be propagated to the routee.

    | Edit this page View Source

    UnWrap(object)

    Declaration
    protected object UnWrap(object message)
    Parameters
    Type Name Description
    object message
    Returns
    Type Description
    object
    | Edit this page View Source

    WithRoutees(params Routee[])

    Create a new instance with the specified routees and the same RoutingLogic.

    Declaration
    public virtual Router WithRoutees(params Routee[] routees)
    Parameters
    Type Name Description
    Routee[] routees

    The routees to add.

    Returns
    Type Description
    Router

    A new Router instance with these routees added.

    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