Class: DeepConnect::Event::IteratorCallBackReply

Inherits:
Reply show all
Defined in:
lib/deep-connect/event.rb

Direct Known Subclasses

IteratorCallBackReplyBreak

Instance Attribute Summary

Attributes inherited from Reply

#exp, #method, #result

Attributes inherited from Event

#receiver, #seq, #session

Instance Method Summary collapse

Methods inherited from Reply

#initialize, #inspect, materialize_sub, reply, #request?

Methods inherited from Event

#initialize, #inspect

Constructor Details

This class inherits a constructor from DeepConnect::Event::Reply

Instance Method Details

#serializeObject



456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
# File 'lib/deep-connect/event.rb', line 456

def serialize
	mspec = @session.deep_space.method_spec(@receiver, @method)
	if mspec && mspec.rets
	  if mspec.rets.kind_of?(Array)
	    rets = mspec.rets_zip(@result){|spec, ret|
 Reference.serialize_with_spec(@session.deep_space, ret, spec)
	    }
	    sel_result = [:VAL, "Array", [Array, rets]]
	  else
	    sel_result = Reference.serialize(@session.deep_space, @result, mspec.rets)
	  end
	else
	  sel_result = Reference.serialize(@session.deep_space, @result)
	end
	
	if @exp
	  [self.class, @seq, 
#	    Reference.serialize(@session.deep_space, @receiver),
	    nil,
	    @method,
	    sel_result,
	    Reference.serialize(@session.deep_space, @exp)]
	else
	  [self.class, @seq, 
#	    Reference.serialize(@session.deep_space, @receiver),
	    nil,
	    @method,
	    sel_result]
	end
end