crossbar.webservice.archive¶
Classes¶
Static Web from ZIP archive service. |
|
Twisted Web resource |
|
Twisted Web resource for a single file within a ZIP archive. |
Functions¶
|
|
|
Module Contents¶
- class RouterWebServiceArchive(transport, path, config=None, resource=None)[source]¶
Bases:
crossbar.webservice.base.RouterWebServiceStatic Web from ZIP archive service.
- static check(personality, config)[source]¶
Checks the configuration item. When errors are found, an InvalidConfigException exception is raised.
- Parameters:
personality – The node personality class.
config – The Web service configuration item.
- Raises:
crossbar.common.checkconfig.InvalidConfigException
- static create(transport, path, config)[source]¶
Factory to create a Web service instance of this class.
- Parameters:
transport – The Web transport in which this Web service is created on.
path – The (absolute) URL path on which the Web service is to be attached.
config – The Web service configuration item.
- Returns:
An instance of this class.
- class ZipArchiveResource(worker, config, path, archive_file)[source]¶
Bases:
twisted.web.resource.ResourceTwisted Web resource
- getChild(path, request, retry=True)[source]¶
Retrieve a ‘child’ resource from me.
Implement this to create dynamic resource generation – resources which are always available may be registered with self.putChild().
This will not be called if the class-level variable ‘isLeaf’ is set in your subclass; instead, the ‘postpath’ attribute of the request will be left as a list of the remaining path elements.
For example, the URL /foo/bar/baz will normally be:
| site.resource.getChild('foo').getChild('bar').getChild('baz').
However, if the resource returned by ‘bar’ has isLeaf set to true, then the getChild call will never be made on it.
Parameters and return value have the same meaning and requirements as those defined by L{IResource.getChildWithDefault}.