Table of Contents

TTMSMCPResource.ResourceReader Event

Code that produces the content when this entry is read.

API unit family: TMS.MCP.Resources Declaring type: TTMSMCPResource

Syntax

ResourceReader: TTMSMCPResourceMethod;

Remarks

Required: an entry without a handler cannot be read, and the collection refuses to register one. Assigning the handler does not raise the change notification, so wire it up together with the rest of the entry before publishing it.

Parameters

Name Description
URI Address the client asked for. For an entry published as a template this is the expanded address rather than the template itself, so the handler has to pull the variable parts out of it.

Returns

A newly created content object, whose ownership passes to the caller: it is converted and freed there, so the handler must not keep or reuse the instance. Returning nil is reported to the client as a failed operation, error code -32004.