transport Package

transport Package

async_protocol_handler Module

Async protocol handler interface

class vmware.vapi.protocol.server.transport.async_protocol_handler.AsyncProtocolHandler[source]

Bases: object

Async protocol handler

Async protocol handler init

class DataHandler[source]

Bases: object

Async protocol data handler

Async protocol data handler init

can_read()[source]

Used to throttle the lower layer from sending more data

Return type:bool
Returns:True if can accept data. False otherwise
data_abort()[source]

Callback when connection was aborted

data_end()[source]

Callback when connection was closed

data_ready(data)[source]

Callback when data arrived

Parameters:data (str) – data arrived
AsyncProtocolHandler.get_data_handler(connection)[source]

get data handler

connection must support the follow: write(data) : function : write data flush() : function : flush data close() : function : close the connection

Parameters:connection (file) – connection
Return type:AsyncProtocolHandler.DataHandler
Returns:A logical data handler for this connection

async_server_adapter_factory Module

Async server adapter factory

class vmware.vapi.protocol.server.transport.async_server_adapter_factory.AsyncServerAdapterFactory[source]

Bases: object

async server adapter factory

async server adapter factory init

get_adapter(server_adapter_name, *args, **kwargs)[source]

get async server adapter

Parameters:
  • server_adapter_name (str) – server adapter name
  • args (tuple) – position parameters to server adapter
  • kwargs (dict) – key parameters to server adapter
Return type:

vmware.vapi.protocol.server.transport.async_protocol_handler.AsyncProtocolHandler

Returns:

Async server adapter

msg_handler Module

Msg based protocol handler

class vmware.vapi.protocol.server.transport.msg_handler.MsgBasedProtocolHandler(api_handler)[source]

Bases: vmware.vapi.protocol.server.transport.async_protocol_handler.AsyncProtocolHandler

Message based protocol handler

Message based protocol handler init :type api_handler: vmware.vapi.protocol.server.api_handler.AplHandler :param api_handler: api handler instance

class DataHandler(parent, connection)[source]

Bases: vmware.vapi.protocol.server.transport.async_protocol_handler.DataHandler

Message based protocol data handler

Message based protocol data handler init

can_read()[source]
data_abort()[source]
data_end()[source]
data_ready(data)[source]
request_state_change(connection, state, response=None)[source]

request state changed

Parameters:
MsgBasedProtocolHandler.get_data_handler(connection)[source]
vmware.vapi.protocol.server.transport.msg_handler.get_async_api_handler(api_handler)[source]

get async api handler

Parameters:api_handler (vmware.vapi.protocol.server.api_handler.AplHandler) – api handler instance
Return type:vmware.vapi.protocol.server.async_api_handler_adapter.PooledAsyncApiHandlerAdapter
Returns:Threaded async api handler

Table Of Contents

Previous topic

msg Package

Next topic

provider Package

This Page