Class: LIS::InterfaceServer
- Inherits:
-
Object
- Object
- LIS::InterfaceServer
- Defined in:
- lib/lis/interface_server.rb
Instance Method Summary (collapse)
-
- (InterfaceServer) initialize(port, http_endpoint)
constructor
A new instance of InterfaceServer.
- - (Object) run!
Constructor Details
- (InterfaceServer) initialize(port, http_endpoint)
A new instance of InterfaceServer
3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/lis/interface_server.rb', line 3 def initialize(port, http_endpoint) @server = PacketIO::IOListener.new(port) @packets = LIS::Transfer::ASTM::E1394.new(@server) app_protocol = LIS::Transfer::ApplicationProtocol.new(@packets) interface = WorklistManagerInterface.new(http_endpoint) app_protocol.on_request do |device_name, | interface.load_requests(device_name, ) end app_protocol.on_result do |*args| interface.send_result(*args) end end |
Instance Method Details
- (Object) run!
18 19 20 21 |
# File 'lib/lis/interface_server.rb', line 18 def run! warn "listener started" if $VERBOSE @server.run! end |