GenericInvoker

class kanzi::connect::GenericInvoker

Generic invoker class that invokes service meta methods based on received messages.

Public Functions

explicit GenericInvoker(AbstractService *service)

Constructor.

Object is expected to live as long as contained service is alive.

Parameters

service – the contained service to be invoked.

~GenericInvoker()
const MetaMethod *findMethod(const string &methodName)
shared_ptr<GenericRPCReplyMessage> invoke(const MessagePackage &message, AbstractSessionSharedPtr session)

Invokes the generic service invoker with a received message.

it is expected that right session for the message is discovered already on higher layers of software.

Parameters
  • message – the message to be used invocation of method.

  • session – the session this invoke is bound to.

Returns

optional reply message that is to be dispatched to sender of the original message.

shared_ptr<GenericRPCReplyMessage> invoke(const string &method, MessagePackage &message, AbstractSessionSharedPtr session)

Public Static Functions

static string createMessagename(const MethodDescription &method)
static MethodDescription findMethodDescription(const string &servicexml, const string &type, const string &name)
static PropertyDescriptor findPropertyDescription(const string &servicexml, const string &name)