API docs for “spamfighter.txjsonrpc.netstring.jsonrpc.JSONRPCIntrospection”

# Class s.t.n.j.JSONRPCIntrospection(JSONRPC):

Part of spamfighter.txjsonrpc.netstring.jsonrpc View Source View In Hierarchy

Implement the JSON-RPC Introspection API.

By default, the methodHelp method returns the 'help' method attribute, if it exists, otherwise the __doc__ method attribute, if it exists, otherwise the empty string.

To enable the methodSignature method, add a 'signature' method attribute containing a list of lists. See methodSignature's documentation for the format. Note the type strings should be JSON-RPC types, not Python types.

Method | __init__ | Implement Introspection support for an JSONRPC server.
Method | jsonrpc_listMethods | Return a list of the method names implemented by this server.
Method | jsonrpc_methodHelp | Return a documentation string describing the use of the given method.
Method | jsonrpc_methodSignature | Return a list of type signatures.

Inherited from JSONRPC:

Method | __call__ | Undocumented
Method | connectionMade | Undocumented
Method | putSubHandler | Undocumented
Method | getSubHandler | Undocumented
Method | getSubHandlerPrefixes | Undocumented
Method | stringReceived | Undocumented
Method | getFunction | Given a string, return a function, or raise NoSuchFunction.
Method | _cbDispatch | Undocumented
Method | _cbRender | Undocumented
Method | _ebRender | Undocumented
Method | _listFunctions | Return a list of the names of all jsonrpc methods.

def __init__(self, parent): (source)
overrides spamfighter.txjsonrpc.netstring.jsonrpc.JSONRPC.__init__
Implement Introspection support for an JSONRPC server.

Parameters | parent | the JSONRPC server to add Introspection support to.

def jsonrpc_listMethods(self): (source)
Return a list of the method names implemented by this server.

def jsonrpc_methodHelp(self, method): (source)
Return a documentation string describing the use of the given method.

def jsonrpc_methodSignature(self, method): (source)
Return a list of type signatures.

Each type signature is a list of the form [rtype, type1, type2, ...] where rtype is the return type and typeN is the type of the Nth argument. If no signature information is available, the empty string is returned.