Table of Contents

TSparkleDispatcher Class

Abstract ancestor for server dispatcher components, which own the actual HTTP server and serve the Sparkle server components connected to them.

Remarks

When the dispatcher is activated, it asks each connected server component to create its server module, registers the modules in the HTTP dispatcher and starts the server. Descendants implement the start and stop logic for a specific server type.

Syntax

Unit: Sparkle.Comp.Server

TSparkleDispatcher = class(TComponent);

Constructors

Name Description
Create Creates a new dispatcher component.

Methods

Name Description
Start Starts the dispatcher. Equivalent to setting Active to True.
Stop Stops the dispatcher. Equivalent to setting Active to False.

Properties

Name Description
Active Gets or sets whether the dispatcher is active, serving the requests of its connected server components.

Events

Name Description
AfterModulesAdded Event fired after the modules of the connected server components have been added to the HTTP dispatcher, allowing registration of additional custom modules.