Class: QgsServerInterface¶
Defines 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.
Note
This is an abstract class, with methods which must be implemented by a subclass.
The following methods must be implemented: accessControls()
, cacheManager()
, capabilitiesCache()
, configFilePath()
, filters()
, getEnv()
, registerAccessControl()
, registerFilter()
, registerServerCache()
, reloadSettings()
, removeConfigCacheEntry()
, requestHandler()
, serviceRegistry()
, setConfigFilePath()
, setFilters()
Abstract 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
- abstract accessControls(self) QgsAccessControl | None [source]¶
Gets the registered access control filters
- Return type:
Optional[QgsAccessControl]
- abstract cacheManager(self) QgsServerCacheManager | None [source]¶
Gets the registered server cache filters
Added in version 3.4.
- Return type:
Optional[QgsServerCacheManager]
- abstract capabilitiesCache(self) QgsCapabilitiesCache | None [source]¶
Gets pointer to the capabiblities cache
- Return type:
Optional[QgsCapabilitiesCache]
- Returns:
- abstract configFilePath(self) str [source]¶
Returns the configuration file path
- Return type:
str
- Returns:
string containing the configuration file path
- abstract filters(self) Any [source]¶
Returns the list of current
QgsServerFilter
- Return type:
Any
- Returns:
QgsServerFiltersMap
list ofQgsServerFilter
- abstract 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
- abstract 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
- abstract 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
- abstract 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.
- abstract reloadSettings(self)[source]¶
Reloads the server settings re-reading the configuration.
Added in version 3.28.
- abstract removeConfigCacheEntry(self, path: str | None)[source]¶
Remove entry from config cache
- Parameters:
path (Optional[str]) – the path of the file to remove
- abstract requestHandler(self) QgsRequestHandler | None [source]¶
Gets pointer to the request handler
- Return type:
Optional[QgsRequestHandler]
- Returns:
- abstract serviceRegistry(self) QgsServiceRegistry | None [source]¶
Returns the service registry
- Return type:
Optional[QgsServiceRegistry]
- Returns:
QgsServiceResgistry