Class: QgsServerInterface¶
- class qgis.server.QgsServerInterface¶
Bases:
sip.wrapper
QgsServerInterface
Class defining interfaces exposed by QGIS Server and made available to plugins.This class provides methods to access the request handler and the capabilities cache. A method to read the environment variables set in the main FCGI loop is also available. Plugins can add listeners (instances of
QgsServerFilter
) with a certain priority through the registerFilter( :py:class:`QgsServerFilter`* , int) method.Methods
Gets the registered access control filters
Gets the registered server cache filters
Gets pointer to the capabiblities cache
Returns the configuration file path
Returns the list of current
QgsServerFilter
Returns an enrironment variable, used to pass environment variables to Python
Register an access control filter
Register a
QgsServerFilter
Register a server cache filter
Remove entry from config cache
Gets pointer to the request handler
Returns the service registry
Set the configuration file path
Set the filters map
- accessControls(self) QgsAccessControl ¶
Gets the registered access control filters
- Return type:
- cacheManager(self) QgsServerCacheManager ¶
Gets the registered server cache filters
New in version 3.4.
- Return type:
- capabilitiesCache(self) QgsCapabilitiesCache ¶
Gets pointer to the capabiblities cache
- Return type:
- Returns:
- configFilePath(self) str ¶
Returns the configuration file path
- Return type:
str
- Returns:
QString containing the configuration file path
- filters(self) object ¶
Returns the list of current
QgsServerFilter
- Return type:
object
- Returns:
QgsServerFiltersMap
list ofQgsServerFilter
- getEnv(self, name: str) str ¶
Returns an enrironment variable, used to pass environment variables to Python
- Parameters:
name (str) –
- Return type:
str
- registerAccessControl(self, accessControl: QgsAccessControlFilter, priority: int = 0)¶
Register an access control filter
- Parameters:
accessControl (QgsAccessControlFilter) – the access control to register
priority (int = 0) – the priority used to order them
- registerFilter(self, filter: QgsServerFilter, priority: int = 0)¶
Register a
QgsServerFilter
- Parameters:
filter (QgsServerFilter) – the
QgsServerFilter
to addpriority (int = 0) – an optional priority for the filter order
- registerServerCache(self, serverCache: QgsServerCacheFilter, priority: int = 0)¶
Register a server cache filter
- Parameters:
serverCache (QgsServerCacheFilter) – the server cache to register
priority (int = 0) – the priority used to order them
New in version 3.4.
- removeConfigCacheEntry(self, path: str)¶
Remove entry from config cache
- Parameters:
path (str) – the path of the file to remove
- requestHandler(self) QgsRequestHandler ¶
Gets pointer to the request handler
- Return type:
- Returns:
- serviceRegistry(self) QgsServiceRegistry ¶
Returns the service registry
- Return type:
- Returns:
QgsServiceResgistry
- setConfigFilePath(self, configFilePath: str)¶
Set the configuration file path
- Parameters:
configFilePath (str) – QString with the configuration file path
- setFilters(self, filters: object)¶
Set the filters map
- Parameters:
filters (object) – the
QgsServerFiltersMap