Package pulp :: Package server :: Package event :: Module dispatcher
[hide private]
[frames] | no frames]

Module dispatcher

source code

Contains QPID event classes.

Classes [hide private]
  Handler
Handler specification.
  EventDispatcher
The main event dispatcher.
  EventHandler
The event handler base class.
  DynLoader
A dynamic module loader.
Functions [hide private]
 
handler(entity)
Event handler decorator.
source code
 
inbound(action)
Event (inbound) method decorator.
source code
 
outbound(action)
Event (inbound) method decorator.
source code
 
event(subject)
The decorator for API methods.
source code
Variables [hide private]
  log = getLogger(__name__)
  mutex = Mutex()
  flags = EventFlags()
  _method = {}, {}
Function Details [hide private]

handler(entity)

source code 

Event handler decorator. Associate a handler class with an entity.

Parameters:
  • entity (str) - The entity part of an AMQP subject.

inbound(action)

source code 

Event (inbound) method decorator. Associate a handler method with an action.

Parameters:
  • action (str) - The action part of an AMQP subject.

outbound(action)

source code 

Event (inbound) method decorator. Associate a handler method with an action.

Parameters:
  • action (str) - The action part of an AMQP subject.

event(subject)

source code 

The decorator for API methods. Using the dispatcher, an event is resied when the method is invoked. The noevent param specifies whether an event should be raised. Used mostly by the inbound event handlers.

Parameters:
  • subject (str) - An AMQP subject form: <entity>.<action>.