Table of Contents

Class AbstractConnectionFactory

Namespace
Steeltoe.Messaging.RabbitMQ.Connection
Assembly
Steeltoe.Messaging.RabbitMQ.dll
public abstract class AbstractConnectionFactory : IConnectionFactory, IDisposable, IServiceNameAware
Inheritance
AbstractConnectionFactory
Implements
Derived
Inherited Members

Constructors

AbstractConnectionFactory(IConnectionFactory, ILoggerFactory)

protected AbstractConnectionFactory(IConnectionFactory rabbitConnectionFactory, ILoggerFactory loggerFactory = null)

Parameters

rabbitConnectionFactory IConnectionFactory
loggerFactory ILoggerFactory

AbstractConnectionFactory(IConnectionFactory, AbstractConnectionFactory, ILoggerFactory)

protected AbstractConnectionFactory(IConnectionFactory rabbitConnectionFactory, AbstractConnectionFactory publisherConnectionFactory, ILoggerFactory loggerFactory = null)

Parameters

rabbitConnectionFactory IConnectionFactory
publisherConnectionFactory AbstractConnectionFactory
loggerFactory ILoggerFactory

Fields

DEFAULT_CLOSE_TIMEOUT

public const int DEFAULT_CLOSE_TIMEOUT = 30000

Field Value

int

_logger

protected readonly ILogger _logger

Field Value

ILogger

_loggerFactory

protected readonly ILoggerFactory _loggerFactory

Field Value

ILoggerFactory

_rabbitConnectionFactory

protected readonly IConnectionFactory _rabbitConnectionFactory

Field Value

IConnectionFactory

Properties

AbstractPublisherConnectionFactory

protected virtual AbstractConnectionFactory AbstractPublisherConnectionFactory { get; }

Property Value

AbstractConnectionFactory

Addresses

public virtual List<AmqpTcpEndpoint> Addresses { get; set; }

Property Value

List<AmqpTcpEndpoint>

BlockedListener

public virtual IBlockedListener BlockedListener { get; set; }

Property Value

IBlockedListener

ChannelListener

public virtual IChannelListener ChannelListener { get; }

Property Value

IChannelListener

CloseTimeout

public virtual int CloseTimeout { get; set; }

Property Value

int

ConnectionListener

public virtual IConnectionListener ConnectionListener { get; }

Property Value

IConnectionListener

ConnectionTimeout

public virtual int ConnectionTimeout { get; set; }

Property Value

int

HasPublisherConnectionFactory

public virtual bool HasPublisherConnectionFactory { get; }

Property Value

bool

Host

Gets the host name for the connection factory

public virtual string Host { get; set; }

Property Value

string

IsPublisherConfirms

Gets a value indicating whether if publisher confirms are enabled

public virtual bool IsPublisherConfirms { get; set; }

Property Value

bool

IsPublisherReturns

Gets a value indicating whether if publisher returns are enabled

public virtual bool IsPublisherReturns { get; set; }

Property Value

bool

IsSimplePublisherConfirms

Gets a value indicating whether if simple publisher confirms are enabled

public virtual bool IsSimplePublisherConfirms { get; set; }

Property Value

bool

Password

public virtual string Password { get; set; }

Property Value

string

Port

Gets the port number for this connection factory

public virtual int Port { get; set; }

Property Value

int

PublisherConnectionFactory

Gets the publisher connection factory that will be used;

public virtual IConnectionFactory PublisherConnectionFactory { get; protected set; }

Property Value

IConnectionFactory

RabbitConnectionFactory

public virtual ConnectionFactory RabbitConnectionFactory { get; }

Property Value

ConnectionFactory

RecoveryListener

public virtual IRecoveryListener RecoveryListener { get; set; }

Property Value

IRecoveryListener

RequestedHeartBeat

public virtual ushort RequestedHeartBeat { get; set; }

Property Value

ushort

ServiceName

public virtual string ServiceName { get; set; }

Property Value

string

ShuffleAddresses

public virtual bool ShuffleAddresses { get; set; }

Property Value

bool

Uri

public virtual Uri Uri { get; set; }

Property Value

Uri

Username

Gets the user name for the connection factory

public virtual string Username { get; set; }

Property Value

string

VirtualHost

Gets the virtual host name for the connection factory

public virtual string VirtualHost { get; set; }

Property Value

string

Methods

AddChannelListener(IChannelListener)

public virtual void AddChannelListener(IChannelListener listener)

Parameters

listener IChannelListener

AddConnectionListener(IConnectionListener)

Add a connection listener to this factory

public virtual void AddConnectionListener(IConnectionListener connectionListener)

Parameters

connectionListener IConnectionListener

the listener to add

ClearConnectionListeners()

Remove all connection listeners

public virtual void ClearConnectionListeners()

ConnectionShutdownCompleted(object, ShutdownEventArgs)

protected virtual void ConnectionShutdownCompleted(object sender, ShutdownEventArgs args)

Parameters

sender object
args ShutdownEventArgs

CreateBareConnection()

protected virtual IConnection CreateBareConnection()

Returns

IConnection

CreateConnection()

Create a connection

public abstract IConnection CreateConnection()

Returns

IConnection

the connection if successful

Destroy()

Close underlying shared connection. The factory is still able to create new connections after this call

public virtual void Destroy()

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public virtual void Dispose()

GetDefaultHostName()

protected virtual string GetDefaultHostName()

Returns

string

ObtainNewConnectionName()

protected virtual string ObtainNewConnectionName()

Returns

string

RemoveConnectionListener(IConnectionListener)

Remove a connection facotry from this factory

public virtual bool RemoveConnectionListener(IConnectionListener connectionListener)

Parameters

connectionListener IConnectionListener

the listener to remove

Returns

bool

true if removed

SetAddresses(string)

public virtual void SetAddresses(string addresses)

Parameters

addresses string

SetBlockedListener(IBlockedListener)

public virtual void SetBlockedListener(IBlockedListener blockedListener)

Parameters

blockedListener IBlockedListener

SetChannelListeners(List<IChannelListener>)

public virtual void SetChannelListeners(List<IChannelListener> listeners)

Parameters

listeners List<IChannelListener>

SetConnectionListeners(List<IConnectionListener>)

public virtual void SetConnectionListeners(List<IConnectionListener> listeners)

Parameters

listeners List<IConnectionListener>

SetRecoveryListener(IRecoveryListener)

public virtual void SetRecoveryListener(IRecoveryListener recoveryListener)

Parameters

recoveryListener IRecoveryListener

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.