Class Qpid::Proton::Connection
In: lib/core/connection.rb
Parent: Endpoint

An AMQP connection.

Methods

Included Modules

Util::Wrapper Util::Deprecation

Constants

PROTON_METHOD_PREFIX = "pn_connection"

Attributes

container  [R]  @return [Container] the container managing this connection

Public Class methods

@private

Public Instance methods

@private

Closes the local end of the connection. The remote end may or may not be closed. @param error [Condition] Optional error condition to send with the close.

@return [Connection] self

@return AMQP container ID advertised by the remote peer. To get the local container ID use {container} and {Container#id}

Returns the default session for this connection.

@return [Session] The session.

@return [Array<Symbol>] desired capabilities provided by the remote peer

Get the links on this connection. @overload each_link

  @yieldparam l [Link] pass each link to block

@overload each_link

  @return [Enumerator] enumerator over links

Get the {Receiver} links - see {each_link}

Get the {Sender} links - see {each_link}

Get the sessions on this connection. @overload each_session

  @yieldparam s [Session] pass each session to block

@overload each_session

  @return [Enumerator] enumerator over sessions

@deprecated use {condition}

Idle-timeout advertised by the remote peer, in seconds. @return [Numeric] Idle-timeout advertised by the remote peer, in seconds. @return [nil] if the peer does not advertise an idle time-out

@deprecated use {each_link}

@private Generate a unique link name, internal use only.

Maximum frame size, in bytes, advertised by the remote peer. See {Connection#open :max_frame_size} @return [Integer] maximum frame size @return [nil] no limit

Session limit advertised by the remote peer. See {Connection#open :max_sessions} @return [Integer] maximum number of sessions per connection allowed by remote peer. @return [nil] no specific limit is set.

@return [Array<Symbol>] offered capabilities provided by the remote peer

Open the local end of the connection.

@option opts [MessagingHandler] :handler handler for events related to this connection.

@option opts [String] :user User name for authentication @option opts [String] :password Authentication secret @option opts [String] :virtual_host Virtual host name @option opts [String] :container_id (provided by {Container}) override advertised container-id

@option opts [Hash<Symbol=>Object>] :properties Application-defined properties @option opts [Array<Symbol>] :offered_capabilities Extensions the endpoint supports @option opts [Array<Symbol>] :desired_capabilities Extensions the endpoint can use

@option opts [Numeric] :idle_timeout Seconds before closing an idle connection @option opts [Integer] :max_sessions Limit the number of active sessions @option opts [Integer] :max_frame_size Limit the size of AMQP frames

@option opts [Boolean] :sasl_enabled (false) Enable or disable SASL. @option opts [Boolean] :sasl_allow_insecure_mechs (false) Allow mechanisms send secrets in clear text @option opts [String] :sasl_allowed_mechs SASL mechanisms allowed by this end of the connection

@option opts [SSLDomain] :ssl_domain SSL configuration domain.

Open a sender on the default_session @option opts (see Session#open_sender)

Open a new session on this connection.

@deprecated no replacement

@return [Hash] connection-properties provided by the remote peer

@deprecated no replacement

Gets the endpoint current state flags

@see Endpoint#LOCAL_UNINIT @see Endpoint#LOCAL_ACTIVE @see Endpoint#LOCAL_CLOSED @see Endpoint#LOCAL_MASK

@return [Integer] The state flags.

@return [Transport, nil] transport bound to this connection, or nil if unbound.

@return [String] User name used for authentication (outgoing connection) or the authenticated user name (incoming connection)

@return [String] The AMQP hostname for the connection.

@deprecated use {MessagingHandler} to handle work

Protected Instance methods

[Validate]