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.
5 6 7 |
# File 'lib/thrift/multiplexed_processor.rb', line 5 def initialize @actual_processors = {} end |
Instance Method Details
#process(iprot, oprot) ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/thrift/multiplexed_processor.rb', line 13 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
9 10 11 |
# File 'lib/thrift/multiplexed_processor.rb', line 9 def register_processor(service_name, processor) @actual_processors[service_name] = processor end |