The IHttpDispatcher interface represents an HTTP requests dispatcher.
All server channels that implement the IHttpServer interface allow you to register or unregister objects that implement the IHttpDispatcher interface. These objects can be used to allow the server channel to handle HTTP requests such as REST requests, server information page requests, etc. When an incoming HTTP request is processed, the server channel first checks the collection of registered IHttpDispatcher instances and tries to find one that can handle the received request (see the CanHandlePath method description). If an instance is found, its Process method is called to process the HTTP request.
Classes implementing the IHttpDispatcher interface can be used to extend the existing server channels without needing to create subclasses and override HTTP processing methods. This approach also allows you to manage at runtime which extended HTTP requests will be handled. For example: the Relativity server enables or disables DataAbstract for .NET REST support based on server settings.
This method returns true if this instance can handle HTTP requests with the path aPath.False otherwise.
method CanHandlePath(path: String): Boolean
Boolean CanHandlePath(String path)
Function CanHandlePath(path As String) As Boolean
This method is called while disposing of the server channel where the current instance is registered. This method can be used to perform cleanup actions.
Processes an incoming HTTP request (information about it is provided as aRequest and aRequestData) and sets the HTTP response information and data to aResponse and aResponseData, accordingly.
method Process(request: IHttpRequest; response: IHttpResponse; requestData: Stream; responseData: Stream)