msg Package

msg Package

handler_factory Module

Protocol handler factory

class vmware.vapi.protocol.server.msg.handler_factory.ProtocolHandlerFactory[source]

Bases: object

Protocol handler factory

Protocol handler factory init

get_handler(protocol_name, *args, **kwargs)[source]

Create protocol handler

Parameters:
  • protocol (str) – protocol name
  • args (tuple) – position parameters to protocol handler constructor
  • kwargs (dict) – key parameters to protocol handler constructor
Return type:

vmware.vapi.protocol.server.api_handler.ApiHandler

Returns:

Api handler object

json_handler Module

Json rpc server side handler

class vmware.vapi.protocol.server.msg.json_handler.JsonApiHandler(provider)[source]

Bases: vmware.vapi.protocol.server.api_handler.ApiHandler

Json rpc api handler

Json rpc api handler init

Parameters:provider (vmware.vapi.core.ApiProvider) – api provider object
handle_request(*arg, **kwargs)[source]

Mock wrapper function

invoke(request)[source]

Invokes a specified method given an execution context, a method identifier and method input parameter(s)

Parameters:request (vmware.vapi.data.serializer.jsonrpc.JsonRpcRequest) – json rpc request object
Return type:dict
Returns:Result of the method invocation
vmware.vapi.protocol.server.msg.json_handler.get_protocol_handler(provider)[source]

Get protocol handler

Parameters:provider (vmware.vapi.core.ApiProvider) – api provider object

:rtype vmware.vapi.protocol.server.api_handler.ApiHandler :return: json rpc api handler object

Table Of Contents

Previous topic

server Package

Next topic

transport Package

This Page