Service Group feature

We have added a new attribute that allows to specify service group for services and event sinks.

This attribute allows to filter content that will be included into .RODL that come to clients.

Note: Related stuff (enums, arrays, structs) will be included only if they are used. Exceptions will be always included.

  • for RODL-based version, it was implemented via ROServiceGroups custom attribute:

  • for Code-First version, via ServiceGroup/ROServiceGroup attribute:
[RemObjects.SDK.Server.Service(Name="NewService1")]
[RemObjects.SDK.Server.ServiceGroup("group1")]
[RemObjects.SDK.Server.ServiceGroup("group2")]
public class NewService1 : RemObjects.SDK.Server.Service {
  [ROService]
  [ROServiceGroup('group1')]
  [ROServiceGroup('group2')]
  TNewService1 = class(TRORemotable)

When this attribute is specified in TROServer.ServiceGroup or ServerChannel.ServiceGroup property it can work like a firewall: services that match conditions will be allowed and processed and they will be included into generated RODL.

usage:

  • only services with admin service group will be allowed:
Server.ServiceGroup := 'admin';
  • services without admin service group will be allowed:
Server.ServiceGroup := '!admin';
  • only services with user1 and w/o admin service group will be allowed:
Server.ServiceGroup := '!admin,user1';

You can provide servicegroup query parameter in requests too. in this case only reduced RODL will be generated.

usage (the same as above):

  • http://localhost:8099/rodl?servicegroup=admin
  • http://localhost:8099/rodl?servicegroup=!admin
  • http://localhost:8099/rodl?servicegroup=!admin,user1