Package pyamf :: Package remoting :: Package gateway :: Module twisted :: Class TwistedGateway

[hide private]
[frames] | no frames]

# Class TwistedGateway

source code

Twisted Remoting gateway for `twisted.web`.

Nested Classes | [hide private]

Inherited from `BaseGateway` (private): `_request_class` Inherited from `twisted.web.resource.Resource`: `entityType`

Instance Methods | [hide private]

__init__(self, *args, **kwargs) x.__init__(...) initializes x; see x.__class__.__doc__ for signature | source code

_finaliseRequest(self, request, status, content, mimetype=`'``text/plain``'`) Finalises the request. | source code

render_POST(self, request) Read remoting request from the client. | source code

sendResponse(self, amf_response, request) | source code

getProcessor(self, request) Determines the request processor, based on the request. | source code

Envelope

getResponse(self, http_request, amf_request) Processes the AMF request, returning an AMF Response. | source code

`twisted.internet.defer.Deferred`

authenticateRequest(self, service_request, username, password, **kwargs) Processes an authentication request. | source code

preprocessRequest(self, service_request, *args, **kwargs) Preprocesses a request. | source code

Inherited from `BaseGateway`: `addService`, `callServiceRequest`, `getAuthenticator`, `getPreprocessor`, `getServiceRequest`, `mustExposeRequest`, `removeService`

Inherited from `BaseGateway` (private): `_get_timezone_offset`

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

Inherited from `twisted.web.resource.Resource`: `__providedBy__`, `delEntity`, `getChild`, `getChildForRequest`, `getChildWithDefault`, `getDynamicEntity`, `getStaticEntity`, `listDynamicEntities`, `listDynamicNames`, `listEntities`, `listNames`, `listStaticEntities`, `listStaticNames`, `putChild`, `reallyPutEntity`, `render`, `render_HEAD`

Class Variables | [hide private]

| allowedMethods = ``(``'``POST``'``)``
Inherited from `twisted.web.resource.Resource`: `__implemented__`, `__provides__`, `isLeaf`, `server`

Instance Variables | [hide private]

`bool` | expose_request Forces the underlying HTTP request to be the first argument to any service call.
Inherited from `BaseGateway`: `authenticator`, `debug`, `logger`, `preprocessor`, `services`, `strict`, `timezone_offset`

Properties | [hide private]

Inherited from `object`: `__class__`

Method Details | [hide private]

### __init__(self, *args, **kwargs)
(Constructor)

source code

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

Overrides: twisted.web.resource.Resource.__init__
  (inherited documentation)

### _finaliseRequest(self, request, status, content, mimetype=`'``text/plain``'`)

source code

Finalises the request.

Parameters:
  - `request` (`http.Request`) - The HTTP Request.
  - `status` (`int`) - The HTTP status code.
  - `content` (`str`) - The content of the response.
  - `mimetype` (`str`) - The MIME type of the request.

### render_POST(self, request)

source code

Read remoting request from the client.

Parameters:
  - `request` (The HTTP Request.) - `twisted.web.http.Request`

### getProcessor(self, request)

source code

Determines the request processor, based on the request.

Parameters:
  - `request` (Request) - The AMF message.
Overrides: BaseGateway.getProcessor

### getResponse(self, http_request, amf_request)

source code

Processes the AMF request, returning an AMF Response.

Parameters:
  - `http_request` (`twisted.web.http.Request`) - The underlying HTTP Request
  - `amf_request` (Envelope) - The AMF Request.
Returns: Envelope
  The AMF response.
Overrides: BaseGateway.getResponse

### authenticateRequest(self, service_request, username, password, **kwargs)

source code

Processes an authentication request. If no authenticator is supplied, then authentication succeeds.

Returns: `twisted.internet.defer.Deferred`
  `Deferred`.
Overrides: BaseGateway.authenticateRequest

### preprocessRequest(self, service_request, *args, **kwargs)

source code

Preprocesses a request.

Overrides: BaseGateway.preprocessRequest