NAME
DTA::CAB::Server::XmlRpc - DTA::CAB XML-RPC server using RPC::XML
SYNOPSIS
##========================================================================
## Constructors etc.
$srv
= DTA::CAB::Server::XmlRpc->new(
%args
);
##========================================================================
## Methods: Encoding Hacks
\
%rpcProcHash
=
$srv
->wrapMethodEncoding(\
%rpcProcHash
);
##========================================================================
## Methods: Generic Server API
$rc
=
$srv
->prepareLocal();
$rc
=
$srv
->run();
##========================================================================
## Methods: Additional
\
%procSpec
=
$srv
->listAnalyzersProc();
DESCRIPTION
Globals
- Variable: @ISA
-
DTA::CAB::Server::XmlRpc inherits from DTA::CAB::Server.
Constructors etc.
- new
-
$srv
=
$CLASS_OR_OBJ
->new(
%args
);
Constructor.
%args, %$srv:
##-- Underlying server
xsrv
=>
$xsrv
,
##-- low-level server, an RPC::XML::Server object
xopt
=> \
%opts
,
##-- options for RPC::XML::Server->new()
xrun
=> \
%opts
,
##-- options for RPC::XML::Server->server_loop()
##
##-- XML-RPC procedure naming
procNamePrefix
=>
$prefix
,
##-- default: 'dta.cab.'
##
##-- hacks
encoding
=>
$enc
,
##-- sets $RPC::XML::ENCODING on prepare(), used by underlying server
##
##-- (inherited from DTA::CAB::Server)
as
=> \
%analyzers
,
##-- ($name => $cab_analyzer_obj, ...)
aos
=> \
%name2options
,
##-- ($name => \%analyzerOptions, ...)
Methods: Encoding Hacks
- wrapMethodEncoding
-
\
%rpcProcHash
=
$srv
->wrapMethodEncoding(\
%rpcProcHash
);
Wraps an RPC::XML::procedure spec into $srv->{encoding}-safe code, only if $rpcProcHash{wrapEncoding} is set to a true value. This is a hack to which we resort because RPC::XML is so stupid.
Methods: Generic Server API
- prepareLocal
-
$rc
=
$srv
->prepareLocal();
Subclass-local post-constructor initialization. Registers analysis methods, generates wrapper closures, etc. Returns true on success, false otherwise.
- run
-
$rc
=
$srv
->run();
Runs the server. Doesn't return until the server dies (or is killed).
Methods: Additional
- listAnalyzersProc
-
\
%procSpec
=
$srv
->listAnalyzersProc();
Returns an RPC::XML specification for the 'listAnalyzers' method, which just returns an array containing the names of all known analyzers. Used by "prepareLocal"().
AUTHOR
Bryan Jurish <moocow@cpan.org>
COPYRIGHT AND LICENSE
Copyright (C) 2009-2019 by Bryan Jurish
This package is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.24.1 or, at your option, any later version of Perl 5 you may have available.