ITMSMCPServerAware Interface
Lets a target object receive a reference to the server that reflects over it.
API unit family: TMS.MCP.Attributes.Server
Syntax
ITMSMCPServerAware = interface
Remarks
Implement this interface on a target class when its methods need to reach back into the server, for example to send a notification or to read the active session. The server queries every target that was added as an object for this interface and hands itself over before the methods of that target are registered; a target added as a class only is never queried, because there is no instance to call. Do not implement it on a descendant of TInterfacedObject. The query the server performs takes an interface reference to the target and releases it again, which on a reference-counted implementation drops the count to zero and destroys the object while the server still holds a pointer to it. Derive from TInterfacedPersistent, or from any other class whose interface implementation is not reference counted, so the target keeps the lifetime its owner gives it.
Methods
| Name | Description |
|---|---|
| SetMCPServer | Receives the server the target was registered with. |