Package pulp :: Package messaging :: Module consumer :: Class EventConsumer
[hide private]
[frames] | no frames]

Class EventConsumer

source code

endpoint.Endpoint --+    
                    |    
             Consumer --+
                        |
                       EventConsumer

An AMQP event consumer.

Instance Methods [hide private]
 
__init__(self, subject=None, name=None, **other) source code
 
dispatch(self, envelope)
Process received request.
source code
 
raised(self, subject, event)
Notify the listener that an event has been raised.
source code
    Inherited from Consumer
str
address(self)
Get the AMQP address for this endpoint.
source code
str
id(self)
Get the endpoint id
source code
 
join(self)
Join the worker thread.
source code
 
open(self)
Open and configure the consumer.
source code
 
received(self, message)
Process received request.
source code
 
start(self)
Start processing messages on the queue.
source code
 
stop(self)
Stop processing requests.
source code
 
valid(self, envelope)
Check to see if the envelope is valid.
source code
    Inherited from endpoint.Endpoint
 
__del__(self) source code
 
__str__(self) source code
 
ack(self)
Acknowledge all messages received on the session.
source code
 
close(self)
Close (shutdown) the endpoint.
source code
Connection
connection(self)
Get cached connection based on url.
source code
qpid.messaging.Session
session(self)
Get a session for the open connection.
source code
Class Methods [hide private]
    Inherited from endpoint.Endpoint
 
shutdown(cls)
Shutdown all connections.
source code
Class Variables [hide private]
    Inherited from endpoint.Endpoint
  LOCALHOST = 'tcp://localhost:5672'
Connection connectons
An AMQP connection.
Instance Variables [hide private]
    Inherited from endpoint.Endpoint
str uuid
The unique endpoint id.
Method Details [hide private]

__init__(self, subject=None, name=None, **other)
(Constructor)

source code 
Parameters:
  • subject (str) - An (optional) event subject.
Overrides: endpoint.Endpoint.__init__

dispatch(self, envelope)

source code 

Process received request.

Parameters:
  • envelope (Envelope) - The received envelope.
Overrides: Consumer.dispatch

raised(self, subject, event)

source code 

Notify the listener that an event has been raised.

Parameters:
  • subject (str) - The event subject.
  • event (any) - The event body.