TIdNotify is a TObject descendant that implements an ancestor class for posting notification messages using methods in the main thread of execution, or in threads.
Indicates that the main application thread performs notification messages.
property MainThreadUsesNotify: Boolean;
Description
MainThreadUsesNotify is a Boolean property that indicates if the Main application thread uses Notification messages, or if TIdNotify is allowed to perform the operation. When the Main thread is active and MainThreadUsesNotify is False, TIdNotify triggers the OnNotify event handler. Under all other circumstances, the current object instance is added to a global notification thread to perform the operation.
Create is the constructor for the object instance. Create is declared as a virtual method in TIdNotify to allow descendant classes to reimplement the Create method. Create calls the inherited Create method prior to exiting from the constructor.
Specifies the implementation of the Notify method.
procedure DoNotify; virtual; abstract;
Description
DoNotify is a virtual abstract procedure in TIdNotify. Descendant classes must implement the DoNotify method to allow the Notify method to execute it's notification mechanism.
Implements posting of notifications for threaded and non-thread descendant classes.
procedure Notify;
Description
Notify is a procedure that implements posting of notifications using the mechanism required for threaded and non-thread descendant classes. Notify calls DoNotify when the main thread of execution is active, or creates a TIdNotifyThread instance and adds it to the global NotifyThread when the main thread is not active.
NotifyMethod is a class procedure in TIdNotify that allows posting of notifications using a method in a thread, as opposed to synchronizing to a noticiation method in the main thread of execution. NotifyMethod calls creates an instance of TIdNotifyMethod using the address for the TThreadMethod in AMethod to perform the Notify procedure.