|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.indi.reactor.SimpleEventHandler
org.indi.reactor.OutputQueue
org.indi.server.ClientHandler
public class ClientHandler
A class to handle a connection to a single client
| Field Summary |
|---|
| Fields inherited from class org.indi.reactor.OutputQueue |
|---|
active, dead, queue |
| Fields inherited from class org.indi.reactor.SimpleEventHandler |
|---|
channel, reactor, registeredOperations |
| Constructor Summary | |
|---|---|
ClientHandler(org.indi.reactor.Reactor r,
java.nio.channels.SelectableChannel ch)
class constructor |
|
| Method Summary | |
|---|---|
boolean |
getVectorEnabled(org.indi.objects.Vector vec)
Checks whether a given indivector should be send to the client with respect to the blobenable configuration for the client. |
void |
onEnableBlob(org.indi.clientmessages.EnableBlob eb)
called when an enable blob message ist received from the client |
void |
onGetProperties(org.indi.clientmessages.GetProperties o)
called when a get properties message is received from the client |
void |
onRead()
|
void |
run()
start method parsing thread (run asynchornously) |
void |
send(org.indi.objects.Object object,
org.indi.objects.TransferType type,
java.lang.String message)
send a particular indiobject to the client |
void |
setQueue(java.util.Queue<java.lang.Object> queue)
set the queue to send parsed messages from the parsing thread to the device drivers |
| Methods inherited from class org.indi.reactor.OutputQueue |
|---|
close, isOpen, onClose, onWrite, write |
| Methods inherited from class org.indi.reactor.SimpleEventHandler |
|---|
channel, onAccept, onConnect, register |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ClientHandler(org.indi.reactor.Reactor r,
java.nio.channels.SelectableChannel ch)
throws java.io.IOException,
javax.xml.parsers.ParserConfigurationException,
org.xml.sax.SAXException
r - the reactor to register withch - the channel to communicate with the client
java.io.IOException
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException| Method Detail |
|---|
public void setQueue(java.util.Queue<java.lang.Object> queue)
queue - public void run()
run in interface java.lang.Runnable
public void onRead()
throws java.io.IOException
onRead in interface org.indi.reactor.EventHandleronRead in class org.indi.reactor.SimpleEventHandlerjava.io.IOExceptionpublic void onGetProperties(org.indi.clientmessages.GetProperties o)
o - public void onEnableBlob(org.indi.clientmessages.EnableBlob eb)
eb - the blobenable object describing the request of the
clientpublic boolean getVectorEnabled(org.indi.objects.Vector vec)
vec - the indivector to be checked
public void send(org.indi.objects.Object object,
org.indi.objects.TransferType type,
java.lang.String message)
object - the object to be sendtype - the way the obejct should be sendmessage - the message to be sent along wiht the object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||