Class: QgsServerInterface¶
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()
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 |
|
Returns an enrironment variable, used to pass environment variables to Python |
|
Register an access control filter |
|
Register a |
|
Register a server cache filter |
|
Reloads the server settings re-reading the configuration. |
|
Remove entry from config cache |
|
Gets pointer to the request handler |
|
Returns the service registry |
|
Set the configuration file path |
|
Set the filters map |
- class qgis.server.QgsServerInterface[source]¶
Bases:
object
- accessControls(self) QgsAccessControl | None [source]¶
Gets the registered access control filters
- Return type:
Optional[QgsAccessControl]
- cacheManager(self) QgsServerCacheManager | None [source]¶
Gets the registered server cache filters
Added in version 3.4.
- Return type:
Optional[QgsServerCacheManager]
- capabilitiesCache(self) QgsCapabilitiesCache | None [source]¶
Gets pointer to the capabiblities cache
- Return type:
Optional[QgsCapabilitiesCache]
- Returns:
- configFilePath(self) str [source]¶
Returns the configuration file path
- Return type:
str
- Returns:
QString containing the configuration file path
- filters(self) Any [source]¶
Returns the list of current
QgsServerFilter
- Return type:
Any
- Returns:
QgsServerFiltersMap
list ofQgsServerFilter
- getEnv(self, name: str | None) str [source]¶
Returns an enrironment variable, used to pass environment variables to Python
- Parameters:
name (Optional[str])
- Return type:
str
- registerAccessControl(self, accessControl: QgsAccessControlFilter | None, priority: int = 0)[source]¶
Register an access control filter
- Parameters:
accessControl (Optional[QgsAccessControlFilter]) – the access control to register
priority (int = 0) – the priority used to order them
- registerFilter(self, filter: QgsServerFilter | None, priority: int = 0)[source]¶
Register a
QgsServerFilter
- Parameters:
filter (Optional[QgsServerFilter]) – the
QgsServerFilter
to addpriority (int = 0) – an optional priority for the filter order
- registerServerCache(self, serverCache: QgsServerCacheFilter | None, priority: int = 0)[source]¶
Register a server cache filter
- Parameters:
serverCache (Optional[QgsServerCacheFilter]) – the server cache to register
priority (int = 0) – the priority used to order them
Added in version 3.4.
- reloadSettings(self)[source]¶
Reloads the server settings re-reading the configuration.
Added in version 3.28.
- removeConfigCacheEntry(self, path: str | None)[source]¶
Remove entry from config cache
- Parameters:
path (Optional[str]) – the path of the file to remove
- requestHandler(self) QgsRequestHandler | None [source]¶
Gets pointer to the request handler
- Return type:
Optional[QgsRequestHandler]
- Returns:
- serviceRegistry(self) QgsServiceRegistry | None [source]¶
Returns the service registry
- Return type:
Optional[QgsServiceRegistry]
- Returns:
QgsServiceResgistry