ExtendedHttpDispatcher

Overview

The abstract ExtendedHttpDispatcher class provides the base implementation of the IHttpDispatcher interface. It provides default implementations for the NotifyDispose and CanHandlePath methods and exposes the abstract Process method that should be implemented in derived classes.

Location

Implements

 

constructor  protected

Creates a new instance of the ExtendedHttpDispatcher class. Cannot be called directly.

 

constructor

 

ExtendedHttpDispatcher()

 

Sub New

Activate

 

method Activate

 

void Activate()

 

Sub Activate

CanHandlePath

Checks if the provided relative HTTP request path can be processed by this dispatcher.

 

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

Dispose  protected

If the disposing parameter is set to true, this method unregisters this dispatcher instance from the server.

 

method Dispose(disposing: Boolean)

 

void Dispose(Boolean disposing)

 

Sub Dispose(disposing As Boolean)

Parameters:

  • disposing: If set to true, the current dispatcher instance will be unregistered from the server.

NotifyDispose

This method is called when the ExtendedDispatcherList instance where the current instance is registered is disposed.

 

method NotifyDispose

 

void NotifyDispose()

 

Sub NotifyDispose

Path

Gets or sets the relative HTTP path requests that will be processed by the current HttpDispatcher instance.

Path should begin with "/".

 

property Path: String read write;

 

String Path { get; set; }

 

Property Path As String

Process

 

method Process(request: IHttpRequest; response: IHttpResponse; requestData: Stream; responseData: Stream)

 

void Process(IHttpRequest request, IHttpResponse response, Stream requestData, Stream responseData)

 

Sub Process(request As IHttpRequest, response As IHttpResponse, requestData As Stream, responseData As Stream)

Parameters:

  • request:
  • response:
  • requestData:
  • responseData:

Server

The IHttpServer instance this dispatcher is registered in.

The ExtendedHttpDispatcher instance is automatically registered in the provided IHttpServer instance's extended dispatchers list when this property is set.

 

property Server: IHttpServer read write;

 

IHttpServer Server { get; set; }

 

Property Server As IHttpServer

 

Path

Gets or sets the relative HTTP path requests that will be processed by the current HttpDispatcher instance.

Path should begin with "/".

 

property Path: String read write;

 

String Path { get; set; }

 

Property Path As String

Server

The IHttpServer instance this dispatcher is registered in.

The ExtendedHttpDispatcher instance is automatically registered in the provided IHttpServer instance's extended dispatchers list when this property is set.

 

property Server: IHttpServer read write;

 

IHttpServer Server { get; set; }

 

Property Server As IHttpServer

 

constructor  protected

Creates a new instance of the ExtendedHttpDispatcher class. Cannot be called directly.

 

constructor

 

ExtendedHttpDispatcher()

 

Sub New

Activate

 

method Activate

 

void Activate()

 

Sub Activate

CanHandlePath

Checks if the provided relative HTTP request path can be processed by this dispatcher.

 

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

Dispose  protected

If the disposing parameter is set to true, this method unregisters this dispatcher instance from the server.

 

method Dispose(disposing: Boolean)

 

void Dispose(Boolean disposing)

 

Sub Dispose(disposing As Boolean)

Parameters:

  • disposing: If set to true, the current dispatcher instance will be unregistered from the server.

NotifyDispose

This method is called when the ExtendedDispatcherList instance where the current instance is registered is disposed.

 

method NotifyDispose

 

void NotifyDispose()

 

Sub NotifyDispose

Process

 

method Process(request: IHttpRequest; response: IHttpResponse; requestData: Stream; responseData: Stream)

 

void Process(IHttpRequest request, IHttpResponse response, Stream requestData, Stream responseData)

 

Sub Process(request As IHttpRequest, response As IHttpResponse, requestData As Stream, responseData As Stream)

Parameters:

  • request:
  • response:
  • requestData:
  • responseData:

Descendants

See Also