C# Класс RabbitMQ.Client.Impl.ConnectionBase

Наследование: IConnection
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
HandshakeTimeout int
m_appContinuation System.Threading.ManualResetEvent
m_callbackException CallbackExceptionEventHandler
m_clientProperties object>.IDictionary
m_closeReason RabbitMQ.Client.ShutdownEventArgs
m_closed bool
m_connectionBlocked ConnectionBlockedEventHandler
m_connectionShutdown ConnectionShutdownEventHandler
m_connectionUnblocked ConnectionUnblockedEventHandler
m_eventLock object
m_factory RabbitMQ.Client.ConnectionFactory
m_frameHandler IFrameHandler
m_frameMax uint
m_heartbeat ushort
m_heartbeatFrame Frame
m_heartbeatRead System.Threading.AutoResetEvent
m_heartbeatWrite System.Threading.AutoResetEvent
m_id System.Guid
m_knownHosts RabbitMQ.Client.AmqpTcpEndpoint[]
m_missedHeartbeats int
m_model0 ModelBase
m_running bool
m_serverProperties object>.IDictionary
m_session0 RabbitMQ.Client.Impl.MainSession
m_sessionManager RabbitMQ.Client.Impl.SessionManager
m_shutdownReport IList

Private Properties

Свойство Тип Описание
IDisposable void
NegotiatedMaxValue uint

Открытые методы

Метод Описание
Abort ( ) : void

API-side invocation of connection abort.

Abort ( int timeout ) : void

API-side invocation of connection abort with timeout.

Abort ( ushort reasonCode, string reasonText ) : void

API-side invocation of connection abort.

Abort ( ushort reasonCode, string reasonText, ShutdownInitiator initiator, int timeout ) : void
Abort ( ushort reasonCode, string reasonText, int timeout ) : void

API-side invocation of connection abort with timeout.

Close ( ) : void

API-side invocation of connection.close.

Close ( RabbitMQ.Client.ShutdownEventArgs reason ) : void
Close ( RabbitMQ.Client.ShutdownEventArgs reason, bool abort, int timeout ) : void

Try to close connection in a graceful way

Shutdown reason contains code and text assigned when closing the connection, as well as the information about what initiated the close

Abort flag, if true, signals to close the ongoing connection immediately and do not report any errors if it was already closed.

Timeout determines how much time internal close operations should be given to complete. Negative or Timeout.Infinite value mean infinity.

Close ( int timeout ) : void

API-side invocation of connection.close with timeout.

Close ( ushort reasonCode, string reasonText ) : void

API-side invocation of connection.close.

Close ( ushort reasonCode, string reasonText, int timeout ) : void

API-side invocation of connection.close with timeout.

ClosingLoop ( ) : void Loop only used while quiescing. Use only to cleanly close connection
ConnectionBase ( ConnectionFactory factory, bool insist, IFrameHandler frameHandler ) : System
ConnectionCloseWrapper ( ushort reasonCode, string reasonText ) : Command
CreateModel ( ) : IModel
CreateSession ( ) : ISession
CreateSession ( int channelNumber ) : ISession
DefaultClientProperties ( ) : object>.IDictionary
FinishClose ( ) : void
HandleConnectionBlocked ( string reason ) : void
HandleConnectionUnblocked ( ) : void
HandleDomainUnload ( object sender, EventArgs ea ) : void We need to close the socket, otherwise attempting to unload the domain could cause a CannotUnloadAppDomainException
HandleMainLoopException ( RabbitMQ.Client.ShutdownEventArgs reason ) : void
HardProtocolExceptionHandler ( RabbitMQ.Client.Impl.HardProtocolException hpe ) : bool
HeartbeatReadLoop ( ) : void
HeartbeatWriteLoop ( ) : void
InternalClose ( RabbitMQ.Client.ShutdownEventArgs reason ) : void
LogCloseError ( String error, Exception ex ) : void
MainLoop ( ) : void
MainLoopIteration ( ) : void
NotifyHeartbeatThread ( ) : void
NotifyReceivedCloseOk ( ) : void
OnCallbackException ( RabbitMQ.Client.Events.CallbackExceptionEventArgs args ) : void
OnConnectionBlocked ( RabbitMQ.Client.Events.ConnectionBlockedEventArgs args ) : void
OnConnectionUnblocked ( ) : void
OnShutdown ( ) : void

Broadcasts notification of the final shutdown of the connection.

