Package gofer :: Package rmi :: Module stub :: Class Stub
[hide private]
[frames] | no frames]

Class Stub

source code

The stub class for remote objects.

Instance Methods [hide private]
 
__init__(self, producer, destination, options) source code
 
_send(self, request, options)
Send the request using the configured request method.
source code
 
__send(self, request, options)
Send the request using the configured request method.
source code
Options
__getpam(self, opts)
Get PAM options.
source code
Method
__getattr__(self, name)
Python vodo.
source code
Method
__getitem__(self, name)
Python vodo.
source code
Stub
__call__(self, *args, **options)
Simulated constructor.
source code
Policy
__getpolicy(self)
Get the request policy based on options.
source code
 
__setpolicy(self)
Set the request policy based on options.
source code
bool
__async(self)
Get whether an asynchronous request method should be used based on selected options.
source code
 
__lock(self) source code
 
__unlock(self) source code
Class Methods [hide private]
Stub
stub(cls, name, producer, destination, options)
Factory method.
source code
Instance Variables [hide private]
Destination __destination
The AMQP destination
RLock __mutex
The object mutex.
Options __options
Stub options.
Policy __policy
The invocation policy.
gofer.messaging.producer.Producer __producer
An AMQP producer.
Method Details [hide private]

stub(cls, name, producer, destination, options)
Class Method

source code 

Factory method.

Parameters:
  • name (str) - The stub class (or module) name.
  • destination (Destination) - The AMQP destination
  • options - A dict of gofer options
  • options - Options
Returns: Stub
A stub instance.

__init__(self, producer, destination, options)
(Constructor)

source code 
Parameters:

_send(self, request, options)

source code 

Send the request using the configured request method.

Parameters:
  • request (str) - An RMI request.
  • options (Options) - Invocation options.

__send(self, request, options)

source code 

Send the request using the configured request method.

Parameters:
  • request (str) - An RMI request.
  • options (Options) - Invocation options.

__getpam(self, opts)

source code 

Get PAM options.

Parameters:
  • opts (dict) - options dict.
Returns: Options
pam options

__getattr__(self, name)
(Qualification operator)

source code 

Python vodo. Get a Method object for any requested attribte.

Parameters:
  • name (str) - The attribute name.
Returns: Method
A method object.

__getitem__(self, name)
(Indexing operator)

source code 

Python vodo. Get a Method object for any requested attribte.

Parameters:
  • name (str) - The attribute name.
Returns: Method
A method object.

__call__(self, *args, **options)
(Call operator)

source code 

Simulated constructor. The 1st call updates stub options. The 2nd call updates remote object constructor parameters which are passed on RMI calls.

Parameters:
  • options (dict) - keyword options.
Returns: Stub
self

__getpolicy(self)

source code 

Get the request policy based on options. The policy is cached for performance.

Returns: Policy
The request policy.

__async(self)

source code 

Get whether an asynchronous request method should be used based on selected options.

Returns: bool
True if async.