Class SimpleConnection
- Namespace
- Steeltoe.Messaging.RabbitMQ.Connection
- Assembly
- Steeltoe.Messaging.RabbitMQ.dll
public class SimpleConnection : IConnection, IDisposable, NetworkConnection
- Inheritance
-
SimpleConnection
- Implements
-
NetworkConnection
- Inherited Members
Constructors
SimpleConnection(IConnection, int, ILogger)
public SimpleConnection(IConnection connection, int closeTimeout, ILogger logger = null)
Parameters
Properties
Address
public string Address { get; }
Property Value
Connection
Gets the underlying RabbitMQ connection
public IConnection Connection { get; }
Property Value
- IConnection
IsOpen
Gets a value indicating whether the connection is open
public bool IsOpen { get; }
Property Value
LocalPort
Gets the local port of the connection
public int LocalPort { get; }
Property Value
Port
public int Port { get; }
Property Value
RemotePort
Remote port.
public int RemotePort { get; }
Property Value
Methods
AddBlockedListener(IBlockedListener)
Add a Blocked listener to the connection
public void AddBlockedListener(IBlockedListener listener)
Parameters
listener
IBlockedListenerthe listener to add
Close()
Close the connection
public void Close()
CreateChannel(bool)
Create a new channel, using an inernally allocated channel number
public IModel CreateChannel(bool transactional = false)
Parameters
transactional
booltrue if transaction support on channel
Returns
- IModel
the new channel
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
RemoveBlockedListener(IBlockedListener)
Remove a Blocked listener from the connection
public bool RemoveBlockedListener(IBlockedListener listener)
Parameters
listener
IBlockedListenerthe listener to remove
Returns
- bool
true if successful