Package pyamf :: Package remoting :: Package gateway :: Class ServiceWrapper

[hide private]
[frames] | no frames]

# Class ServiceWrapper

source code

Wraps a supplied service with extra functionality.

Instance Methods | [hide private]

__init__(self, service, description=None, authenticator=None, expose_request=None, preprocessor=None) x.__init__(...) initializes x; see x.__class__.__doc__ for signature | source code

__cmp__(self, other) | source code

_get_service_func(self, method, params) | source code

`mixed`

__call__(self, method, params) Executes the service. | source code

getMethods(self) Gets a `dict` of valid method callables for the underlying service object. | source code

getAuthenticator(self, service_request=None) | source code

mustExposeRequest(self, service_request=None) | source code

getPreprocessor(self, service_request=None) | source code

Inherited from `object`: `__delattr__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__str__`

Instance Variables | [hide private]

`str` | description A description of the service.
`callable` | service The original service.

Properties | [hide private]

Inherited from `object`: `__class__`

Method Details | [hide private]

### __init__(self, service, description=None, authenticator=None, expose_request=None, preprocessor=None)
(Constructor)

source code

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
  (inherited documentation)

### _get_service_func(self, method, params)

source code

Raises:
  - `InvalidServiceMethodError` - Calls to private methods are not allowed.
  - `UnknownServiceMethodError` - Unknown method.
  - `InvalidServiceMethodError` - Service method must be callable.

### __call__(self, method, params)
(Call operator)

source code

Executes the service.

If the service is a class, it will be instantiated.

Parameters:
  - `method` (`None` or `mixed`) - The method to call on the service.
  - `params` (`list` or `tuple`) - The params to pass to the service.
Returns: `mixed`
  The result of the execution.