Inheritance diagram for ilRPCServerAdapter:Public Member Functions | |
| ilRPCServerAdapter () | |
| setResponseTimeout ($a_response_timeout) | |
| & | send () |
| Send message to remote rpc server and get response. | |
| __checkPear () | |
| __initClient () | |
| Create RPC client object. | |
| __initMessage ($a_message_name, $params) | |
| Create RPC message object. | |
Data Fields | |
| $response_timeout = RPC_TIMEOUT | |
| $log = null | |
| $db = null | |
| $err = null | |
| $settings_obj = null | |
| $rpc_client = null | |
| $rpc_message = null | |
Definition at line 37 of file class.ilRPCServerAdapter.php.
| ilRPCServerAdapter::__checkPear | ( | ) |
Definition at line 90 of file class.ilRPCServerAdapter.php.
Referenced by ilRPCServerAdapter().
{
if(!include_once('XML/RPC.php'))
{
$this->log->write('ilLuceneRPCAdapter(): Cannot find pear library XML_RPC. Aborting');
$this->err->raiseError("Cannot find pear package 'XML_RPC'. Aborting ",$this->err->MESSAGE);
}
return true;
}
Here is the caller graph for this function:| ilRPCServerAdapter::__initClient | ( | ) |
Create RPC client object.
Settings are read from class RPCSServerSettings.
protected
Definition at line 107 of file class.ilRPCServerAdapter.php.
Referenced by ilFO2PDF::send(), and ilLuceneRPCAdapter::send().
{
include_once 'XML/RPC.php';
$this->rpc_client =& new XML_RPC_Client($this->settings_obj->getPath(),
$this->settings_obj->getHost(),
$this->settings_obj->getPort());
#$this->rpc_client->setDebug(1);
return true;
}
Here is the caller graph for this function:| ilRPCServerAdapter::__initMessage | ( | $ | a_message_name, | |
| $ | params | |||
| ) |
Create RPC message object.
| string | message name. Something like 'Indexer.ilFileIndexer' | |
| array | of objects. Array of XML_RPC_Value objects. (Params of remote procedures) |
protected
Definition at line 129 of file class.ilRPCServerAdapter.php.
Referenced by ilLuceneRPCAdapter::__prepareFlushIndex(), ilFO2PDF::__prepareFO2PDFParams(), ilLuceneRPCAdapter::__prepareIndexFileParams(), ilLuceneRPCAdapter::__prepareIndexHTLMParams(), ilLuceneRPCAdapter::__preparePingParams(), and ilLuceneRPCAdapter::__prepareQueryParams().
{
include_once 'XML/RPC.php';
$this->rpc_message =& new XML_RPC_Message($a_message_name,$params);
// We create the payload here since it might be quite time consuming
// and this could cause a socket read exception on the server side.
$this->rpc_message->createPayload();
return true;
}
Here is the caller graph for this function:| ilRPCServerAdapter::ilRPCServerAdapter | ( | ) |
Definition at line 49 of file class.ilRPCServerAdapter.php.
References $ilErr, $ilLog, and __checkPear().
Referenced by ilFO2PDF::ilFO2PDF(), and ilLuceneRPCAdapter::ilLuceneRPCAdapter().
{
global $ilLog,$ilDB,$ilErr;
$this->log =& $ilLog;
$this->db =& $ilDB;
$this->err =& $ilErr;
$this->__checkPear();
$this->settings_obj =& new ilRPCServerSettings();
}
Here is the call graph for this function:
Here is the caller graph for this function:| & ilRPCServerAdapter::send | ( | ) |
Send message to remote rpc server and get response.
protected
Reimplemented in ilLuceneRPCAdapter, and ilFO2PDF.
Definition at line 74 of file class.ilRPCServerAdapter.php.
{
include_once 'XML/RPC.php';
if(!$response =& $this->rpc_client->send($this->rpc_message,$this->response_timeout))
{
$this->log->write("ilRPCServerAdapter: Communication error");
return null;
}
if($response->faultCode())
{
$this->log->write("ilRPCServerAdapter: Communication error: ". $response->faultString());
return null;
}
return XML_RPC_decode($response->value());
}
| ilRPCServerAdapter::setResponseTimeout | ( | $ | a_response_timeout | ) |
Definition at line 62 of file class.ilRPCServerAdapter.php.
Referenced by ilLuceneRPCAdapter::__prepareFlushIndex(), ilLuceneRPCAdapter::__prepareIndexFileParams(), ilLuceneRPCAdapter::__prepareIndexHTLMParams(), ilLuceneRPCAdapter::__preparePingParams(), and ilLuceneRPCAdapter::__prepareQueryParams().
{
$this->response_timeout = $a_response_timeout;
}
Here is the caller graph for this function:| ilRPCServerAdapter::$db = null |
Definition at line 41 of file class.ilRPCServerAdapter.php.
| ilRPCServerAdapter::$err = null |
Definition at line 42 of file class.ilRPCServerAdapter.php.
| ilRPCServerAdapter::$log = null |
Reimplemented in ilFO2PDF.
Definition at line 40 of file class.ilRPCServerAdapter.php.
| ilRPCServerAdapter::$response_timeout = RPC_TIMEOUT |
Definition at line 39 of file class.ilRPCServerAdapter.php.
| ilRPCServerAdapter::$rpc_client = null |
Definition at line 46 of file class.ilRPCServerAdapter.php.
| ilRPCServerAdapter::$rpc_message = null |
Definition at line 47 of file class.ilRPCServerAdapter.php.
| ilRPCServerAdapter::$settings_obj = null |
Definition at line 44 of file class.ilRPCServerAdapter.php.
1.7.1