Package brisa :: Package upnp :: Package device :: Module service :: Class ServiceController
[hide private]
[frames] | no frames]

Class ServiceController

source code

               object --+        
                        |        
  core.webserver.Resource --+    
                            |    
core.webserver.CustomResource --+
                                |
                               ServiceController

Wrapper for receiving soap calls and assigning them to correspondent methods. Extend UPnPPublisher and add the class to the web server as a resource and your methods will be exported.

Instance Methods [hide private]
 
__init__(self, service, service_type)
Constructor for the Resource class.
source code
 
render(self, uri, request, response)
Renders a request received.
source code
 
lookup_function(self, function_name)
Lookup published SOAP function.
source code
 
_get_call_response(self, request, response_obj, method_name, function, *args, **kwargs)
Performs the soap call, builds and returns a response.
source code
 
_build_error(self, failure, request, method_name, response_obj)
Builds an error based on the failure code.
source code
 
_build_response(self, request, response, response_object, status=200)
Builds a response for a call.
source code
 
_method_not_found(self, request, response_obj, method_name)
Treats the method not found error.
source code

Inherited from core.webserver.Resource: add_resource, add_static_file, application, get_render

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  encoding = "UTF-8"
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, service, service_type)
(Constructor)

source code 

Constructor for the Resource class.

Parameters:
  • name - resource name visible on the webserver
Overrides: object.__init__
(inherited documentation)

render(self, uri, request, response)

source code 

Renders a request received.

Overrides: core.webserver.Resource.render