class virtual base :object
..end
Abstract base class for XmlRpc servers.
val methods : (string, XmlRpc.value list -> XmlRpc.value) Stdlib.Hashtbl.t
Hashtable mapping method names to implementation functions.
val mutable base64_encoder : string -> string
Base-64 binary encoding function.
val mutable base64_decoder : string -> string
Base-64 binary decoding function.
val mutable datetime_encoder : XmlRpcDateTime.t -> string
ISO-8601 date/time encoding function.
val mutable datetime_decoder : string -> XmlRpcDateTime.t
ISO-8601 date/time decoding function.
val mutable error_handler : exn -> XmlRpc.message
Handler for unhandled exceptions.
method set_base64_encoder : (string -> string) -> unit
Sets an alternate Base-64 binary encoding function.
method set_base64_decoder : (string -> string) -> unit
Sets an alternate Base-64 binary decoding function.
method set_datetime_encoder : (XmlRpcDateTime.t -> string) -> unit
Sets an alternate ISO-8601 date/time encoding function.
method set_datetime_decoder : (string -> XmlRpcDateTime.t) -> unit
Sets an alternate ISO-8601 date/time decoding function.
method set_error_handler : (exn -> XmlRpc.message) -> unit
Sets an alternate handler for unhandled exceptions.
See XmlRpc.default_error_handler
and
XmlRpc.quiet_error_handler
for examples.
method serve : (string -> XmlRpc.value list -> XmlRpc.value) -> string -> string
For use in subclasses; calls XmlRpc.serve
with the current
encoders, decoders, and error handler.
method serve_message : (string -> XmlRpc.value list -> XmlRpc.value) ->
XmlRpc.message -> XmlRpc.message
Like serve
, but operates on messages instead of strings.
method register : string ->
?help:string ->
?signature:param_type list ->
?signatures:param_type list list ->
(XmlRpc.value list -> XmlRpc.value) -> unit
Registers a method with the server.
If a help
string is specified, its contents will be returned for
calls to system.methodHelp
for this method.
If signature
is specified, this method's signature will be published
by system.methodSignature
and (shallow) type-checking will be enabled
for parameters passed into this method.
Multiple signatures can be supplied via signatures
if desired to
provide for overloaded methods.
Signatures are of the form return-type; param1-type; param2-type; ...
where each type is an instance of the XmlRpcServer.param_type
variant.
method unregister : string -> unit
Removes a method from the server.
method virtual run : unit -> unit
Starts the main server process.