Search Results for

    Show / Hide Table of Contents

    Class AssociationHandle

    A Service Provider Interface (SPI) layer for abstracting over logical links (associations) created by a Transport. Handles are responsible for providing an API for sending and receiving from the underlying channel.

    To register a listener for processing incoming payload data, the listener must be registered by completing the Task returned by ReadHandlerSource. Incoming data is not processed until this registration takes place.

    Inheritance
    object
    AssociationHandle
    AbstractTransportAdapterHandle
    TestAssociationHandle
    Inherited Members
    object.Equals(object, object)
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Akka.Remote.Transport
    Assembly: Akka.Remote.dll
    Syntax
    public abstract class AssociationHandle

    Constructors

    | Edit this page View Source

    AssociationHandle(Address, Address)

    Creates a handle to an association between two remote addresses.

    Declaration
    protected AssociationHandle(Address localAddress, Address remoteAddress)
    Parameters
    Type Name Description
    Address localAddress

    The local address to use.

    Address remoteAddress

    The remote address to use.

    Properties

    | Edit this page View Source

    LocalAddress

    Address of the local endpoint

    Declaration
    public Address LocalAddress { get; protected set; }
    Property Value
    Type Description
    Address
    | Edit this page View Source

    ReadHandlerSource

    The TaskCompletionSource returned by this call must be completed with an IHandleEventListener to register a listener responsible for handling the incoming payload. Until the listener is not registered the transport SHOULD buffer incoming messages.

    Declaration
    public TaskCompletionSource<IHandleEventListener> ReadHandlerSource { get; protected set; }
    Property Value
    Type Description
    TaskCompletionSource<IHandleEventListener>
    | Edit this page View Source

    RemoteAddress

    Address of the remote endpoint

    Declaration
    public Address RemoteAddress { get; protected set; }
    Property Value
    Type Description
    Address

    Methods

    | Edit this page View Source

    Disassociate()

    Closes the underlying transport link, if needed. Some transports might not need an explicit teardown (UDP) and some transports may not support it. Remote endpoint of the channel or connection MAY be notified, but this is not guaranteed.

    The transport that provides the handle MUST guarantee that Disassociate() could be called arbitrarily many times.

    Declaration
    [Obsolete("Use the method that states reasons to make sure disassociation reasons are logged.")]
    public abstract void Disassociate()
    | Edit this page View Source

    Disassociate(string, ILoggingAdapter)

    Closes the underlying transport link, if needed. Some transports might not need an explicit teardown (UDP) and some transports may not support it. Remote endpoint of the channel or connection MAY be notified, but this is not guaranteed.

    The transport that provides the handle MUST guarantee that Disassociate() could be called arbitrarily many times.

    Declaration
    public void Disassociate(string reason, ILoggingAdapter log)
    Parameters
    Type Name Description
    string reason
    ILoggingAdapter log
    | Edit this page View Source

    Equals(AssociationHandle)

    Declaration
    protected bool Equals(AssociationHandle other)
    Parameters
    Type Name Description
    AssociationHandle other
    Returns
    Type Description
    bool
    | Edit this page View Source

    Equals(object)

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    object obj
    Returns
    Type Description
    bool
    Overrides
    object.Equals(object)
    | Edit this page View Source

    GetHashCode()

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int
    Overrides
    object.GetHashCode()
    | Edit this page View Source

    Write(ByteString)

    Asynchronously sends the specified payload to the remote endpoint. This method's implementation MUST be thread-safe as it might be called from different threads. This method MUST NOT block.

    Writes guarantee ordering of messages, but not their reception. The call to write returns with a boolean indicating if the channel was ready for writes or not. A return value of false indicates that the channel is not yet ready for deliver (e.g.: the write buffer is full)and the sender needs to wait until the channel becomes ready again.

    Returning false also means that the current write was dropped (this MUST be guaranteed to ensure duplication-free delivery).

    Declaration
    public abstract bool Write(ByteString payload)
    Parameters
    Type Name Description
    ByteString payload

    The payload to be delivered to the remote endpoint.

    Returns
    Type Description
    bool

    Bool indicating the availability of the association for subsequent writes.

    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