Class: NSILapesi::FakeServer
- Inherits:
-
Object
- Object
- NSILapesi::FakeServer
show all
- Defined in:
- lib/nsi-lapesi/fake_server.rb
Defined Under Namespace
Classes: FakeIndexer, FakeSearcher
Class Method Summary
collapse
Class Method Details
.start ⇒ Object
21
22
23
24
25
26
27
28
|
# File 'lib/nsi-lapesi/fake_server.rb', line 21
def self.start
@thread = Thread.new do
server = XMLRPC::Server.new(8080)
server.add_handler("ImageIndexer", NSILapesi::FakeServer::FakeIndexer.new)
server.add_handler("ImageSearcher", NSILapesi::FakeServer::FakeSearcher.new)
server.serve
end
end
|
.stop ⇒ Object
30
31
32
|
# File 'lib/nsi-lapesi/fake_server.rb', line 30
def self.stop
@thread.kill
end
|