Class: Thrift::BaseServer
- Inherits:
-
Object
- Object
- Thrift::BaseServer
- Defined in:
- lib/thrift/server/base_server.rb
Direct Known Subclasses
MongrelHTTPServer, NonblockingServer, SimpleServer, ThinHTTPServer, ThreadPoolServer, ThreadedServer
Instance Method Summary collapse
-
#initialize(processor, server_transport, transport_factory = nil, protocol_factory = nil) ⇒ BaseServer
constructor
A new instance of BaseServer.
- #serve ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(processor, server_transport, transport_factory = nil, protocol_factory = nil) ⇒ BaseServer
Returns a new instance of BaseServer.
22 23 24 25 26 27 |
# File 'lib/thrift/server/base_server.rb', line 22 def initialize(processor, server_transport, transport_factory=nil, protocol_factory=nil) @processor = processor @server_transport = server_transport @transport_factory = transport_factory ? transport_factory : Thrift::BaseTransportFactory.new @protocol_factory = protocol_factory ? protocol_factory : Thrift::BinaryProtocolFactory.new end |
Instance Method Details
#serve ⇒ Object
29 30 31 |
# File 'lib/thrift/server/base_server.rb', line 29 def serve raise NotImplementedError end |
#to_s ⇒ Object
33 34 35 |
# File 'lib/thrift/server/base_server.rb', line 33 def to_s "server(#{@protocol_factory.to_s}(#{@transport_factory.to_s}(#{@server_transport.to_s})))" end |