Kanzi Connect  3.9.8
Kanzi Connect C++ API
kanzi::connect::GenericInvoker Class Reference

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

#include <generic_invoker.hpp>

Public Member Functions

const MetaMethod * findMethod (const string &methodName)
 
 GenericInvoker (AbstractService *service)
 Constructor. More...
 
shared_ptr< GenericRPCReplyMessage > invoke (const MessagePackage &message, AbstractSessionSharedPtr session)
 Invokes the generic service invoker with a received message. More...
 
shared_ptr< GenericRPCReplyMessage > invoke (const string &method, MessagePackage &message, AbstractSessionSharedPtr session)
 
 ~GenericInvoker ()
 

Static Public Member Functions

static string composeMessageName (const string &serviceIdentifier, string &methodIdentifier)
 
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)
 

Detailed Description

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

Constructor & Destructor Documentation

◆ GenericInvoker()

kanzi::connect::GenericInvoker::GenericInvoker ( AbstractService service)
explicit

Constructor.

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

Parameters
servicethe contained service to be invoked.

◆ ~GenericInvoker()

kanzi::connect::GenericInvoker::~GenericInvoker ( )

Member Function Documentation

◆ composeMessageName()

static string kanzi::connect::GenericInvoker::composeMessageName ( const string &  serviceIdentifier,
string &  methodIdentifier 
)
static

◆ createMessagename()

static string kanzi::connect::GenericInvoker::createMessagename ( const MethodDescription method)
static

◆ findMethod()

const MetaMethod* kanzi::connect::GenericInvoker::findMethod ( const string &  methodName)

◆ findMethodDescription()

static MethodDescription kanzi::connect::GenericInvoker::findMethodDescription ( const string &  servicexml,
const string &  type,
const string &  name 
)
static

◆ findPropertyDescription()

static PropertyDescriptor kanzi::connect::GenericInvoker::findPropertyDescription ( const string &  servicexml,
const string &  name 
)
static

◆ invoke() [1/2]

shared_ptr<GenericRPCReplyMessage> kanzi::connect::GenericInvoker::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
messagethe message to be used invocation of method.
sessionthe session this invoke is bound to.
Returns
optional reply message that is to be dispatched to sender of the original message.

◆ invoke() [2/2]

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

The documentation for this class was generated from the following file: