Class: Thrift::HeaderTransportFactory
- Inherits:
-
BaseTransportFactory
- Object
- BaseTransportFactory
- Thrift::HeaderTransportFactory
- Defined in:
- lib/thrift/transport/header_transport.rb
Overview
Factory for creating HeaderTransport instances
Instance Method Summary collapse
- #get_transport(transport) ⇒ Object
-
#initialize(allowed_client_types = nil, default_protocol = HeaderSubprotocolID::BINARY) ⇒ HeaderTransportFactory
constructor
A new instance of HeaderTransportFactory.
- #to_s ⇒ Object
Constructor Details
#initialize(allowed_client_types = nil, default_protocol = HeaderSubprotocolID::BINARY) ⇒ HeaderTransportFactory
Returns a new instance of HeaderTransportFactory.
503 504 505 506 |
# File 'lib/thrift/transport/header_transport.rb', line 503 def initialize(allowed_client_types = nil, default_protocol = HeaderSubprotocolID::BINARY) @allowed_client_types = allowed_client_types @default_protocol = default_protocol end |
Instance Method Details
#get_transport(transport) ⇒ Object
508 509 510 |
# File 'lib/thrift/transport/header_transport.rb', line 508 def get_transport(transport) HeaderTransport.new(transport, @allowed_client_types, @default_protocol) end |
#to_s ⇒ Object
512 513 514 |
# File 'lib/thrift/transport/header_transport.rb', line 512 def to_s "header" end |