class Thrift::MongrelHTTPServer

Public Class Methods

new(processor, opts={}) click to toggle source
   # File lib/thrift/server/mongrel_http_server.rb
46 def initialize(processor, opts={})
47   Kernel.warn "[DEPRECATION WARNING] `Thrift::MongrelHTTPServer` is deprecated.  Please use `Thrift::ThinHTTPServer` instead."
48   port = opts[:port] || 80
49   ip = opts[:ip] || "0.0.0.0"
50   path = opts[:path] || ""
51   protocol_factory = opts[:protocol_factory] || BinaryProtocolFactory.new
52   @server = Mongrel::HttpServer.new ip, port
53   @server.register "/#{path}", Handler.new(processor, protocol_factory)
54 end

Public Instance Methods

serve() click to toggle source
   # File lib/thrift/server/mongrel_http_server.rb
56 def serve
57   @server.run.join
58 end