Class: QgsServerFilter

class qgis.server.QgsServerFilter

Bases: sip.wrapper

Class defining I/O filters for QGIS Server and implemented in plugins.

Filters can define any (or none) of the following hooks:

QgsServerFilter(serverInterface: Optional[QgsServerInterface]) Constructor QgsServerInterface passed to plugins constructors and must be passed to QgsServerFilter instances.

QgsServerFilter(a0: QgsServerFilter)

Methods

onRequestReady

Method called when the QgsRequestHandler is ready and populated with parameters, just before entering the main switch for core services.

onResponseComplete

Method called when the QgsRequestHandler processing has done and the response is ready, just after the main switch for core services and before final sending response to FCGI stdout.

onSendResponse

Method called when the QgsRequestHandler sends its data to FCGI stdout.

requestReady

Method called when the QgsRequestHandler is ready and populated with parameters, just before entering the main switch for core services.

responseComplete

Method called when the QgsRequestHandler processing has done and the response is ready, just after the main switch for core services and before final sending response.

sendResponse

Method called when the QgsRequestHandler sends its data to FCGI stdout.

serverInterface

Returns the QgsServerInterface instance

onRequestReady(self) bool

Method called when the QgsRequestHandler is ready and populated with parameters, just before entering the main switch for core services.

Return type:

bool

Returns:

true if the call must propagate to the subsequent filters, false otherwise

Added in version 3.24.

onResponseComplete(self) bool

Method called when the QgsRequestHandler processing has done and the response is ready, just after the main switch for core services and before final sending response to FCGI stdout.

Return type:

bool

Returns:

true if the call must propagate to the subsequent filters, false otherwise

Added in version 3.24.

onSendResponse(self) bool

Method called when the QgsRequestHandler sends its data to FCGI stdout. This normally occurs at the end of core services processing just after the responseComplete() plugin hook. For streaming services (like WFS on getFeature requests, sendResponse() might have been called several times before the response is complete: in this particular case, sendResponse() is called once for each feature before hitting responseComplete()

Return type:

bool

Returns:

true if the call must propagate to the subsequent filters, false otherwise

Added in version 3.22.

requestReady(self)

Method called when the QgsRequestHandler is ready and populated with parameters, just before entering the main switch for core services.

This method is considered as deprecated and onRequestReady() should be used instead.

Deprecated since version Will: be removed in QGIS 4.0

responseComplete(self)

Method called when the QgsRequestHandler processing has done and the response is ready, just after the main switch for core services and before final sending response.

This method is considered as deprecated and onResponseComplete() should be used instead.

Deprecated since version Will: be removed in QGIS 4.0

sendResponse(self)

Method called when the QgsRequestHandler sends its data to FCGI stdout. This normally occurs at the end of core services processing just after the responseComplete() plugin hook. For streaming services (like WFS on getFeature requests, sendResponse() might have been called several times before the response is complete: in this particular case, sendResponse() is called once for each feature before hitting responseComplete()

This method is considered as deprecated and onSendResponse() should be used instead.

Deprecated since version Will: be removed in QGIS 4.0

serverInterface(self) QgsServerInterface | None

Returns the QgsServerInterface instance

Return type:

Optional[QgsServerInterface]