Class: Qpid::Proton::Terminus
- Inherits:
-
Object
- Object
- Qpid::Proton::Terminus
- Includes:
- Util::ErrorHandler, Util::SwigHelper
- Defined in:
- lib/core/terminus.rb
Overview
Represents an endpoint for an AMQP connection..
An AMQP terminus acts as either a source or a target for messages, but never as both. Every Link is associated iwth both a source and a target Terminus that is negotiated during link establishment.
A terminus is composed of an AMQP address along with a number of other properties defining the quality of service and behavior of the Link.
Constant Summary collapse
- UNSPECIFIED =
Indicates a non-existent source or target terminus.
Cproton::PN_UNSPECIFIED
- SOURCE =
Indicates a source for messages.
Cproton::PN_SOURCE
- TARGET =
Indicates a target for messages.
Cproton::PN_TARGET
- COORDINATOR =
A special target identifying a transaction coordinator.
Cproton::PN_COORDINATOR
- EXPIRE_WITH_LINK =
The terminus is orphaned when the parent link is closed.
Cproton::PN_EXPIRE_WITH_LINK
- EXPIRE_WITH_SESSION =
The terminus is orphaned whent he parent sessio is closed.
Cproton::PN_EXPIRE_WITH_SESSION
- EXPIRE_WITH_CONNECTION =
The terminus is orphaned when the parent connection is closed.
Cproton::PN_EXPIRE_WITH_CONNECTION
- EXPIRE_NEVER =
The terminus is never considered orphaned.
Cproton::PN_EXPIRE_NEVER
- NONDURABLE =
Indicates a non-durable Terminus.
Cproton::PN_NONDURABLE
- CONFIGURATION =
Indicates a Terminus with durably held configuration, but not the delivery state.
Cproton::PN_CONFIGURATION
- DELIVERIES =
Indicates a Terminus with both durably held configuration and durably held delivery states.
Cproton::PN_DELIVERIES
- DIST_MODE_UNSPECIFIED =
The behavior is defined by the nod.e
Cproton::PN_DIST_MODE_UNSPECIFIED
- DIST_MODE_COPY =
The receiver gets all messages.
Cproton::PN_DIST_MODE_COPY
- DIST_MODE_MOVE =
The receives compete for messages.
Cproton::PN_DIST_MODE_MOVE
- PROTON_METHOD_PREFIX =
"pn_terminus"
Instance Attribute Summary collapse
-
#address ⇒ String
The terminus address.
-
#distribution_mode ⇒ Fixnum
The distribution mode.
-
#durability ⇒ Fixnum
The durability mode of the terminus.
-
#dynamic? ⇒ Boolean
True if the terminus is dynamic.
-
#expiry_policy ⇒ Fixnum
The expiry policy.
- #impl ⇒ Object readonly
-
#timeout ⇒ Fixnum
The timeout period.
-
#type ⇒ Fixnum
The terminus type.
Instance Method Summary collapse
-
#capabilities ⇒ Data
Access and modify the AMQP capabilities data for the Terminus.
-
#copy(source) ⇒ Object
Copy another Terminus into this instance.
-
#filter ⇒ Data
Access and modify the AMQP filter set for the Terminus.
-
#initialize(impl) ⇒ Terminus
constructor
A new instance of Terminus.
-
#outcomes ⇒ Data
Access and modify the AMQP outcomes for the Terminus.
-
#properties ⇒ Data
Access and modify the AMQP properties data for the Terminus.
Methods included from Util::ErrorHandler
#can_raise_error, #check_for_error, #create_exception_handler_wrapper, included
Methods included from Util::SwigHelper
Constructor Details
#initialize(impl) ⇒ Terminus
Returns a new instance of Terminus.
144 145 146 |
# File 'lib/core/terminus.rb', line 144 def initialize(impl) @impl = impl end |
Instance Attribute Details
#address ⇒ String
Returns The terminus address.
88 |
# File 'lib/core/terminus.rb', line 88 proton_accessor :address |
#distribution_mode ⇒ Fixnum
Returns The distribution mode.
131 |
# File 'lib/core/terminus.rb', line 131 proton_accessor :distribution_mode |
#durability ⇒ Fixnum
Returns The durability mode of the terminus.
98 |
# File 'lib/core/terminus.rb', line 98 proton_accessor :durability |
#dynamic? ⇒ Boolean
Returns True if the terminus is dynamic.
121 |
# File 'lib/core/terminus.rb', line 121 proton_accessor :dynamic, :is_or_get => :is |
#expiry_policy ⇒ Fixnum
Returns The expiry policy.
109 |
# File 'lib/core/terminus.rb', line 109 proton_accessor :expiry_policy |
#impl ⇒ Object (readonly)
141 142 143 |
# File 'lib/core/terminus.rb', line 141 def impl @impl end |
#timeout ⇒ Fixnum
Returns The timeout period.
115 |
# File 'lib/core/terminus.rb', line 115 proton_accessor :timeout |
#type ⇒ Fixnum
Returns The terminus type.
82 |
# File 'lib/core/terminus.rb', line 82 proton_accessor :type |
Instance Method Details
#capabilities ⇒ Data
Access and modify the AMQP capabilities data for the Terminus.
This operation will return an instance of Data that is valid until the Terminus is freed due to its parent being freed. Any data contained in the object will be sent as the AMQP properties for the parent Terminus instance.
NOTE: this MUST take the form of a symbol keyed map to be valid.
174 175 176 |
# File 'lib/core/terminus.rb', line 174 def capabilities Data.new(Cproton.pn_terminus_capabilities(@impl)) end |
#copy(source) ⇒ Object
Copy another Terminus into this instance.
212 213 214 |
# File 'lib/core/terminus.rb', line 212 def copy(source) Cproton.pn_terminus_copy(@impl,source.impl) end |
#filter ⇒ Data
Access and modify the AMQP filter set for the Terminus.
This operation will return an instance of Data that is valid until the Terminus is freed due to its parent being freed. Any data contained in the object will be sent as the AMQP properties for the parent Terminus instance.
NOTE: this MUST take the form of a symbol keyed map to be valid.
204 205 206 |
# File 'lib/core/terminus.rb', line 204 def filter Data.new(Cproton.pn_terminus_filter(@impl)) end |
#outcomes ⇒ Data
Access and modify the AMQP outcomes for the Terminus.
This operaiton will return an instance of Data that is valid until the Terminus is freed due to its parent being freed. Any data contained in the object will be sent as the AMQP properties for the parent Terminus instance.
NOTE: this MUST take the form of a symbol keyed map to be valid.
189 190 191 |
# File 'lib/core/terminus.rb', line 189 def outcomes Data.new(Cproton.pn_terminus_outcomes(@impl)) end |
#properties ⇒ Data
Access and modify the AMQP properties data for the Terminus.
This operation will return an instance of Data that is valid until the Terminus is freed due to its parent being freed. Any data contained in the object will be sent as the AMQP properties for the parent Terminus instance.
NOTE: this MUST take the form of a symbol keyed map to be valid.
159 160 161 |
# File 'lib/core/terminus.rb', line 159 def properties Data.new(Cproton.pn_terminus_properties(@impl)) end |