C# Class Burrow.Internal.ManagedConnectionFactory

A simple wrapper of ConnectionFactory which will store any created IConnection to memory and share them within the AppDomain. The purpose of this is keeping the amount of connection to RabbitMQ server as low as possible
Inheritance: RabbitMQ.Client.ConnectionFactory
Show file Open project: vanthoainguyen/Burrow.NET Class Usage Examples

Public Methods

Method Description
CreateConnection ( ) : IConnection
CreateFromConnectionFactory ( ConnectionFactory connectionFactory ) : ManagedConnectionFactory

Create a ManagedConnectionFactory from a known ConnectionFactory

ManagedConnectionFactory ( ) : System

Initialize a ManagedConnectionFactory

ManagedConnectionFactory ( ConnectionFactory factory ) : System

Create a ManagedConnectionFactory from a known ConnectionFactory

ManagedConnectionFactory ( ConnectionString connectionString ) : System

Initialize a ManagedConnectionFactory from a ConnectionString object

Private Methods

Method Description
CloseAllConnections ( ) : void
ConnectionShutdown ( object sender, RabbitMQ.Client.ShutdownEventArgs reason ) : void
EstablishConnection ( ) : IConnection
SaveConnection ( IConnection connection ) : void

Method Details

CreateConnection() public final method

public final CreateConnection ( ) : IConnection
return IConnection

CreateFromConnectionFactory() public static method

Create a ManagedConnectionFactory from a known ConnectionFactory
public static CreateFromConnectionFactory ( ConnectionFactory connectionFactory ) : ManagedConnectionFactory
connectionFactory RabbitMQ.Client.ConnectionFactory
return ManagedConnectionFactory

ManagedConnectionFactory() public method

Initialize a ManagedConnectionFactory
public ManagedConnectionFactory ( ) : System
return System

ManagedConnectionFactory() public method

Create a ManagedConnectionFactory from a known ConnectionFactory
public ManagedConnectionFactory ( ConnectionFactory factory ) : System
factory RabbitMQ.Client.ConnectionFactory
return System

ManagedConnectionFactory() public method

Initialize a ManagedConnectionFactory from a ConnectionString object
public ManagedConnectionFactory ( ConnectionString connectionString ) : System
connectionString ConnectionString
return System