org.indi.server
Class Dispatcher

java.lang.Object
  extended by org.indi.reactor.BasicQueueHandler
      extended by org.indi.server.Dispatcher
All Implemented Interfaces:
org.indi.reactor.QueueHandler

public class Dispatcher
extends org.indi.reactor.BasicQueueHandler

Dipatches the parsed indi messages from the client to the device drivers. The messages are received from the parsing thread via a queue.

Author:
Dirk Hünniger

Constructor Summary
Dispatcher(java.util.Queue<java.lang.Object> queue, IndiServer server)
          class consturctor
 
Method Summary
 void onRead(java.lang.Object o)
          called by the reactor whenever a new element is in the queue waiting to be dispatched
 
Methods inherited from class org.indi.reactor.BasicQueueHandler
getQueue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Dispatcher

public Dispatcher(java.util.Queue<java.lang.Object> queue,
                  IndiServer server)
class consturctor

Parameters:
queue - a queue to receive the parsed messages from the parsing thread
server - the indiserver knowing about the drivers to dispach the received objects to.
Method Detail

onRead

public void onRead(java.lang.Object o)
called by the reactor whenever a new element is in the queue waiting to be dispatched

Specified by:
onRead in interface org.indi.reactor.QueueHandler
Overrides:
onRead in class org.indi.reactor.BasicQueueHandler
Parameters:
o - the object to be dispachted


Copyright © 2008. All Rights Reserved.