Sha256: a18f640843f528c2cae652a7e6df441f4ab305776479114a85fb38ac6eecf710
Contents?: true
Size: 950 Bytes
Versions: 3
Compression:
Stored size: 950 Bytes
Contents
module ASIR # !SLIDE # Message # # Encapsulate the Ruby message from the Client to be handled by the Service. class Message include AdditionalData, Identity, CodeMore attr_accessor :receiver, :receiver_class, :selector, :arguments, :block attr_accessor :result, :one_way def initialize r, s, a, b, p @receiver, @selector, @arguments = r, s, a @block = b if b @receiver_class = @receiver.class @one_way = p._one_way if p end def invoke! @result = Result.new(self, @receiver.__send__(@selector, *@arguments)) rescue *Error::Unforwardable.modules => exc @result = Result.new(self, nil, Error::Unforwardable.new(exc)) rescue ::Exception => exc @result = Result.new(self, nil, exc) end # Optional: Specifies the Numeric seconds or absolute Time for the Transport to delay the Message until actual invocation. attr_accessor :delay end # !SLIDE END end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
asir-1.2.11 | lib/asir/message.rb |
asir-1.2.10 | lib/asir/message.rb |
asir-1.2.9 | lib/asir/message.rb |