Reactor

This class allows user defined input/output systems to be plugged into the DOPY Hub's select loop.

This is an abstract base class.

Methods

fileno(self)

   def fileno(self):

Returns the file number to be used in the select() function to check for read, write, and error. i.e. returns the Reactor's "handle".

Must be implemented by derived classes.

handleError(self)

   def handleError(self):

This method will be called when the sslect() loop discovers that the reactor's handle is in an error state.

Must be implemented by derived classes.

handleRead(self)

   def handleRead(self):

This method will be called when the select() loop discovers that the reactor's handle is ready to read.

Must be implemented by derived classes.

handleWrite(self)

   def handleWrite(self):

This method will be called when the sslect() loop discovers that the reactor's handle is ready to write.

Must be implemented by derived classes.

notifyOnError(self)

   def notifyOnError(self):

This method returns true when the Reactor wants to be notified when its handle has an error condition. Will cause the handle to be included in the "error" list of the select().

Must be implemented by derived classes.

notifyWhenReadable(self)

   def notifyWhenReadable(self):

This method returns true when the Reactor wants to be notified when its handle is readable. Will cause the handle to be included in the "read" list of the select().

Must be implemented by derived classes.

notifyWhenWritable(self)

   def notifyWhenWritable(self):

This method returns true when the Reactor wants to be notified when its handle is writable. Will cause the handle to be included in the "write" list of the select().

Must be implemented by derived classes.