Open ( bool insist ) : void
PrettyPrintShutdownReport ( ) : void
QuiesceChannel ( RabbitMQ.Client.Impl.SoftProtocolException pe ) : void

Sets the channel named in the SoftProtocolException into "quiescing mode", where we issue a channel.close and ignore everything except for subsequent channel.close messages and the channel.close-ok reply that should eventually arrive.

Since a well-behaved peer will not wait indefinitely before issuing the close-ok, we don't bother with a timeout here; compare this to the case of a connection.close-ok, where a timeout is necessary.

We need to send the close method and politely wait for a reply before marking the channel as available for reuse.

As soon as SoftProtocolException is detected, we should stop servicing ordinary application work, and should concentrate on bringing down the channel as quickly and gracefully as possible. The way this is done, as per the close-protocol, is to signal closure up the stack *before* sending the channel.close, by invoking ISession.Close. Once the upper layers have been signalled, we are free to do what we need to do to clean up and shut down the channel.

SetCloseReason ( RabbitMQ.Client.ShutdownEventArgs reason ) : bool
StartHeartbeatLoop ( ThreadStart loop, string name, bool useBackgroundThread ) : void
StartHeartbeatLoops ( bool useBackgroundThread ) : void
StartMainLoop ( bool useBackgroundThread ) : void
TerminateMainloop ( ) : void May be called more than once. Should therefore be idempotent.
ToString ( ) : string
WriteFrame ( Frame f ) : void

Защищенные методы

Метод Описание
ChannelCloseWrapper ( ushort reasonCode, string reasonText ) : Command
StartAndTune ( ) : void

Приватные методы

Метод Описание
IDisposable ( ) : void
NegotiatedMaxValue ( uint clientValue, uint serverValue ) : uint

Описание методов

Abort() публичный Метод

API-side invocation of connection abort.
public Abort ( ) : void
Результат void

Abort() публичный Метод

API-side invocation of connection abort with timeout.
public Abort ( int timeout ) : void
timeout int
Результат void

Abort() публичный Метод

API-side invocation of connection abort.
public Abort ( ushort reasonCode, string reasonText ) : void
reasonCode ushort
reasonText string
Результат void

Abort() публичный Метод

public Abort ( ushort reasonCode, string reasonText, ShutdownInitiator initiator, int timeout ) : void
reasonCode ushort
reasonText string
initiator ShutdownInitiator
timeout int
Результат void

Abort() публичный Метод

API-side invocation of connection abort with timeout.
public Abort ( ushort reasonCode, string reasonText, int timeout ) : void
reasonCode ushort
reasonText string
timeout int
Результат void

ChannelCloseWrapper() защищенный Метод

protected ChannelCloseWrapper ( ushort reasonCode, string reasonText ) : Command
reasonCode ushort
reasonText string
Результат Command

Close() публичный Метод

API-side invocation of connection.close.
public Close ( ) : void
Результат void

Close() публичный Метод

public Close ( RabbitMQ.Client.ShutdownEventArgs reason ) : void
reason RabbitMQ.Client.ShutdownEventArgs
Результат void

Close() публичный Метод

Try to close connection in a graceful way

Shutdown reason contains code and text assigned when closing the connection, as well as the information about what initiated the close

Abort flag, if true, signals to close the ongoing connection immediately and do not report any errors if it was already closed.

Timeout determines how much time internal close operations should be given to complete. Negative or Timeout.Infinite value mean infinity.

public Close ( RabbitMQ.Client.ShutdownEventArgs reason, bool abort, int timeout ) : void
reason RabbitMQ.Client.ShutdownEventArgs
abort bool
timeout int
Результат void

Close() публичный Метод

API-side invocation of connection.close with timeout.
public Close ( int timeout ) : void
timeout int
Результат void

Close() публичный Метод

API-side invocation of connection.close.
public Close ( ushort reasonCode, string reasonText ) : void
reasonCode ushort
reasonText string
Результат void

Close() публичный Метод

API-side invocation of connection.close with timeout.
public Close ( ushort reasonCode, string reasonText, int timeout ) : void
reasonCode ushort
reasonText string
timeout int
Результат void

ClosingLoop() публичный Метод

Loop only used while quiescing. Use only to cleanly close connection
public ClosingLoop ( ) : void
Результат void

ConnectionBase() публичный Метод

public ConnectionBase ( ConnectionFactory factory, bool insist, IFrameHandler frameHandler ) : System
factory RabbitMQ.Client.ConnectionFactory
insist bool
frameHandler IFrameHandler
Результат System

