Class | Qpid::Proton::Connection |
In: |
lib/core/connection.rb
|
Parent: | Endpoint |
A Connection option has at most one Qpid::Proton::Transport instance.
PROTON_METHOD_PREFIX | = | "pn_connection" | @private |
overrides | [RW] | |
session_policy | [RW] |
Constructs a new instance of Connection.
You do not need to provide the underlying C struct, as this is automatically generated as needed. The argument is a convenience for returning existing Connection objects.
@param impl [pn_connection_t] The pn_connection_t struct.
Closes the connection.
Once this operation has completed, the LOCAL_CLOSED state flag will be set.
Associates the connection with an event collector.
By doing this, key changes in the endpoint‘s state are reported to the connector via Event objects that can be inspected and processed.
Note that, by registering a collector, the user is requesting that an indefinite number of events be queued up on its behalf. This means that, unless the application eventual processes these events, the storage requirements for keeping them will grow without bound. So be careful and do not register a collector with a connection unless the application will process the events.
@param collector [Event::Collector] The event collector.
This method is used when working within the context of an event.
@return [Connection] The connection itself.
Returns the first link that matches the given state mask.
Examines the state of each link owned by the connection and returns the first that matches the given state mask. If the state mask contains both local and remote flags, then an exact match against those flags is performed. If the state mask contains only local or remote flags, then a match occurs if any of the local ore remote flags are set, respectively.
@param mask [Fixnum] The state mask to be matched.
@return [Link] The first matching link, or nil if none matched.
@see Endpoint#LOCAL_UNINIT @see Endpoint#LOCAL_ACTIVE @see Endpoint#LOCAL_CLOSED @see Endpoint#REMOTE_UNINIT @see Endpoint#REMOTE_ACTIVE @see Endpoint#REMOTE_CLOSED
Get the AMQP container name advertised by the remote connection endpoint.
This will return nil until the REMOTE_ACTIVE state is reached.
Any non-nil container returned by this operation will be valid until the connection is unbound from a transport, or freed, whichever happens sooner.
@return [String] The remote connection‘s AMQP container name.
@see container
Get the AMQP desired capabilities supplied by the remote connection endpoint.
The object returned is valid until the connection is freed. The Data object will be empty until the remote connection is opened, as indicated by the REMOTE_ACTIVE flag.
@return [Data] The desired capabilities.
Get the AMQP hostname set by the remote connection endpoint.
This will return nil until the REMOTE_ACTIVE state is reached.
@return [String] The remote connection‘s AMQP hostname.
@see hostname
Get the AMQP offered capabilities suppolied by the remote connection endpoint.
This object returned is valid until the connection is freed. The Data object will be empty until the remote connection is opened, as indicated by the REMOTE_ACTIVE flag.
@return [Data] The offered capabilities.
Get the AMQP connection properties supplie by the remote connection endpoint.
The object returned is valid until the connection is freed. The Data object will be empty until the remote connection is opened, as indicated by the REMOTE_ACTIVE flag.
@return [Data] The remote properties.
Returns the first session from the connection that matches the specified state mask.
Examines the state of each session owned by the connection, and returns the first session that matches the given state mask. If the state mask contains both local and remote flags, then an exact match against those flags is performed. If the state mask contains only local or remote flags, then a match occurs if a*any* of the local or remote flags are set, respectively.
@param mask [Fixnum] The state mask to be matched.
@return [Session] The first matching session, or nil if none matched.
@see Endpoint#LOCAL_UNINIT @see Endpoint#LOCAL_ACTIVE @see Endpoint#LOCAL_CLOSED @see Endpoint#REMOTE_UNINIT @see Endpoint#REMOTE_ACTIVE @see Endpoint#REMOTE_CLOSED
The Transport to which this connection is bound.
@return [Transport] The transport, or nil if the Connection is unbound.
Extracts the first delivery on the connection that has pending operations.
A readable delivery indicates message data is waiting to be read. A A writable delivery indcates that message data may be sent. An updated delivery indicates that the delivery‘s disposition has changed.
A delivery will never be both readable and writable, but it may be both readable or writable and updated.
@return [Delivery] The delivery, or nil if none are available.
@see Delivery#next