Class: Qpid::Proton::Terminus

Inherits:
Object
  • Object
show all
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
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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#addressString

Returns The terminus address.

Returns:

  • (String)

    The terminus address.



88
# File 'lib/core/terminus.rb', line 88

proton_accessor :address

#distribution_modeFixnum

Returns The distribution mode.

Returns:

  • (Fixnum)

    The distribution mode.

See Also:



131
# File 'lib/core/terminus.rb', line 131

proton_accessor :distribution_mode

#durabilityFixnum

Returns The durability mode of the terminus.

Returns:

  • (Fixnum)

    The durability mode of the terminus.

See Also:



98
# File 'lib/core/terminus.rb', line 98

proton_accessor :durability

#dynamic?Boolean

Returns True if the terminus is dynamic.

Returns:

  • (Boolean)

    True if the terminus is dynamic.



121
# File 'lib/core/terminus.rb', line 121

proton_accessor :dynamic, :is_or_get => :is

#expiry_policyFixnum

Returns The expiry policy.

Returns:

  • (Fixnum)

    The expiry policy.

See Also:



109
# File 'lib/core/terminus.rb', line 109

proton_accessor :expiry_policy

#timeoutFixnum

Returns The timeout period.

Returns:

  • (Fixnum)

    The timeout period.



115
# File 'lib/core/terminus.rb', line 115

proton_accessor :timeout

#typeFixnum

Returns The terminus type.

Returns:

  • (Fixnum)

    The terminus type.

See Also:



82
# File 'lib/core/terminus.rb', line 82

proton_accessor :type

Instance Method Details

#capabilitiesData

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.

Returns:

  • (Data)

    The terminus capabilities.



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.

Parameters:

  • source (Terminus)

    The source instance.



212
213
214
# File 'lib/core/terminus.rb', line 212

def copy(source)
  Cproton.pn_terminus_copy(@impl,source.impl)
end

#filterData

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.

Returns:

  • (Data)

    The terminus filter.



204
205
206
# File 'lib/core/terminus.rb', line 204

def filter
  Data.new(Cproton.pn_terminus_filter(@impl))
end

#outcomesData

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.

Returns:

  • (Data)

    The terminus outcomes.



189
190
191
# File 'lib/core/terminus.rb', line 189

def outcomes
  Data.new(Cproton.pn_terminus_outcomes(@impl))
end

#propertiesData

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.

Returns:

  • (Data)

    The terminus properties.



159
160
161
# File 'lib/core/terminus.rb', line 159

def properties
  Data.new(Cproton.pn_terminus_properties(@impl))
end