ConnectionCloseWrapper() публичный Метод

public ConnectionCloseWrapper ( ushort reasonCode, string reasonText ) : Command
reasonCode ushort
reasonText string
Результат Command

CreateModel() публичный Метод

public CreateModel ( ) : IModel
Результат IModel

CreateSession() публичный Метод

public CreateSession ( ) : ISession
Результат ISession

CreateSession() публичный Метод

public CreateSession ( int channelNumber ) : ISession
channelNumber int
Результат ISession

DefaultClientProperties() публичный статический Метод

public static DefaultClientProperties ( ) : object>.IDictionary
Результат object>.IDictionary

FinishClose() публичный Метод

public FinishClose ( ) : void
Результат void

HandleConnectionBlocked() публичный Метод

public HandleConnectionBlocked ( string reason ) : void
reason string
Результат void

HandleConnectionUnblocked() публичный Метод

public HandleConnectionUnblocked ( ) : void
Результат void

HandleDomainUnload() публичный Метод

We need to close the socket, otherwise attempting to unload the domain could cause a CannotUnloadAppDomainException
public HandleDomainUnload ( object sender, EventArgs ea ) : void
sender object
ea System.EventArgs
Результат void

HandleMainLoopException() публичный Метод

public HandleMainLoopException ( RabbitMQ.Client.ShutdownEventArgs reason ) : void
reason RabbitMQ.Client.ShutdownEventArgs
Результат void

HardProtocolExceptionHandler() публичный Метод

public HardProtocolExceptionHandler ( RabbitMQ.Client.Impl.HardProtocolException hpe ) : bool
hpe RabbitMQ.Client.Impl.HardProtocolException
Результат bool

HeartbeatReadLoop() публичный Метод

public HeartbeatReadLoop ( ) : void
Результат void

HeartbeatWriteLoop() публичный Метод

public HeartbeatWriteLoop ( ) : void
Результат void

InternalClose() публичный Метод

public InternalClose ( RabbitMQ.Client.ShutdownEventArgs reason ) : void
reason RabbitMQ.Client.ShutdownEventArgs
Результат void

LogCloseError() публичный Метод

public LogCloseError ( String error, Exception ex ) : void
error String
ex System.Exception
Результат void

MainLoop() публичный Метод

public MainLoop ( ) : void
Результат void

MainLoopIteration() публичный Метод

public MainLoopIteration ( ) : void
Результат void

NotifyHeartbeatThread() публичный Метод

public NotifyHeartbeatThread ( ) : void
Результат void

NotifyReceivedCloseOk() публичный Метод

public NotifyReceivedCloseOk ( ) : void
Результат void

OnCallbackException() публичный Метод

public OnCallbackException ( RabbitMQ.Client.Events.CallbackExceptionEventArgs args ) : void
args RabbitMQ.Client.Events.CallbackExceptionEventArgs
Результат void

OnConnectionBlocked() публичный Метод

public OnConnectionBlocked ( RabbitMQ.Client.Events.ConnectionBlockedEventArgs args ) : void
args RabbitMQ.Client.Events.ConnectionBlockedEventArgs
Результат void

OnConnectionUnblocked() публичный Метод

public OnConnectionUnblocked ( ) : void
Результат void

OnShutdown() публичный Метод

Broadcasts notification of the final shutdown of the connection.
public OnShutdown ( ) : void
Результат void

Open() публичный Метод

public Open ( bool insist ) : void
insist bool
Результат void

PrettyPrintShutdownReport() публичный Метод

public PrettyPrintShutdownReport ( ) : void
Результат void

QuiesceChannel() публичный Метод

Sets the channel named in the SoftProtocolException into "quiescing mode", where we issue a channel.close and ignore everything except for subsequent channel.close messages and the channel.close-ok reply that should eventually arrive.

Since a well-behaved peer will not wait indefinitely before issuing the close-ok, we don't bother with a timeout here; compare this to the case of a connection.close-ok, where a timeout is necessary.

We need to send the close method and politely wait for a reply before marking the channel as available for reuse.

As soon as SoftProtocolException is detected, we should stop servicing ordinary application work, and should concentrate on bringing down the channel as quickly and gracefully as possible. The way this is done, as per the close-protocol, is to signal closure up the stack *before* sending the channel.close, by invoking ISession.Close. Once the upper layers have been signalled, we are free to do what we need to do to clean up and shut down the channel.

