Class ConnectionListener
The connection listener accepts AMQP connections from an address.
Inherited Members
Namespace: Amqp.Listener
Assembly: Amqp.Net.dll
Syntax
public class ConnectionListener : ConnectionFactoryBase
Constructors
ConnectionListener(Address, IContainer)
Initializes the connection listener object.
Declaration
public ConnectionListener(Address address, IContainer container)
Parameters
| Type | Name | Description |
|---|---|---|
| Address | address | The address to listen on. |
| IContainer | container | The IContainer implementation to handle client requests. |
ConnectionListener(String, IContainer)
Initializes the connection listener object.
Declaration
public ConnectionListener(string address, IContainer container)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | address | The address to listen on. |
| IContainer | container | The IContainer implementation to handle client requests. |
ConnectionListener(Uri, String, IContainer)
Initializes the connection listener object.
Declaration
[Obsolete("Use ConnectionListener(string, IContainer) instead.")]
public ConnectionListener(Uri addressUri, string userInfo, IContainer container)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Uri | addressUri | The address Uri to listen on. |
| System.String | userInfo | The credentials for client authentication using SASL PLAIN mechanism. |
| IContainer | container | The IContainer implementation to handle client requests. |
Remarks
This constructor is deprecated. To set user info, use ConnectionListener.SASL.EnablePlainMechanism method after the connection listener is created.
Properties
Address
Gets the address the listener is listening on.
Declaration
public Address Address { get; }
Property Value
| Type | Description |
|---|---|
| Address |
Container
Gets the AMQP container.
Declaration
public IContainer Container { get; }
Property Value
| Type | Description |
|---|---|
| IContainer |
HandlerFactory
Gets or sets a factory that creates a IHandler for an accepted connection.
Declaration
public Func<ConnectionListener, IHandler> HandlerFactory { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Func<ConnectionListener, IHandler> |
SASL
Gets the SASL settings on the listener.
Declaration
public ConnectionListener.SaslSettings SASL { get; }
Property Value
| Type | Description |
|---|---|
| ConnectionListener.SaslSettings |
SSL
Gets the TLS/SSL settings on the listener.
Declaration
public ConnectionListener.SslSettings SSL { get; }
Property Value
| Type | Description |
|---|---|
| ConnectionListener.SslSettings |
Methods
Close()
Closes the listener.
Declaration
public void Close()
Open()
Opens the listener.
Declaration
public void Open()