Class: Qpid::Proton::Sender
- Includes:
- Util::ErrorHandler
- Defined in:
- lib/core/sender.rb
Overview
The sending endpoint.
Constant Summary
Constants inherited from Link
Link::PROTON_METHOD_PREFIX, Link::RCV_FIRST, Link::RCV_SECOND, Link::SND_MIXED, Link::SND_SETTLED, Link::SND_UNSETTLED
Constants inherited from Endpoint
Endpoint::LOCAL_ACTIVE, Endpoint::LOCAL_CLOSED, Endpoint::LOCAL_MASK, Endpoint::LOCAL_UNINIT, Endpoint::REMOTE_ACTIVE, Endpoint::REMOTE_CLOSED, Endpoint::REMOTE_MASK, Endpoint::REMOTE_UNINIT
Instance Attribute Summary
Attributes inherited from Link
#available, #credit, #name, #queued, #receiver?, #remote_credit, #sender?, #state
Instance Method Summary collapse
- #delivery_tag ⇒ Object
-
#offered(n) ⇒ Object
Signals the availability of deliveries.
-
#send(object, tag = nil) ⇒ Fixnum
Sends the specified data to the remote endpoint.
-
#stream(bytes) ⇒ Object
Send the specified bytes as part of the current delivery.
Methods included from Util::ErrorHandler
#can_raise_error, #check_for_error, #create_exception_handler_wrapper, included
Methods inherited from Link
#==, #_local_condition, #_remote_condition, #advance, #close, #connection, #current, #delivery, #detach, #drained, #error, #initialize, #next, #open, #rcv_settle_mode, #rcv_settle_mode=, #remote_source, #remote_target, #session, #snd_settle_mode, #snd_settle_mode=, #source, #target, wrap
Methods included from Util::Wrapper
#impl, #impl=, included, registry
Methods included from Util::SwigHelper
Methods inherited from Endpoint
#_update_condition, #check_state, #handler, #handler=, #initialize, #local_active?, #local_closed?, #local_uninit?, #remote_active?, #remote_closed?, #remote_condition, #remote_uninit?, #transport
Methods included from Util::Engine
#condition_to_object, #data_to_object, #object_to_condition, #object_to_data, receive_message
Constructor Details
This class inherits a constructor from Qpid::Proton::Link
Instance Method Details
#delivery_tag ⇒ Object
67 68 69 70 71 72 |
# File 'lib/core/sender.rb', line 67 def delivery_tag @tag_count ||= 0 result = @tag_count.succ @tag_count = result return "#{result}" end |
#offered(n) ⇒ Object
Signals the availability of deliveries.
38 39 40 |
# File 'lib/core/sender.rb', line 38 def offered(n) Cproton.pn_link_offered(@impl, n) end |
#send(object, tag = nil) ⇒ Fixnum
Sends the specified data to the remote endpoint.
49 50 51 52 53 54 55 |
# File 'lib/core/sender.rb', line 49 def send(object, tag = nil) if object.respond_to? :proton_send object.proton_send(self, tag) else stream(object) end end |
#stream(bytes) ⇒ Object
Send the specified bytes as part of the current delivery.
63 64 65 |
# File 'lib/core/sender.rb', line 63 def stream(bytes) Cproton.pn_link_send(@impl, bytes) end |