Class: IdService::Server
- Inherits:
-
Thrift::SimpleServer
- Object
- Thrift::SimpleServer
- IdService::Server
- Defined in:
- lib/id_service/server.rb
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Server
constructor
A new instance of Server.
Constructor Details
#initialize(options = {}) ⇒ Server
12 13 14 15 16 17 18 19 20 21 |
# File 'lib/id_service/server.rb', line 12 def initialize( = {}) .symbolize_keys! = .merge() @handler = IdGenerator.new() @processor = IdService::Processor.new(@handler) @server_transport = Thrift::ServerSocket.new([:hostname], [:port].to_s) @transport_factory = Thrift::BufferedTransportFactory.new() @protocol_factory = Thrift::BinaryProtocolFactory.new end |