Package gofer :: Package agent :: Module rmi :: Class Scheduler
[hide private]
[frames] | no frames]

Class Scheduler

source code

        object --+            
                 |            
threading._Verbose --+        
                     |        
      threading.Thread --+    
                         |    
   rmi.store.PendingThread --+
                             |
                            Scheduler

The pending request scheduler. Processes the pending queue.

Instance Methods [hide private]
 
__init__(self, plugins)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
dispatch(self, envelope)
Dispatch the specified envelope to plugin that provides the specified class.
source code
Plugin
findplugin(self, envelope)
Find the plugin that provides the class specified in the request embedded in the envelope.
source code
Producer
producer(self, url)
Find the cached producer by URL.
source code

Inherited from rmi.store.PendingThread: commit, run, stop

Inherited from threading.Thread: __repr__, getName, isAlive, isDaemon, is_alive, join, setDaemon, setName, start

Inherited from threading.Thread (private): _reset_internal_locks, _set_daemon, _set_ident

Inherited from threading._Verbose (private): _note

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __str__, __subclasshook__

Instance Variables [hide private]
list plugins
A collection of loaded plugins.
dict producers
A cache of AMQP producers.

Inherited from rmi.store.PendingThread: consumer, queue

Properties [hide private]

Inherited from threading.Thread: daemon, ident, name

Inherited from threading.Thread (private): _block

Inherited from object: __class__

Method Details [hide private]

__init__(self, plugins)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Parameters:
  • plugins (list) - A collection of loaded plugins.
Overrides: object.__init__

dispatch(self, envelope)

source code 

Dispatch the specified envelope to plugin that provides the specified class.

Parameters:
  • envelope (Envelope) - A gofer messaging envelope.
Overrides: rmi.store.PendingThread.dispatch

findplugin(self, envelope)

source code 

Find the plugin that provides the class specified in the request embedded in the envelope. Returns EmptyPlugin when not found.

Parameters:
  • envelope (Envelope) - A gofer messaging envelope.
Returns: Plugin
The appropriate plugin.

producer(self, url)

source code 

Find the cached producer by URL.

Parameters:
  • url (str) - The URL of the broker the request was received.
Returns: Producer
The appropriate producer.