ILIAS  Release_4_2_x_branch Revision 61807
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilRPCServerAdapter Class Reference
+ Inheritance diagram for ilRPCServerAdapter:
+ Collaboration 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

Detailed Description

Definition at line 37 of file class.ilRPCServerAdapter.php.

Member Function Documentation

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.

Returns
boolean success

protected

Definition at line 107 of file class.ilRPCServerAdapter.php.

Referenced by ilFO2PDF\send(), ilHTML2PDF\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.

Parameters
stringmessage name. Something like 'Indexer.ilFileIndexer'
arrayof objects. Array of XML_RPC_Value objects. (Params of remote procedures)
Returns
boolean success

protected

Definition at line 129 of file class.ilRPCServerAdapter.php.

Referenced by ilLuceneRPCAdapter\__prepareFlushIndex(), ilFO2PDF\__prepareFO2PDFParams(), ilLuceneRPCAdapter\__prepareHighlightParams(), ilHTML2PDF\__prepareHTML2PDFParams(), ilLuceneRPCAdapter\__prepareIndexFileParams(), ilLuceneRPCAdapter\__prepareIndexHTLMParams(), ilLuceneRPCAdapter\__preparePingParams(), ilLuceneRPCAdapter\__prepareQueryParams(), ilLuceneRPCAdapter\__prepareRefreshSettingsParams(), and ilLuceneRPCAdapter\__prepareSearchParams().

{
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 $ilDB, $ilErr, $ilLog, __checkPear(), and ilRPCServerSettings\getInstance().

Referenced by ilFO2PDF\ilFO2PDF(), ilHTML2PDF\ilHTML2PDF(), and ilLuceneRPCAdapter\ilLuceneRPCAdapter().

{
$this->log =& $ilLog;
$this->db =& $ilDB;
$this->err =& $ilErr;
$this->__checkPear();
$this->settings_obj = ilRPCServerSettings::getInstance();
}

+ 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.

Returns
object result object. Type is depend on the calles method

protected

Reimplemented in ilLuceneRPCAdapter, ilFO2PDF, and ilHTML2PDF.

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());
}

Field Documentation

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

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.


The documentation for this class was generated from the following file: