34define(
"RPC_SERVER_PATH",
"/RPC2");
35define(
"RPC_SERVER_ALIVE",
true);
60 $ilias =
$DIC[
'ilias'];
62 $this->log =
$DIC->logger()->wsrv();
64 $this->
ilias = $ilias;
73 if (self::$instance) {
96 if (strlen($this->rpc_host)) {
99 return $this->rpc_host = $this->
ilias->getSetting(
'rpc_server_host');
103 $this->rpc_host = $a_host;
107 if (strlen($this->rpc_port)) {
110 return $this->rpc_port = $this->
ilias->getSetting(
'rpc_server_port');
114 $this->rpc_port = $a_port;
123 $this->
ilias->setSetting(
'rpc_server_host', $this->
getHost());
124 $this->
ilias->setSetting(
'rpc_server_port', $this->
getPort());
134 include_once
'./Services/WebServices/RPC/classes/class.ilRpcClientFactory.php';
139 }
catch (Exception
$e) {
140 $this->log->warning(
'Calling RPC server failed with message: ' .
$e->getMessage());
An exception for terminatinating execution or to throw for unit testing.
isEnabled()
Returns true if server ip and port are set.
static getInstance()
Get singelton instance.
__construct()
Singleton contructor.
static factory($a_package, $a_timeout=0)
Creates an ilRpcClient instance to our ilServer.
redirection script todo: (a better solution should control the processing via a xml file)