IHttpDispatcher
Overview
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.
Location
- Reference: RemObjects.SDK.Server.dll
- Namespace: RemObjects.SDK.Server
- Ancestry: IHttpDispatcher
Required Methods
Activate
method Activate
void Activate()
Sub Activate()
CanHandlePath
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
Parameters:
- path:
Deactivate
method Deactivate
void Deactivate()
Sub Deactivate()
NotifyDispose
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.
method NotifyDispose
void NotifyDispose()
Sub NotifyDispose()
Process
method Process(context: IServerChannelInfo; request: IHttpRequest; response: IHttpResponse; requestData: Stream; responseData: Stream)
void Process(IServerChannelInfo context, IHttpRequest request, IHttpResponse response, Stream requestData, Stream responseData)
Sub Process(context As IServerChannelInfo, request As IHttpRequest, response As IHttpResponse, requestData As Stream, responseData As Stream)
Parameters:
- context:
- request:
- response:
- requestData:
- responseData: