$message = sprintf('[%s:%d] This node (%s) is not accepting DHT bootstrap requests, but got one from session-id=%s,unl=%s/%s,status=%s,mode=%s',
$messageArray[0]->__toString(),
$this->getLine(),
- $messageArray[0]->getNodeInstance()->__toString(),
+ NodeObjectFactory::createNodeInstance()->__toString(),
$messageArray[1][XmlDhtBootstrapTemplateEngine::DHT_BOOTSTRAP_DATA_SESSION_ID],
$messageArray[1][XmlDhtBootstrapTemplateEngine::DHT_BOOTSTRAP_DATA_EXTERNAL_ADDRESS],
$messageArray[1][XmlDhtBootstrapTemplateEngine::DHT_BOOTSTRAP_DATA_INTERNAL_ADDRESS],
parent::__construct($className);
}
- /**
- * Getter for node instance
- *
- * @return $nodeInstance An instance of a node node
- */
- public final function getNodeInstance () {
- return $this->nodeInstance;
- }
-
- /**
- * Setter for node instance
- *
- * @param $nodeInstance An instance of a node node
- * @return void
- */
- protected final function setNodeInstance (NodeHelper $nodeInstance) {
- $this->nodeInstance = $nodeInstance;
- }
-
/**
* Setter for network package handler instance
*
// Get new instance
$handlerInstance = new NodeMessageDhtBootstrapHandler();
- // Get node instance
- $nodeInstance = NodeObjectFactory::createNodeInstance();
-
- // Debug message
- self::createDebugInstance(__CLASS__)->debugOutput('POOL[' . __METHOD__ . ':' . __LINE__ . ':] Setting node ...');
-
- // ... and set it here
- $handlerInstance->setNodeInstance($nodeInstance);
-
// Get a DHT instance
$dhtInstance = DhtObjectFactory::createDhtInstance('node');
*/
public function handleMessageData (array $messageData, Receivable $packageInstance) {
// Is this node accepting DHT bootstrap requests?
- if (!$this->getNodeInstance()->isAcceptingDhtBootstrap()) {
+ if (!NodeObjectFactory::createNodeInstance()->isAcceptingDhtBootstrap()) {
/*
* This node is not accepting DHT bootstrap requests.
*/
// Get new instance
$listenerInstance = new DefaultListenerPool();
- // Debug message
- self::createDebugInstance(__CLASS__)->debugOutput('POOL[' . __METHOD__ . ':' . __LINE__ . ':] Setting node ...');
-
- // Set the application instance
- $listenerInstance->setNodeInstance($nodeInstance);
-
// Return the prepared instance
return $listenerInstance;
}