Class: Thrift::MultiplexedProcessor
- Inherits:
-
Object
- Object
- Thrift::MultiplexedProcessor
- Defined in:
- lib/thrift/multiplexed_processor.rb
Instance Method Summary collapse
-
#initialize ⇒ MultiplexedProcessor
constructor
A new instance of MultiplexedProcessor.
- #process(iprot, oprot) ⇒ Object
- #register_processor(service_name, processor) ⇒ Object
Constructor Details
#initialize ⇒ MultiplexedProcessor
Returns a new instance of MultiplexedProcessor.
24 25 26 |
# File 'lib/thrift/multiplexed_processor.rb', line 24 def initialize @actual_processors = {} end |
Instance Method Details
#process(iprot, oprot) ⇒ Object
32 33 34 35 36 37 38 |
# File 'lib/thrift/multiplexed_processor.rb', line 32 def process(iprot, oprot) name, type, seqid = iprot. check_type(type) check_separator(name) service_name, method = name.split(':') processor(service_name).process(StoredMessageProtocol.new(iprot, [method, type, seqid]), oprot) end |
#register_processor(service_name, processor) ⇒ Object
28 29 30 |
# File 'lib/thrift/multiplexed_processor.rb', line 28 def register_processor(service_name, processor) @actual_processors[service_name] = processor end |