5.3.3. vlcp.protocol.jsonrpc

Note

This document is generated from the source file.

View Source on GitHub

Created on 2015/8/12

author:hubo
exception vlcp.protocol.jsonrpc.JsonFormatException
class vlcp.protocol.jsonrpc.JsonRPC

JSON-RPC 1.0 Protocol

__init__()

Constructor

closed(connection)

routine for connection closed

error(connection)

routine for connection error

init(connection)

routine for connection initialization

notificationmatcher(method, connection)

Create an event matcher to match specified notifications

parse(connection, data, laststart)

Parse input data into events :param connection: connection object :param data: view for input data :param laststart: last parsed position :returns: (events, keep) where events are parsed events to send, keep is the unused data length to be keeped for next parse.

querywithreply(method, params, connection, container, raiseonerror=True)

Send a JSON-RPC request and wait for the reply. The reply result is stored at container.jsonrpc_result and the reply error is stored at container.jsonrpc_error.

reconnect_init(connection)

routine for reconnect

replymatcher(requestid, connection, iserror=None)

Create a matcher to match a reply

statematcher(connection, state='down', currentconn=True)

Create an event matcher to match the connection state

waitfornotify(method, connection, container)

Wait for next notification

class vlcp.protocol.jsonrpc.JsonRPCConnectionStateEvent(*args, **kwargs)

Connection state change

exception vlcp.protocol.jsonrpc.JsonRPCErrorResultException
class vlcp.protocol.jsonrpc.JsonRPCNotificationEvent(*args, **kwargs)

Notification received from the connection

exception vlcp.protocol.jsonrpc.JsonRPCProtocolException
class vlcp.protocol.jsonrpc.JsonRPCRequestEvent(*args, **kwargs)

Request received from the connection

canignorenow()

Extra criteria for an event with canignore = False. When this event returns True, the event is safely ignored.

class vlcp.protocol.jsonrpc.JsonRPCResponseEvent(*args, **kwargs)

Response received from the connection