_AwaitingResponse

Instances of this class track pending requests. They are managed by the Hub in the sendRequest() method.

Public variables:

id

The key that this object is stored under. The same id as is used in the matching Request and Response objects.

response

Allows us to store the response so that it can be returned to the caller.

threaded

A class level variable that is used to indicate whether we are using the threaded model or not.

Methods

__init__(self, id)

   def __init__(self, id):

Constructs a new instance using the given id.

getResponse(self)

   def getResponse(self):

Waits for a response to be received and then returns it.

responseReceived(self, response)

   def responseReceived(self, response):

Used to indicate that a response has been received and to set the response that was received. Any threads waiting on getResponse() will continue.