Service Group sample (Delphi)
Overview
This example shows how to use Service Group feature.
Getting started
- Build or Compile both projects.
- Launch the server.
- Launch the client.
- Don't change default settings and press
Activatebutton on server-side project. -
Test client:
Service1.GetServerTimewill work withServer1.Service2.Sumwill work withServer2.
- Press
Deactivatebutton on server-side and select other service groups forServer1&Server2. - Retest client.
Note: This sample has 5 predefined service groups:
<empty>- everything is allowedservice1-service1group is allowed onlyservice2-service2group is allowed only!service1-service1group is disallowed. other groups are allowed!service2-service2group is disallowed. other groups are allowed
Examine the code
RODL-based server
It has ROServiceGroups custom attribute that is defined on service level in Service Builder:
Code-First server
Services have ROServiceGroup Code-First attribute:
[ROServiceGroup('service1')]
[ROServiceGroup('service2')]