TBoldSubscribablePersistent¶
This is an abstract superclass for classes that need to be subclasses to TPersistent and also need to be subscribable.
Unit: BoldSubscription
Declaration¶
Hierarchy¶
- TPersistent
- TBoldSubscribablePersistent
- Direct subclasses
TBoldFollowerControllerTBoldFollowerControllerCom
Description¶
It has the same interface as TPublisher, 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 | read-only | |
| Publisher | protected, read-only |
HasSubscribers¶
Publisher¶
Methods¶
| Name | Summary | Notes |
|---|---|---|
| AddSmallSubscription | ||
| AddSubscription | ||
| Create | ||
| Destroy | override | |
| FreePublisher | protected | |
| GetHasSubscribers | protected, virtual | |
| SendEvent | ||
| SendExtendedEvent | Sends an extended event to all subscribers. | |
| SendQuery | Sends a query to all subscribers |
AddSmallSubscription¶
procedure AddSmallSubscription(Subscriber: TBoldSubscriber; Events: TBoldSmallEventSet; RequestedEvent: TBoldRequestedEvent); See Also - AddSmallSubscription
AddSubscription¶
procedure AddSubscription(Subscriber: TBoldSubscriber; OriginalEvent: TBoldEvent; RequestedEvent: TBoldRequestedEvent); See Also - AddSubscription
Create¶
Destroy¶
FreePublisher¶
GetHasSubscribers¶
SendEvent¶
SendEvent notifies all subscribers holding a subscription matching Event by calling their Receive method. 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.
SendExtendedEvent¶
procedure SendExtendedEvent(Originator: TObject; OriginalEvent: TBoldEvent; const Args: array of const);
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(Originator: TObject; OriginalEvent: TBoldEvent; const Args: array of const; Subscriber: TBoldSubscriber): Boolean;
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.