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

Class RequestConsumer

source code

endpoint.Endpoint --+    
                    |    
             Consumer --+
                        |
                       RequestConsumer

An AMQP request consumer.

Instance Methods [hide private]
 
start(self, dispatcher)
Start processing messages on the queue using the specified dispatcher.
source code
 
dispatch(self, envelope)
Dispatch received request.
source code
 
sendreply(self, envelope, result)
Send the reply if requested.
source code
 
sendstarted(self, envelope)
Send the a status update if requested.
source code
 
checkwindow(self, envelope)
Check the window.
source code
 
__del__(self) source code
    Inherited from Consumer
 
__init__(self, destination, **other) source code
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
 
stop(self)
Stop processing requests.
source code
 
valid(self, envelope)
Check to see if the envelope is valid.
source code
    Inherited from endpoint.Endpoint
 
__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]
pulp.messaging.dispatcher.Dispatcher dispatcher
An RMI dispatcher.
pulp.messaging.producer.Producer producer
A reply producer.
    Inherited from endpoint.Endpoint
str uuid
The unique endpoint id.
Method Details [hide private]

start(self, dispatcher)

source code 

Start processing messages on the queue using the specified dispatcher.

Parameters:
Overrides: Consumer.start

dispatch(self, envelope)

source code 

Dispatch received request.

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

sendreply(self, envelope, result)

source code 

Send the reply if requested.

Parameters:
  • envelope (Envelope) - The received envelope.
  • result (object) - The request result.

sendstarted(self, envelope)

source code 

Send the a status update if requested.

Parameters:
  • envelope (Envelope) - The received envelope.

checkwindow(self, envelope)

source code 

Check the window.

Parameters:
  • envelope (Envelope) - The received envelope.

__del__(self)
(Destructor)

source code 
Overrides: endpoint.Endpoint.__del__