Package AccessGrid :: Module EventServiceAsynch :: Class ConnectionHandler
[show private | hide private]
[frames | no frames]

Class ConnectionHandler


The ConnectionHandler is the object that handles a single event connection. The ConnectionHandler gets events from the client then passes them to registered callback functions based on event.eventType.


Method Summary
  __init__(self, lsocket, eservice)
  __del__(self)
  acceptCallback(self, arg, handle, result)
  GetId(self)
  handleData(self, pdata, event)
We have successfully read a data packet.
  handleEOF(self)
We either got an EOF on the connection, or some other fatal error occurred (split these probably!).
  readCallback(self, arg, handle, result, buf, n)
  readCallbackWrap(self, arg, handle, result, buf, n)
Asynch read callback.
  registerAccept(self, attr)
  registerForRead(self)
  stop(self)
  writeMarshalledEvent(self, mEvent)
Write this packet to the network.

Method Details

handleData(self, pdata, event)

We have successfully read a data packet.

handleEOF(self)

We either got an EOF on the connection, or some other fatal error occurred (split these probably!).

Close the socket, and enqueue a "close" command.

readCallbackWrap(self, arg, handle, result, buf, n)

Asynch read callback.

We just use this to wrap the call to the readCallback itself, because the callback invocation mechanism silently ignores exceptions.

writeMarshalledEvent(self, mEvent)

Write this packet to the network. If the write fails for some reason, return 0. Otherwise, return 1.


Generated by Epydoc 2.1 on Thu Apr 14 16:39:28 2005 http://epydoc.sf.net