public QuiesceChannel ( RabbitMQ.Client.Impl.SoftProtocolException pe ) : void
pe RabbitMQ.Client.Impl.SoftProtocolException
Результат void

SetCloseReason() публичный Метод

public SetCloseReason ( RabbitMQ.Client.ShutdownEventArgs reason ) : bool
reason RabbitMQ.Client.ShutdownEventArgs
Результат bool

StartAndTune() защищенный Метод

protected StartAndTune ( ) : void
Результат void

StartHeartbeatLoop() публичный Метод

public StartHeartbeatLoop ( ThreadStart loop, string name, bool useBackgroundThread ) : void
loop ThreadStart
name string
useBackgroundThread bool
Результат void

StartHeartbeatLoops() публичный Метод

public StartHeartbeatLoops ( bool useBackgroundThread ) : void
useBackgroundThread bool
Результат void

StartMainLoop() публичный Метод

public StartMainLoop ( bool useBackgroundThread ) : void
useBackgroundThread bool
Результат void

TerminateMainloop() публичный Метод

May be called more than once. Should therefore be idempotent.
public TerminateMainloop ( ) : void
Результат void

ToString() публичный Метод

public ToString ( ) : string
Результат string

WriteFrame() публичный Метод

public WriteFrame ( Frame f ) : void
f Frame
Результат void

Описание свойств

HandshakeTimeout публичное статическое свойство

Timeout used while waiting for AMQP handshaking to complete (milliseconds)
public static int HandshakeTimeout
Результат int

m_appContinuation публичное свойство

public ManualResetEvent,System.Threading m_appContinuation
Результат System.Threading.ManualResetEvent

m_callbackException публичное свойство

public CallbackExceptionEventHandler m_callbackException
Результат CallbackExceptionEventHandler

m_clientProperties публичное свойство

public IDictionary m_clientProperties
Результат object>.IDictionary

m_closeReason публичное свойство

public ShutdownEventArgs,RabbitMQ.Client m_closeReason
Результат RabbitMQ.Client.ShutdownEventArgs

m_closed публичное свойство

public bool m_closed
Результат bool

m_connectionBlocked публичное свойство

public ConnectionBlockedEventHandler m_connectionBlocked
Результат ConnectionBlockedEventHandler

m_connectionShutdown публичное свойство

public ConnectionShutdownEventHandler m_connectionShutdown
Результат ConnectionShutdownEventHandler

m_connectionUnblocked публичное свойство

public ConnectionUnblockedEventHandler m_connectionUnblocked
Результат ConnectionUnblockedEventHandler

m_eventLock публичное свойство

public object m_eventLock
Результат object

m_factory публичное свойство

public ConnectionFactory,RabbitMQ.Client m_factory
Результат RabbitMQ.Client.ConnectionFactory

m_frameHandler публичное свойство

public IFrameHandler m_frameHandler
Результат IFrameHandler

m_frameMax публичное свойство

public uint m_frameMax
Результат uint

m_heartbeat публичное свойство

public ushort m_heartbeat
Результат ushort

m_heartbeatFrame публичное свойство

Heartbeat frame for transmission. Reusable across connections.
public Frame,RabbitMQ.Client.Impl m_heartbeatFrame
Результат Frame

m_heartbeatRead публичное свойство

public AutoResetEvent,System.Threading m_heartbeatRead
Результат System.Threading.AutoResetEvent

m_heartbeatWrite публичное свойство

public AutoResetEvent,System.Threading m_heartbeatWrite
Результат System.Threading.AutoResetEvent

m_id публичное свойство

public Guid,System m_id
Результат System.Guid

m_knownHosts публичное свойство

public AmqpTcpEndpoint[],RabbitMQ.Client m_knownHosts
Результат RabbitMQ.Client.AmqpTcpEndpoint[]

m_missedHeartbeats публичное свойство

public int m_missedHeartbeats
Результат int

m_model0 публичное свойство

public ModelBase,RabbitMQ.Client.Impl m_model0
Результат ModelBase

m_running публичное свойство

public bool m_running
Результат bool

m_serverProperties публичное свойство

public IDictionary m_serverProperties
Результат object>.IDictionary

m_session0 публичное свойство

public MainSession,RabbitMQ.Client.Impl m_session0
Результат RabbitMQ.Client.Impl.MainSession

m_sessionManager публичное свойство

public SessionManager,RabbitMQ.Client.Impl m_sessionManager
Результат RabbitMQ.Client.Impl.SessionManager

m_shutdownReport публичное свойство

public IList m_shutdownReport
Результат IList