TBoldSubscribableObject¶
TBoldSubscribableComponent is an abstract superclass for classes that need to be subscribable.
Unit: BoldSubscription
Declaration¶
Hierarchy¶
- TObject
TBoldMemoryManagedObjectTBoldFlaggedObject- TBoldSubscribableObject
- Direct subclasses
TBoldClientTBoldComClientConnection- TBoldElement
TBoldLogHandlerTBoldPersistenceControllerTBoldPersistenceMapperTBoldRegionDefinitionsTBoldServer
Description¶
It has the same interface as a TBoldPublisher, i.e. SendEvent and AddSubscription.
| Note |
|---|
| It is implemented by allocating an internal TBoldPublisher and passing the calls on to it. |
|---|
Properties¶
| Name | Summary | Notes |
|---|---|---|
| HasSubscribers | protected, read-only | |
| Publisher | protected, read-only |
HasSubscribers¶
Publisher¶
Methods¶
| Name | Summary | Notes |
|---|---|---|
| AddSmallSubscription | ||
| AddSubscription | ||
| Destroy | override | |
| FreePublisher | protected | |
| SendEvent | SendEvent notifies all subscribers holding a subscription matching Event by calling their Receive method. | virtual |
| SendExtendedEvent | Sends an extended event to all subscribers. | virtual |
| SendQuery | Sends a query to all subscribers | virtual |
AddSmallSubscription¶
procedure AddSmallSubscription(Subscriber: TBoldSubscriber; Events: TBoldSmallEventSet; RequestedEvent: TBoldRequestedEvent); See Also - AddSmallSubscription
AddSubscription¶
procedure AddSubscription(Subscriber: TBoldSubscriber; OriginalEvent: TBoldEvent; RequestedEvent: TBoldRequestedEvent); See Also - AddSubscription
Destroy¶
The destructor will free the internal TBoldPublisher.
FreePublisher¶
SendEvent¶
If a subscriber holds multiple subscriptions matching the same event, but with different requested events, Receive will be called multiple times, once for each requested event.
This method is virtual to allow the concrete subclasses to perform other actions when sending an event.
SendExtendedEvent¶
An extended event can pass any arguments to the subscribers. Each event should send a well defined set of arguments that the subscribers can extract additional information from.
SendQuery¶
function SendQuery(OriginalEvent: TBoldEvent; const Args: array of const; Subscriber: TBoldSubscriber): Boolean; virtual;
A subscriber can subscribe to a query event. Call SendQuery to query all subscribers to the particular query event to see if any subscriber has any objection to the query. If the result of SendQuery is false, this should be interpreted as a veto from one of the subscribers.
Generated from the Bold 4.0 help (Help/BfD.chm) by Tools/chm2mkdocs.py; member lists reflect Bold 4.0, see the source for members added since.