Class Link
The Link class represents an AMQP link.
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Amqp
Assembly: Amqp.Net.dll
Syntax
public abstract class Link : AmqpObject, ILink, IAmqpObject
Constructors
Link(Session, String, OnAttached)
Initializes the link.
Declaration
protected Link(Session session, string name, OnAttached onAttached)
Parameters
Type | Name | Description |
---|---|---|
Session | session | The session. |
System.String | name | The link name. |
OnAttached | onAttached | The callback to handle received attach. |
Properties
Handle
Gets the link handle.
Declaration
public uint Handle { get; }
Property Value
Type | Description |
---|---|
System.UInt32 |
LinkState
Gets the link state.
Declaration
public LinkState LinkState { get; }
Property Value
Type | Description |
---|---|
LinkState |
Name
Gets the link name.
Declaration
public string Name { get; }
Property Value
Type | Description |
---|---|
System.String |
Session
Gets the session where the link was created.
Declaration
public Session Session { get; }
Property Value
Type | Description |
---|---|
Session |
Methods
Detach(Error)
Detaches the link endpoint without closing it.
Declaration
public void Detach(Error error = null)
Parameters
Type | Name | Description |
---|---|---|
Error | error | The error causing a detach. |
Remarks
An exception will be thrown if the peer responded with an error or the link was closed instead of being detached.
DetachAsync(Error)
Detaches the link endpoint without closing it.
Declaration
public Task DetachAsync(Error error = null)
Parameters
Type | Name | Description |
---|---|---|
Error | error | The error causing a detach. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A Task for the asynchronous detach operation. |
Remarks
An exception will be thrown if the peer responded with an error or the link was closed instead of being detached.
OnAbort(Error)
Aborts the link.
Declaration
protected abstract void OnAbort(Error error)
Parameters
Type | Name | Description |
---|---|---|
Error | error | The Error for aborting the link. |
OnClose(Error)
Closes the link.
Declaration
protected override bool OnClose(Error error)
Parameters
Type | Name | Description |
---|---|---|
Error | error | The Error for closing the link. |
Returns
Type | Description |
---|---|
System.Boolean |