16 require_once __DIR__ .
'/../transport/Constants.inc.php';
17 require_once __DIR__ .
'/../transport/Connection.inc.php';
18 require_once __DIR__ .
'/../transport/Request.inc.php';
20 require_once
'Constants.inc.php';
21 require_once
'Node.inc.php';
22 require_once
'NodeCommand.inc.php';
23 require_once
'NodeManageResponse.inc.php';
32 protected $transportRequest = NULL;
37 protected $transportConnection = NULL;
52 $this->error = $errorCode;
73 public function __construct($transportConnection = null, $transportRequest = null) {
75 $this->transportConnection = $transportConnection;
78 $this->transportRequest = $transportRequest;
85 $this->transportRequest = NULL;
86 $this->transportConnection = NULL;
102 $nodeManageResponseObject = new \HCE\admin\NodeManageResponse ();
111 $request = new \HCE\transport\Request (
$connection );
112 if (! $request->getErrorCode ()) {
116 $response = $request->execute ( $command->getMessageBody (),
$node->getTimeout () );
118 if ($response->getErrorCode ()) {
120 $nodeManageResponseObject->setErrorCode ( ERROR_TRANSPORT_REQUEST );
123 $nodeManageResponseObject->setResponse ( $response );
128 $nodeManageResponseObject->setErrorCode ( ERROR_CONNECTION_OPEN );
132 $nodeManageResponseObject->setErrorCode ( ERROR_REQUEST_CREATE );
136 $nodeManageResponseObject->setErrorCode ( ERROR_CONNECTION_CREATE );
139 return $nodeManageResponseObject;