<?php
// Own namespace
-namespace Hub\AptProxy;
+namespace Org\Mxchange\Hub\AptProxy;
// Import framework stuff
use Org\Mxchange\CoreFramework\Controller\Controller;
<?php
// Own namespace
-namespace Hub\Chat;
+namespace Org\Mxchange\Hub\Chat;
// Import framework stuff
use Org\Mxchange\CoreFramework\Controller\Controller;
<?php
// Own namespace
-namespace Hub\;
+namespace Org\Mxchange\Hub\;
// Import application-specific stuff
-use Hub\Generic\BaseHubSystem;
+use Org\Mxchange\Hub\Generic\BaseHubSystem;
/**
* A ???
*
- * @author Roland Haeder <webmaster@ship-simu.org>
+ * @author Roland Haeder <webmaster@shipsimu.org>
* @version 0.0.0
* @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2015 Hub Developer Team
* @license GNU GPL 3.0 or any newer version
- * @link http://www.ship-simu.org
+ * @link http://www.shipsimu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
// Return the prepared instance
return $!!!Instance;
}
-}
-// [EOF]
-?>
+}
<?php
// Own namespace
-namespace Hub\;
+namespace Org\Mxchange\Hub\;
// Import application-specific stuff
-use Hub\Generic\BaseHubSystem;
+use Org\Mxchange\Hub\Generic\BaseHubSystem;
/**
* A general ??? class
*
- * @author Roland Haeder <webmaster@ship-simu.org>
+ * @author Roland Haeder <webmaster@shipsimu.org>
* @version 0.0.0
* @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2015 Hub Developer Team
* @license GNU GPL 3.0 or any newer version
- * @link http://www.ship-simu.org
+ * @link http://www.shipsimu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-class Base??? extends BaseHubSystem {
+abstract class Base??? extends BaseHubSystem {
/**
* Protected constructor
*
// Call parent constructor
parent::__construct($className);
}
-}
-// [EOF]
-?>
+}
/**
* A ???->node communicator class
*
- * @author Roland Haeder <webmaster@ship-simu.org>
+ * @author Roland Haeder <webmaster@shipsimu.org>
* @version 0.0.0
* @copyright Copyright (c) 2014 !!! Developer Team
* @license GNU GPL 3.0 or any newer version
- * @link http://www.ship-simu.org
+ * @link http://www.shipsimu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
// Return the prepared instance
return $communicatorInstance;
}
-}
-// [EOF]
-?>
+}
/**
* A general communicator class
*
- * @author Roland Haeder <webmaster@ship-simu.org>
+ * @author Roland Haeder <webmaster@shipsimu.org>
* @version 0.0.0
* @copyright Copyright (c) 2015 Hub Developer Team
* @license GNU GPL 3.0 or any newer version
- * @link http://www.ship-simu.org
+ * @link http://www.shipsimu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/**
* A crawler->node communicator class
*
- * @author Roland Haeder <webmaster@ship-simu.org>
+ * @author Roland Haeder <webmaster@shipsimu.org>
* @version 0.0.0
* @copyright Copyright (c) 2014 Crawler Developer Team
* @license GNU GPL 3.0 or any newer version
- * @link http://www.ship-simu.org
+ * @link http://www.shipsimu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
// Return the prepared instance
return $communicatorInstance;
}
-}
-// [EOF]
-?>
+}
/**
* A miner->node communicator class
*
- * @author Roland Haeder <webmaster@ship-simu.org>
+ * @author Roland Haeder <webmaster@shipsimu.org>
* @version 0.0.0
* @copyright Copyright (c) 2014 Miner Developer Team
* @license GNU GPL 3.0 or any newer version
- * @link http://www.ship-simu.org
+ * @link http://www.shipsimu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
// Return the prepared instance
return $communicatorInstance;
}
-}
-// [EOF]
-?>
+}
<?php
// Own namespace
-namespace Hub\Crawler;
+namespace Org\Mxchange\Hub\Crawler;
// Import framework stuff
use Org\Mxchange\CoreFramework\Response\Responseable;
<?php
// Own namespace
-namespace Hub\Cruncher;
+namespace Org\Mxchange\Hub\Cruncher;
// Import framework stuff
use Org\Mxchange\CoreFramework\Registry\Registerable;
// Import application-specific stuff
use Org\Shipsimu\Hub\Database\Frontend\BaseHubDatabaseWrapper;
-use Org\Shipsimu\Hub\Database\Frontend\Node\Information\NodeInformationDatabaseWrapper;
use Org\Shipsimu\Hub\Factory\Node\NodeObjectFactory;
use Org\Shipsimu\Hub\Network\Package\NetworkPackage;
use Org\Shipsimu\Hub\Node\BaseHubNode;
use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
use Org\Mxchange\CoreFramework\Handler\DataSet\HandleableDataSet;
use Org\Mxchange\CoreFramework\Registry\Registerable;
+use Org\Mxchange\CoreFramework\Result\Search\SearchableResult;
/**
* A database wrapper for distributed hash tables
use Org\Shipsimu\Hub\Database\Frontend\BaseHubDatabaseWrapper;
use Org\Shipsimu\Hub\Database\Frontend\Node\NodeInformationWrapper;
use Org\Shipsimu\Hub\Node\BaseHubNode;
-use Org\Shipsimu\Hub\Helper\Node\NodeHelper;
+use Org\Shipsimu\Hub\Node\Node;
// Import framework stuff
use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
use Org\Mxchange\CoreFramework\Criteria\Local\LocalSearchCriteria;
use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
use Org\Mxchange\CoreFramework\Registry\Registerable;
-use Org\Mxchange\CoreFramework\Request\Requestable;
/**
* A database wrapper for node informations
/**
* Checks whether there is an entry for given node instance
*
- * @param $nodeInstance An instance of a NodeHelper class
+ * @param $nodeInstance An instance of a Node class
* @return $isFound Whether a node id has been found for this node
*/
- public function ifNodeDataIsFound (NodeHelper $nodeInstance) {
+ public function ifNodeDataIsFound (Node $nodeInstance) {
// Is there cache?
if (!isset($GLOBALS[__METHOD__])) {
// Now get a search criteria instance
* This may sound confusing but avoids double code very nicely...
*
* @param $nodeInstance A node instance
- * @param $requestInstance An instance of a Requestable class
* @return void
*/
- public function registerNodeId (BaseHubNode $nodeInstance, Requestable $requestInstance) {
+ public function registerNodeId (BaseHubNode $nodeInstance) {
// Get a dataset instance
$dataSetInstance = ObjectFactory::createObjectByConfiguredName('dataset_criteria_class', array(self::DB_TABLE_NODE_INFORMATION));
$dataSetInstance->setUniqueKey(self::DB_COLUMN_NODE_ID);
// Add registration elements to the dataset
- $nodeInstance->addElementsToDataSet($dataSetInstance, $requestInstance);
+ $nodeInstance->addElementsToDataSet($dataSetInstance);
// "Insert" this dataset instance completely into the database
$this->queryInsertDataSet($dataSetInstance);
* This may sound confusing but avoids double code very nicely...
*
* @param $nodeInstance An instance of a BaseHubNode class
- * @param $requestInstance An instance of a Requestable class
* @param $searchInstance An instance of a LocalSearchCriteria class
* @return void
*/
- public function registerSessionId (BaseHubNode $nodeInstance, Requestable $requestInstance, LocalSearchCriteria $searchInstance) {
+ public function registerSessionId (BaseHubNode $nodeInstance, LocalSearchCriteria $searchInstance) {
// Get a dataset instance
$dataSetInstance = ObjectFactory::createObjectByConfiguredName('dataset_criteria_class', array(self::DB_TABLE_NODE_INFORMATION));
$dataSetInstance->setUniqueKey(self::DB_COLUMN_NODE_ID);
// Add registration elements to the dataset
- $nodeInstance->addElementsToDataSet($dataSetInstance, $requestInstance);
+ $nodeInstance->addElementsToDataSet($dataSetInstance);
// Update database record
$this->queryUpdateDataSet($dataSetInstance);
* This may sound confusing but avoids double code very nicely...
*
* @param $nodeInstance An instance of a BaseHubNode class
- * @param $requestInstance An instance of a Requestable class
* @param $searchInstance An instance of a LocalSearchCriteria class
* @return void
*/
- public function registerPrivateKey (BaseHubNode $nodeInstance, Requestable $requestInstance, LocalSearchCriteria $searchInstance) {
+ public function registerPrivateKey (BaseHubNode $nodeInstance, LocalSearchCriteria $searchInstance) {
// Get a dataset instance
$dataSetInstance = ObjectFactory::createObjectByConfiguredName('dataset_criteria_class', array(self::DB_TABLE_NODE_INFORMATION));
$dataSetInstance->setSearchInstance($searchInstance);
// Add registration elements to the dataset
- $nodeInstance->addElementsToDataSet($dataSetInstance, $requestInstance);
+ $nodeInstance->addElementsToDataSet($dataSetInstance);
// Update database record
$this->queryUpdateDataSet($dataSetInstance);
<?php
// Own namespace
-namespace Hub\Decoder\;
+namespace Org\Mxchange\Hub\Decoder\;
// Import application-specific stuff
-use Hub\Decoder\BaseDecoder;
-use Hub\Decoder\Decodeable;
+use Org\Mxchange\Hub\Decoder\BaseDecoder;
+use Org\Mxchange\Hub\Decoder\Decodeable;
/**
* A ??? decoder class
*
- * @author Roland Haeder <webmaster@ship-simu.org>
+ * @author Roland Haeder <webmaster@shipsimu.org>
* @version 0.0.0
* @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2015 Hub Developer Team
* @license GNU GPL 3.0 or any newer version
- * @link http://www.ship-simu.org
+ * @link http://www.shipsimu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
// Return the prepared instance
return $decoderInstance;
}
-}
-// [EOF]
-?>
+}
<?php
// Own namespace
-namespace Hub\Dht\;
+namespace Org\Mxchange\Hub\Dht\;
// Import application-specific stuff
-use Hub\Dht\BaseDht;
-use Hub\Dht\Distributable;
+use Org\Mxchange\Hub\Dht\BaseDht;
+use Org\Mxchange\Hub\Dht\Distributable;
/**
* A ??? DHT facade class
// Import framework stuff
use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
+use Org\Mxchange\CoreFramework\Result\Search\SearchableResult;
/**
* A general DHT class
use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
use Org\Mxchange\CoreFramework\Handler\DataSet\HandleableDataSet;
use Org\Mxchange\CoreFramework\Registry\Registerable;
+use Org\Mxchange\CoreFramework\Result\Search\SearchableResult;
/**
* A Node DHT facade class
<?php
// Own namespace
-namespace Hub\Discovery\;
+namespace Org\Mxchange\Hub\Discovery\;
/**
* A !!! discovery class
// Import application-specific stuff
use Org\Shipsimu\Hub\Discovery\Node\BaseNodeDiscovery;
use Org\Shipsimu\Hub\Factory\Resolver\Protocol\ProtocolResolverFactory;
-use Org\Shipsimu\Hub\Helper\Node\NodeHelper;
+use Org\Shipsimu\Hub\Node\Node;
// Import framework stuff
+use Org\Mxchange\CoreFramework\Generic\NullPointerException;
use Org\Mxchange\CoreFramework\Registry\Registerable;
/**
}
/**
- * "Discovers" an instance of a LocateableNode class for given NodeHelper class
+ * "Discovers" an instance of a LocateableNode class for given Node class
*
- * @param $nodeInstance An instance of a NodeHelper class
+ * @param $nodeInstance An instance of a Node class
* @return $unlInstance An instance of a LocateableNode class
+ * @throws NullPointerException If $unlInstance is NULL
*/
- public function discoverUniversalNodeLocatorByNode (NodeHelper $nodeInstance) {
+ public function discoverUniversalNodeLocatorByNode (Node $nodeInstance) {
/*
* First get an instance from the configured hub communication protocol
* type (which is mostly TCP, so you get a TcpProtocolResolver here).
$resolverInstance = ProtocolResolverFactory::createResolverFromConfiguredProtocol();
// Then resolve the node instance into an UNL instance
- $unlInstance = $resolverInstance->resolveUniversalNodeLocatorFromNodeHelper($nodeInstance);
+ $unlInstance = $resolverInstance->resolveUniversalNodeLocatorFromNode($nodeInstance);
+
+ // Is the instance given?
+ if (is_null($unlInstance)) {
+ // Throw NPE here
+ throw new NullPointerException($this, self::EXCEPTION_IS_NULL_POINTER);
+ } // END - if
// ... and return it
return $unlInstance;
<?php
// Own namespace
-namespace Hub\Discovery\Recipient\;
+namespace Org\Mxchange\Hub\Discovery\Recipient\;
// Import framework-specific stuff
-use Hub\Discovery\Recipient\BaseRecipientDiscovery;
+use Org\Mxchange\Hub\Discovery\Recipient\BaseRecipientDiscovery;
/**
* A !!! recipient discovery class
<?php
// Own namespace
-namespace Hub\Factory\;
+namespace Org\Mxchange\Hub\Factory\;
// Import framework stuff
use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
/**
* A factory class for !!!
*
- * @author Roland Haeder <webmaster@ship-simu.org>
+ * @author Roland Haeder <webmaster@shipsimu.org>
* @version 0.0.0
* @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2015 Hub Developer Team
* @license GNU GPL 3.0 or any newer version
- * @link http://www.ship-simu.org
+ * @link http://www.shipsimu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/**
* A factory class for Decodeable objects
*
- * @author Roland Haeder <webmaster@ship-simu.org>
+ * @author Roland Haeder <webmaster@shipsimu.org>
* @version 0.0.0
* @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2015 Hub Developer Team
* @license GNU GPL 3.0 or any newer version
- * @link http://www.ship-simu.org
+ * @link http://www.shipsimu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
// Return the instance
return $decoderInstance;
}
-}
-// [EOF]
-?>
+}
/**
* A factory class for ShareableInfo
*
- * @author Roland Haeder <webmaster@ship-simu.org>
+ * @author Roland Haeder <webmaster@shipsimu.org>
* @version 0.0.0
* @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2017 Hub Developer Team
* @license GNU GPL 3.0 or any newer version
- * @link http://www.ship-simu.org
+ * @link http://www.shipsimu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/**
* A factory class for LocateableNode
*
- * @author Roland Haeder <webmaster@ship-simu.org>
+ * @author Roland Haeder <webmaster@shipsimu.org>
* @version 0.0.0
* @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2015 Hub Developer Team
* @license GNU GPL 3.0 or any newer version
- * @link http://www.ship-simu.org
+ * @link http://www.shipsimu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*/
public static final function createUnlInstanceFromString ($unl) {
// Trace message
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('UNL-FACTORY: unl=%s - CALLED!', $unl));
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('UNL-FACTORY: unl=%s - CALLED!', $unl));
// If there is no handler?
if (Registry::getRegistry()->instanceExists('unl_' . $unl)) {
Registry::getRegistry()->addInstance('unl_' . $unl, $unlInstance);
}
+ // Trace message
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('UNL-FACTORY: unlInstance[]=%s - EXIT!', gettype($unlInstance)));
+
// Return the instance
return $unlInstance;
}
}
/**
- * Returns a singleton (registry-based) NodeHelper instance
+ * Returns a singleton (registry-based) Node instance
*
* @param $requestInstance An instance of a class with an Requestable interface
* @param $responseInstance An instance of a class with an Responseable interface
- * @return $nodeInstance An instance of a NodeHelper class
+ * @return $nodeInstance An instance of a Node class
* @throws FactoryRequiredParameterException If not all parameters are set and no instance 'node' is set.
*/
public static final function createNodeInstance (Requestable $requestInstance = NULL, Responseable $responseInstance = NULL) {
/**
* A factory class for ProtocolResolver
*
- * @author Roland Haeder <webmaster@ship-simu.org>
+ * @author Roland Haeder <webmaster@shipsimu.org>
* @version 0.0.0
* @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2015 Hub Developer Team
* @license GNU GPL 3.0 or any newer version
- * @link http://www.ship-simu.org
+ * @link http://www.shipsimu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
// Return the instance
return $resolverInstance;
}
-}
-// [EOF]
-?>
+}
/**
* A factory class for scanners
*
- * @author Roland Haeder <webmaster@ship-simu.org>
+ * @author Roland Haeder <webmaster@shipsimu.org>
* @version 0.0.0
* @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2015 Hub Developer Team
* @license GNU GPL 3.0 or any newer version
- * @link http://www.ship-simu.org
+ * @link http://www.shipsimu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
// Return the instance
return $scannerInstance;
}
-}
-// [EOF]
-?>
+}
/**
* A factory class for URL sources
*
- * @author Roland Haeder <webmaster@ship-simu.org>
+ * @author Roland Haeder <webmaster@shipsimu.org>
* @version 0.0.0
* @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2015 Hub Developer Team
* @license GNU GPL 3.0 or any newer version
- * @link http://www.ship-simu.org
+ * @link http://www.shipsimu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
// Return the instance
return $sourceInstance;
}
-}
-// [EOF]
-?>
+}
// Import application-specific stuff
use Org\Shipsimu\Hub\Factory\Node\NodeObjectFactory;
-use Org\Shipsimu\Hub\Helper\Node\NodeHelper;
+use Org\Shipsimu\Hub\Node\Node;
// Import framework stuff
use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
* given node instance.
*
* @param $stateName Name of the state
- * @param $nodeInstance An instance of a NodeHelper class (optional)
+ * @param $nodeInstance An instance of a Node class (optional)
* @return $stateInstance A Stateable class instance
*/
- public static final function createNodeStateInstanceByName ($stateName, NodeHelper $nodeInstance = NULL) {
+ public static final function createNodeStateInstanceByName ($stateName, Node $nodeInstance = NULL) {
// Then construct the class' configuraton entry
$className = 'node_' . $stateName . '_state_class';
use Org\Mxchange\CoreFramework\Feature\FrameworkFeature;
// Import other libraries
-use DomBlack\Scrypt\Scrypt;
+use Com\Github\DomBlack\Scrypt\Scrypt;
/**
* A HubcoinReward Feature class
*
- * @author Roland Haeder <webmaster@ship-simu.org>
+ * @author Roland Haeder <webmaster@shipsimu.org>
* @version 0.0.0
* @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2015 Hub Developer Team
* @license GNU GPL 3.0 or any newer version
- * @link http://www.ship-simu.org
+ * @link http://www.shipsimu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*/
public function isFeatureAvailable () {
// Debug message
- /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d]: CALLED!', __METHOD__, __LINE__));
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d]: CALLED!', __METHOD__, __LINE__));
// Testing this feature is pretty simple:
$isAvailable = (($this->getConfigInstance()->getConfigEntry('extension_scrypt_loaded') === TRUE) && (extension_loaded('scrypt')) && (is_callable('scrypt')));
// Debug message
- /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d]: isAvailable=%d - EXIT!', __METHOD__, __LINE__, intval($isAvailable)));
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d]: isAvailable=%d - EXIT!', __METHOD__, __LINE__, intval($isAvailable)));
// Return status
return $isAvailable;
*/
public function featureMethodGenerateHash ($data) {
// Debug message
- /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d]: data()=%d - CALLED!', __METHOD__, __LINE__, strlen($data)));
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d]: data()=%d - CALLED!', __METHOD__, __LINE__, strlen($data)));
// Make sure the feature is available
assert(FrameworkFeature::isFeatureAvailable('hubcoin_reward'));
$hash = Scrypt::hashScrypt($data);
// Debug message
- /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d]: hash=%s - EXIT!', __METHOD__, __LINE__, $hash));
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d]: hash=%s - EXIT!', __METHOD__, __LINE__, $hash));
// Return generated hash
return $hash;
*/
public function featureMethodCheckHash ($data, $hash) {
// Debug message
- /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d]: data()=%d,hash=%s - CALLED!', __METHOD__, __LINE__, strlen($data), $hash));
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d]: data()=%d,hash=%s - CALLED!', __METHOD__, __LINE__, strlen($data), $hash));
// Make sure the feature is available
assert(FrameworkFeature::isFeatureAvailable('hubcoin_reward'));
$isValid = Scrypt::checkScrypt($data, $hash);
// Debug message
- /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d]: isValid=%d - EXIT!', __METHOD__, __LINE__, intval($isValid)));
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d]: isValid=%d - EXIT!', __METHOD__, __LINE__, intval($isValid)));
// Return status
return $isValid;
<?php
// Own namespace
-namespace Hub\Filter\Activation\Node\;
+namespace Org\Mxchange\Hub\Filter\Activation\Node\;
// Import application-specific stuff
-use Hub\Factory\Node\NodeObjectFactory;
-use Hub\Filter\Node\BaseNodeFilter;
+use Org\Mxchange\Hub\Factory\Node\NodeObjectFactory;
+use Org\Mxchange\Hub\Filter\Node\BaseNodeFilter;
// Import framework stuff
use Org\Mxchange\CoreFramework\Filter\Filterable;
<?php
// Own namespace
-namespace Hub\Filter\Bootstrap\AptProxy\;
+namespace Org\Mxchange\Hub\Filter\Bootstrap\AptProxy\;
// Import framework stuff
use Org\Mxchange\CoreFramework\Filter\Filterable;
<?php
// Own namespace
-namespace Hub\Filter\Bootstrap\Chat\;
+namespace Org\Mxchange\Hub\Filter\Bootstrap\Chat\;
// Import framework stuff
use Org\Mxchange\CoreFramework\Filter\Filterable;
<?php
// Own namespace
-namespace Hub\Filter\Bootstrap\Crawler\;
+namespace Org\Mxchange\Hub\Filter\Bootstrap\Crawler\;
// Import framework stuff
use Org\Mxchange\CoreFramework\Filter\Filterable;
<?php
// Own namespace
-namespace Hub\Filter\Bootstrap\Cruncher\;
+namespace Org\Mxchange\Hub\Filter\Bootstrap\Cruncher\;
// Import framework stuff
use Org\Mxchange\CoreFramework\Filter\Filterable;
<?php
// Own namespace
-namespace Hub\Filter\Bootstrap\Miner\;
+namespace Org\Mxchange\Hub\Filter\Bootstrap\Miner\;
// Import framework stuff
use Org\Mxchange\CoreFramework\Filter\Filterable;
<?php
// Own namespace
-namespace Hub\Filter\Bootstrap\Node\;
+namespace Org\Mxchange\Hub\Filter\Bootstrap\Node\;
// Import application-specific stuff
-use Hub\Factory\Node\NodeObjectFactory;
-use Hub\Filter\Node\BaseNodeFilter;
+use Org\Mxchange\Hub\Factory\Node\NodeObjectFactory;
+use Org\Mxchange\Hub\Filter\Node\BaseNodeFilter;
// Import framework stuff
use Org\Mxchange\CoreFramework\Filter\Filterable;
<?php
// Own namespace
-namespace Hub\Filter\Chat\;
+namespace Org\Mxchange\Hub\Filter\Chat\;
// Import framework stuff
use Org\Mxchange\CoreFramework\Filter\Filterable;
<?php
// Own namespace
-namespace Hub\!!!\Filter\;
+namespace Org\Mxchange\Hub\!!!\Filter\;
// Import application-specific stuff
-use Hub\Factory\Node\NodeObjectFactory;
-use Hub\Filter\BaseHubFilter;
+use Org\Mxchange\Hub\Factory\Node\NodeObjectFactory;
+use Org\Mxchange\Hub\Filter\BaseHubFilter;
// Import framework stuff
use Org\Mxchange\CoreFramework\Filter\Filterable;
<?php
// Own namespace
-namespace Hub\Filter\Cruncher\;
+namespace Org\Mxchange\Hub\Filter\Cruncher\;
// Import framework stuff
use Org\Mxchange\CoreFramework\Filter\Filterable;
<?php
// Own namespace
-namespace Hub\Filter\Miner\;
+namespace Org\Mxchange\Hub\Filter\Miner\;
// Import framework stuff
use Org\Mxchange\CoreFramework\Filter\Filterable;
<?php
// Own namespace
-namespace Hub\Filter\Node\;
+namespace Org\Mxchange\Hub\Filter\Node\;
// Import application-specific stuff
-use Hub\Filter\Node\BaseNodeFilter;
+use Org\Mxchange\Hub\Filter\Node\BaseNodeFilter;
// Import framework stuff
use Org\Mxchange\CoreFramework\Filter\Filterable;
<?php
// Own namespace
-namespace Hub\Filter\Shutdown\Node\;
+namespace Org\Mxchange\Hub\Filter\Shutdown\Node\;
// Import application-specific stuff
-use Hub\Factory\Node\NodeObjectFactory;
-use Hub\Filter\Node\BaseNodeFilter;
+use Org\Mxchange\Hub\Factory\Node\NodeObjectFactory;
+use Org\Mxchange\Hub\Filter\Node\BaseNodeFilter;
// Import framework stuff
use Org\Mxchange\CoreFramework\Filter\Filterable;
use Org\Shipsimu\Hub\Network\Package\Fragment\PackageFragmenter;
// Import framework stuff
+use Org\Mxchange\CoreFramework\Assertion\AssertionException;
use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
use Org\Mxchange\CoreFramework\Registry\Registerable;
<?php
// Own namespace
-namespace Hub\Handler\Network\;
+namespace Org\Mxchange\Hub\Handler\Network\;
// Import application-specific stuff
-use Hub\Network\Networkable;
+use Org\Mxchange\Hub\Network\Networkable;
/**
* A ??? network package handler
<?php
// Own namespace
-namespace Hub\Handler\Message\;
+namespace Org\Mxchange\Hub\Handler\Message\;
// Import framework stuff
use Org\Mxchange\CoreFramework\Criteria\Storing\StoreableCriteria;
<?php
// Own namespace
-namespace Hub\Handler\Protocol\;
+namespace Org\Mxchange\Hub\Handler\Protocol\;
// Import appplication-specific stuff
-use Hub\Handler\Protocol\BaseProtocolHandler;
-use Hub\Handler\Protocol\HandleableProtocol;
+use Org\Mxchange\Hub\Handler\Protocol\BaseProtocolHandler;
+use Org\Mxchange\Hub\Handler\Protocol\HandleableProtocol;
// Import framework stuff
use Org\Mxchange\CoreFramework\Registry\Registerable;
<?php
// Own namespace
-namespace Hub\Handler\Protocol\;
+namespace Org\Mxchange\Hub\Handler\Protocol\;
// Import application-specific stuff
-use Hub\Handler\Protocol\Network\IpV4\BaseIpV4Handler;
+use Org\Mxchange\Hub\Handler\Protocol\Network\IpV4\BaseIpV4Handler;
// Import framework stuff
<?php
// Own namespace
-namespace Hub\Handler\Network\RawData;
+namespace Org\Mxchange\Hub\Handler\Network\RawData;
// Import application-specific stuff
-use Hub\Handler\Network\RawData\BaseRawDataHandler;
-use Hub\Network\Networkable;
+use Org\Mxchange\Hub\Handler\Network\RawData\BaseRawDataHandler;
+use Org\Mxchange\Hub\Network\Networkable;
/**
* A !!! raw data handler
?>
// Own namespace
-namespace Hub\Listener\;
+namespace Org\Mxchange\Hub\Listener\;
// Import application-specific stuff
-use Hub\Helper\Node\NodeHelper;
-use Hub\Listener\BaseListener;
-use Hub\Listener\Listenable;
+use Org\Mxchange\Hub\Listener\BaseListener;
+use Org\Mxchange\Hub\Listener\Listenable;
+use Org\Mxchange\Hub\Node\Node;
// Import framework stuff
use Org\Mxchange\CoreFramework\Visitor\Visitable;
/**
* Creates an instance of this class
*
- * @param $nodeInstance A NodeHelper instance
+ * @param $nodeInstance An instance of a Node class
* @return $listenerInstance An instance a prepared listener class
*/
- public final static function create???Listener (NodeHelper $nodeInstance) {
+ public final static function create???Listener (Node $nodeInstance) {
// Get new instance
$listenerInstance = new ???Listener();
<?php
// Own namespace
-namespace Hub\Helper\;
+namespace Org\Mxchange\Hub\Helper\;
// Import application-specific stuff
-use Hub\Factory\Network\NetworkPackageFactory;
-use Hub\Helper\BaseHubSystemHelper;
-use Hub\Network\Package\NetworkPackage;
+use Org\Mxchange\Hub\Factory\Network\NetworkPackageFactory;
+use Org\Mxchange\Hub\Helper\BaseHubSystemHelper;
+use Org\Mxchange\Hub\Network\Package\NetworkPackage;
/**
* A ??? !!! helper class
<?php
// Own namespace
-namespace Hub\Helper\Connection\;
+namespace Org\Mxchange\Hub\Helper\Connection\;
// Import application-specific stuff
-use Hub\Helper\Connection\BaseConnectionHelper;
-use Hub\Helper\Connection\ConnectionHelper;
+use Org\Mxchange\Hub\Helper\Connection\BaseConnectionHelper;
+use Org\Mxchange\Hub\Helper\Connection\ConnectionHelper;
/**
* A ??? connection helper class
// Debug message
self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONNECTION-HELPER: Failed to resolve ' . $packageData[NetworkPackage::PACKAGE_DATA_RECIPIENT] . ':' . $e->getMessage());
- // Is the recipient equal as configured IP
+ // Is the recipient equal as configured UNL?
if (substr($packageData[NetworkPackage::PACKAGE_DATA_RECIPIENT], 0, strlen($helperInstance->getConfigInstance()->getConfigEntry('external_address'))) == $helperInstance->getConfigInstance()->getConfigEntry('external_address')) {
// This may connect to shipsimu.org and requests 'ip.php' which will return our external IP address
$unlAddress = HubTools::determineExternalAddress();
// Import application-specific stuff
use Org\Shipsimu\Hub\Factory\Network\NetworkPackageFactory;
use Org\Shipsimu\Hub\Helper\Node\BaseNodeHelper;
-use Org\Shipsimu\Hub\Helper\Node\NodeHelper;
+use Org\Shipsimu\Hub\Helper\Node\HelpableNode;
use Org\Shipsimu\Hub\Network\Package\NetworkPackage;
-use Org\Shipsimu\Hub\Node\Helper\HelpableNode;
+use Org\Shipsimu\Hub\Node\Node;
// Import framework stuff
use Org\Mxchange\CoreFramework\Factory\Template\XmlTemplateEngineFactory;
/**
* Loads the announcement descriptor for parsing
*
- * @param $nodeInstance An instance of a NodeHelper class
+ * @param $nodeInstance An instance of a Node class
* @return void
*/
- public function loadDescriptorXml (NodeHelper $nodeInstance) {
+ public function loadDescriptorXml (Node $nodeInstance) {
// Debug message
self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('HELPER: Starting with announcement to upper hubs...');
* the code. After this wents fine, the rendered content got "packaged"
* for network delivery.
*
- * @param $nodeInstance An instance of a NodeHelper class
+ * @param $nodeInstance An instance of a Node class
* @return void
*/
- public function sendPackage (NodeHelper $nodeInstance) {
+ public function sendPackage (Node $nodeInstance) {
// Sanity check: Is the node in the approx. state? (active)
$nodeInstance->getStateInstance()->validateNodeStateIsActiveOrReachable();
// Import application-specific stuff
use Org\Shipsimu\Hub\Factory\Network\NetworkPackageFactory;
-use Org\Shipsimu\Hub\Helper\Node\NodeHelper;
-use Org\Shipsimu\Hub\Node\Helper\HelpableNode;
+use Org\Shipsimu\Hub\Helper\Node\HelpableNode;
+use Org\Shipsimu\Hub\Node\Node;
// Import framework stuff
use Org\Mxchange\CoreFramework\Factory\Template\XmlTemplateEngineFactory;
/**
* Loads the descriptor XML file
*
- * @param $nodeInstance An instance of a NodeHelper class
+ * @param $nodeInstance An instance of a Node class
* @return void
*/
- public function loadDescriptorXml (NodeHelper $nodeInstance) {
+ public function loadDescriptorXml (Node $nodeInstance) {
// Debug message
self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('HELPER: Attempting to answer an announcement...');
/**
* Send out announcement answer package
*
- * @param $nodeInstance An instance of a NodeHelper class
+ * @param $nodeInstance An instance of a Node class
* @return void
*/
- public function sendPackage (NodeHelper $nodeInstance) {
+ public function sendPackage (Node $nodeInstance) {
// Sanity check: Is the node in the approx. state? (active/reachable)
$nodeInstance->getStateInstance()->validateNodeStateIsActiveOrReachable();
// Import application-specific stuff
use Org\Shipsimu\Hub\Factory\Network\NetworkPackageFactory;
-use Org\Shipsimu\Hub\Helper\Node\NodeHelper;
-use Org\Shipsimu\Hub\Node\Helper\HelpableNode;
+use Org\Shipsimu\Hub\Helper\Node\HelpableNode;
+use Org\Shipsimu\Hub\Node\Node;
use Org\Shipsimu\Hub\Template\Engine\Xml\Dht\Bootstrap\XmlDhtBootstrapTemplateEngine;
// Import framework stuff
/**
* Loads the descriptor XML file
*
- * @param $nodeInstance An instance of a NodeHelper class
+ * @param $nodeInstance An instance of a Node class
* @return void
*/
- public function loadDescriptorXml (NodeHelper $nodeInstance) {
+ public function loadDescriptorXml (Node $nodeInstance) {
// Debug message
self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('HELPER: Attempting to answer a DHT bootstrap request...');
/**
* Send out announcement answer package
*
- * @param $nodeInstance An instance of a NodeHelper class
+ * @param $nodeInstance An instance of a Node class
* @return void
*/
- public function sendPackage (NodeHelper $nodeInstance) {
+ public function sendPackage (Node $nodeInstance) {
// Sanity check: Is the node in the approx. state? (active/reachable)
$nodeInstance->getStateInstance()->validateNodeStateIsActiveOrReachable();
// Import application-specific stuff
use Org\Shipsimu\Hub\Factory\Network\NetworkPackageFactory;
-use Org\Shipsimu\Hub\Helper\Node\NodeHelper;
-use Org\Shipsimu\Hub\Node\Helper\HelpableNode;
+use Org\Shipsimu\Hub\Helper\Node\HelpableNode;
+use Org\Shipsimu\Hub\Node\Node;
// Import framework stuff
use Org\Mxchange\CoreFramework\Factory\Template\XmlTemplateEngineFactory;
/**
* Loads the descriptor XML file
*
- * @param $nodeInstance An instance of a NodeHelper class
+ * @param $nodeInstance An instance of a Node class
* @return void
*/
- public function loadDescriptorXml (NodeHelper $nodeInstance) {
+ public function loadDescriptorXml (Node $nodeInstance) {
// Debug message
self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('HELPER: Attempting to answer a request: node-list...');
/**
* Send out request-node-list answer package
*
- * @param $nodeInstance An instance of a NodeHelper class
+ * @param $nodeInstance An instance of a Node class
* @return void
*/
- public function sendPackage (NodeHelper $nodeInstance) {
+ public function sendPackage (Node $nodeInstance) {
// Sanity check: Is the node in the approx. state? (active/reachable)
$nodeInstance->getStateInstance()->validateNodeStateIsActiveOrReachable();
<?php
// Own namespace
-namespace Hub\Node\Helper\;
+namespace Org\Mxchange\Hub\Node\Helper\;
// Import application-specific stuff
-use Hub\Factory\Network\NetworkPackageFactory;
-use Hub\Helper\Node\BaseNodeHelper;
-use Hub\Helper\Node\NodeHelper;
-use Hub\Network\Package\NetworkPackage;
-use Hub\Node\Helper\HelpableNode;
+use Org\Mxchange\Hub\Factory\Network\NetworkPackageFactory;
+use Org\Mxchange\Hub\Helper\Node\BaseNode;
+use Org\Mxchange\Hub\Node\Node;
+use Org\Mxchange\Hub\Network\Package\NetworkPackage;
+use Org\Mxchange\Hub\Node\Helper\HelpableNode;
/**
* A ??? hub helper class
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-class Node???Helper extends BaseNodeHelper implements HelpableNode {
+class Node???Helper extends BaseNode implements HelpableNode {
/**
* Protected constructor
*
/**
* Do the helped attempt by delivering a package to ourselfs
*
- * @param $nodeInstance An instance of a NodeHelper class
+ * @param $nodeInstance An instance of a Node class
* @return void
*/
- public function sendPackage (NodeHelper $nodeInstance) {
+ public function sendPackage (Node $nodeInstance) {
// Sanity check: Is the node in the approx. state? (active)
$nodeInstance->getStateInstance()->validateNodeStateIsActive();
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-class BaseNodeHelper extends BaseHubSystemHelper {
+abstract class BaseNodeHelper extends BaseHubSystemHelper {
/**
* Protected constructor
*
// Import application-specific stuff
use Org\Shipsimu\Hub\Factory\Network\NetworkPackageFactory;
use Org\Shipsimu\Hub\Helper\Node\BaseNodeHelper;
-use Org\Shipsimu\Hub\Helper\Node\NodeHelper;
+use Org\Shipsimu\Hub\Helper\Node\HelpableNode;
use Org\Shipsimu\Hub\Network\Package\NetworkPackage;
-use Org\Shipsimu\Hub\Node\Helper\HelpableNode;
+use Org\Shipsimu\Hub\Node\Node;
use Org\Shipsimu\Hub\Tag\Tagable;
// Import framework stuff
/**
* Loads the descriptor XML file
*
- * @param $nodeInstance An instance of a NodeHelper class
+ * @param $nodeInstance An instance of a Node class
* @return void
*/
- public function loadDescriptorXml (NodeHelper $nodeInstance) {
+ public function loadDescriptorXml (Node $nodeInstance) {
// Debug message
self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('HELPER: Attempting self-connect...');
/**
* Do the self-connect attempt by delivering a package to ourselfs
*
- * @param $nodeInstance An instance of a NodeHelper class
+ * @param $nodeInstance An instance of a Node class
* @return void
*/
- public function sendPackage (NodeHelper $nodeInstance) {
+ public function sendPackage (Node $nodeInstance) {
// Sanity check: Is the node in the approx. state? (active)
$nodeInstance->getStateInstance()->validateNodeStateIsActiveOrAnnouncing();
// Import application-specific stuff
use Org\Shipsimu\Hub\Factory\Network\NetworkPackageFactory;
use Org\Shipsimu\Hub\Helper\Node\BaseNodeHelper;
-use Org\Shipsimu\Hub\Helper\Node\NodeHelper;
+use Org\Shipsimu\Hub\Helper\Node\HelpableNode;
use Org\Shipsimu\Hub\Network\Package\NetworkPackage;
-use Org\Shipsimu\Hub\Node\Helper\HelpableNode;
+use Org\Shipsimu\Hub\Node\Node;
// Import framework stuff
use Org\Mxchange\CoreFramework\Factory\Template\XmlTemplateEngineFactory;
/**
* Loads the descriptor XML file
*
- * @param $nodeInstance An instance of a NodeHelper class
+ * @param $nodeInstance An instance of a Node class
* @return void
*/
- public function loadDescriptorXml (NodeHelper $nodeInstance) {
+ public function loadDescriptorXml (Node $nodeInstance) {
// Debug message
self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('HELPER: Attempting to request: node-list...');
/**
* Do the helped attempt by delivering a package to ourselfs
*
- * @param $nodeInstance An instance of a NodeHelper class
+ * @param $nodeInstance An instance of a Node class
* @return void
*/
- public function sendPackage (NodeHelper $nodeInstance) {
+ public function sendPackage (Node $nodeInstance) {
// Sanity check: Is the node in the approx. state? (active)
$nodeInstance->getStateInstance()->validateNodeStateIsAnnouncementCompleted();
<?php
// Own namespace
-namespace Hub\Information\;
+namespace Org\Mxchange\Hub\Information\;
// Import application-specific stuff
-use Hub\Information\BaseInfo;
-use Hub\Information\ShareableInfo;
+use Org\Mxchange\Hub\Information\BaseInfo;
+use Org\Mxchange\Hub\Information\ShareableInfo;
/**
* A ??? information class
<?php
// Own namespace
-namespace Hub\Iterator\Handler\;
+namespace Org\Mxchange\Hub\Iterator\Handler\;
// Import framework stuff
use Org\Mxchange\CoreFramework\Iterator\BaseIterator;
<?php
// Own namespace
-namespace Hub\Iterator\Shutdown\;
+namespace Org\Mxchange\Hub\Iterator\Shutdown\;
// Import framework stuff
use Org\Mxchange\CoreFramework\Iterator\BaseIterator;
<?php
// Own namespace
-namespace Hub\Listener\!!!;
+namespace Org\Mxchange\Hub\Listener\!!!;
// Import application-specific stuff
-use Hub\Listener\BaseListener;
-use Hub\Listener\Listenable;
+use Org\Mxchange\Hub\Listener\BaseListener;
+use Org\Mxchange\Hub\Listener\Listenable;
// Import framework stuff
/**
* A ??? listener
*
- * @author Roland Haeder <webmaster@ship-simu.org>
+ * @author Roland Haeder <webmaster@shipsimu.org>
* @version 0.0.0
* @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2017 Hub Developer Team
* @license GNU GPL 3.0 or any newer version
- * @link http://www.ship-simu.org
+ * @link http://www.shipsimu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/**
* A file-based socket listener
*
- * @author Roland Haeder <webmaster@ship-simu.org>
+ * @author Roland Haeder <webmaster@shipsimu.org>
* @version 0.0.0
* @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2017 Hub Developer Team
* @license GNU GPL 3.0 or any newer version
- * @link http://www.ship-simu.org
+ * @link http://www.shipsimu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
?>
// Own namespace
-namespace Hub\Listener\Tcp\;
+namespace Org\Mxchange\Hub\Listener\Tcp\;
// Import application-specific stuff
-use Hub\Helper\Node\NodeHelper;
-use Hub\Listener\BaseListener;
-use Hub\Listener\Listenable;
+use Org\Mxchange\Hub\Node\Node;
+use Org\Mxchange\Hub\Listener\BaseListener;
+use Org\Mxchange\Hub\Listener\Listenable;
// Import framework stuff
use Org\Mxchange\CoreFramework\Visitor\Visitable;
/**
* A TCP ??? listener
*
- * @author Roland Haeder <webmaster@ship-simu.org>
+ * @author Roland Haeder <webmaster@shipsimu.org>
* @version 0.0.0
* @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2015 Hub Developer Team
* @license GNU GPL 3.0 or any newer version
- * @link http://www.ship-simu.org
+ * @link http://www.shipsimu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/**
* Creates an instance of this class
*
- * @param $nodeInstance A NodeHelper instance
+a * @param $nodeInstance An instance of a Node class
* @return $listenerInstance An instance a prepared listener class
*/
- public final static function create???Listener (NodeHelper $nodeInstance) {
+ public final static function create???Listener (Node $nodeInstance) {
// Get new instance
$listenerInstance = new ???Listener();
public function doListen() {
$this->partialStub('Need to implement this method.');
}
-}
-// [EOF]
-?>
+}
<?php
// Own namespace
-namespace Hub\Listener\Udp\;
+namespace Org\Mxchange\Hub\Listener\Udp\;
// Import application-specific stuff
-use Hub\Helper\Node\NodeHelper;
-use Hub\Listener\BaseListener;
-use Hub\Listener\Listenable;
+use Org\Mxchange\Hub\Node\Node;
+use Org\Mxchange\Hub\Listener\BaseListener;
+use Org\Mxchange\Hub\Listener\Listenable;
// Import framework stuff
/**
* An UDP ??? listener
*
- * @author Roland Haeder <webmaster@ship-simu.org>
+ * @author Roland Haeder <webmaster@shipsimu.org>
* @version 0.0.0
* @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2015 Hub Developer Team
* @license GNU GPL 3.0 or any newer version
- * @link http://www.ship-simu.org
+ * @link http://www.shipsimu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/**
* Creates an instance of this class
*
- * @param $nodeInstance A NodeHelper instance
+ * @param $nodeInstance An instance of a Node class
* @return $listenerInstance An instance a prepared listener class
*/
- public final static function createUdp???Listener (NodeHelper $nodeInstance) {
+ public final static function createUdp???Listener (Node $nodeInstance) {
// Get new instance
$listenerInstance = new Udp???Listener();
public function doListen() {
$this->partialStub('Need to implement this method.');
}
-}
-// [EOF]
-?>
+}
<?php
// Own namespace
-namespace Hub\Miner;
+namespace Org\Mxchange\Hub\Miner;
// Import framework stuff
use Org\Mxchange\CoreFramework\Registry\Registerable;
/**
* A hub-miner class for the '???' mode
*
- * @author Roland Haeder <webmaster@ship-simu.org>
+ * @author Roland Haeder <webmaster@shipsimu.org>
* @version 0.0.0
* @copyright Copyright (c) 2014 Miner Developer Team
* @license GNU GPL 3.0 or any newer version
- * @link http://www.ship-simu.org
+ * @link http://www.shipsimu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
public function addExtraHubFilters () {
// Add some filters here
}
-}
-// [EOF]
-?>
+}
// Import application-specific stuff
use Org\Shipsimu\Hub\Node\BaseHubNode;
-use Org\Shipsimu\Hub\Helper\Node\NodeHelper;
+use Org\Shipsimu\Hub\Node\Node;
// Import framework stuff
use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-class HubBootNode extends BaseHubNode implements NodeHelper, Registerable {
+class HubBootNode extends BaseHubNode implements Node, Registerable {
/**
* Protected constructor
*
}
/**
- * Creates an instance of this hub-node class
+ * Creates an instance of a Node class
*
* @param $requestInstance An instance of a Requestable class
- * @return $nodeInstance An instance of this hub-node class
+ * @return $nodeInstance An instance of a Node class
*/
public static final function createHubBootNode () {
// Get a new instance
<?php
// Own namespace
-namespace Hub\Node\;
+namespace Org\Mxchange\Hub\Node\;
// Import application-specific stuff
-use Hub\Node\BaseHubNode;
-use Hub\Helper\Node\NodeHelper;
+use Org\Mxchange\Hub\Node\BaseHubNode;
+use Org\Mxchange\Hub\Node\Node;
// Import framework stuff
use Org\Mxchange\CoreFramework\Registry\Registerable;
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-class Hub???Node extends BaseHubNode implements NodeHelper, Registerable {
+class Hub???Node extends BaseHubNode implements Node, Registerable {
/**
* Protected constructor
*
}
/**
- * Creates an instance of this hub-node class
+ * Creates an instance of a Node class
*
- * @return $nodeInstance An instance of this hub-node class
+ * @return $nodeInstance An instance of a Node class
*/
public final static function createHub???Node () {
// Get a new instance
$this->setPrivateKeyHash($this->getCryptoInstance()->hashString($this->getPrivateKey()));
// Register the node id with our wrapper
- $this->getWrapperInstance()->registerPrivateKey($this, FrameworkBootstrap::getRequestInstance(), $searchInstance);
+ $this->getWrapperInstance()->registerPrivateKey($this, $searchInstance);
// Output message
self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BOOTSTRAP: Created new private key with hash: ' . $this->getPrivateKeyHash() . '');
$this->setNodeId($this->getCryptoInstance()->hashString($this->getCryptoInstance()->encryptString($randomString)));
// Register the node id with our wrapper
- $this->getWrapperInstance()->registerNodeId($this, FrameworkBootstrap::getRequestInstance());
+ $this->getWrapperInstance()->registerNodeId($this);
// Output message
self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BOOTSTRAP: Created new node-id: ' . $this->getNodeId() . '');
$this->setSessionId($this->getCryptoInstance()->hashString($this->getCryptoInstance()->encryptString($randomString)));
// Register the node id with our wrapper
- $this->getWrapperInstance()->registerSessionId($this, FrameworkBootstrap::getRequestInstance(), $searchInstance);
+ $this->getWrapperInstance()->registerSessionId($this, $searchInstance);
// Output message
self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BOOTSTRAP: Created new session-id: ' . $this->getSessionId() . '');
/**
* Adds hub data elements to a given dataset instance
*
- * @param $criteriaInstance An instance of a storeable criteria
- * @param $requestInstance An instance of a Requestable class
+ * @param $criteriaInstance An instance of a StoreableCriteria class
* @return void
*/
- public function addElementsToDataSet (StoreableCriteria $criteriaInstance, Requestable $requestInstance = NULL) {
- // Make sure the request instance is set as it is not optional.
- assert($requestInstance instanceof Requestable);
+ public function addElementsToDataSet (StoreableCriteria $criteriaInstance) {
+ // Get request instance
+ $requestInstance = FrameworkBootstrap::getRequestInstance();
// Add node number and type
$criteriaInstance->addCriteria(NodeInformationDatabaseWrapper::DB_COLUMN_NODE_NR , 1);
} // END - foreac
}
+ /**
+ * Creates a data array for this node suitable for UNL-generation.
+ *
+ * @return $nodeData Node's data
+ */
+ public function createNodeDataArray () {
+ // Get request instance
+ $requestInstance = FrameworkBootstrap::getRequestInstance();
+
+ // Create array with all available data
+ $nodeData = array(
+ NodeInformationDatabaseWrapper::DB_COLUMN_NODE_NR => NULL,
+ NodeInformationDatabaseWrapper::DB_COLUMN_NODE_MODE => $requestInstance->getRequestElement('mode'),
+ NodeInformationDatabaseWrapper::DB_COLUMN_NODE_ID => $this->getNodeId(),
+ NodeInformationDatabaseWrapper::DB_COLUMN_INTERNAL_UNL => HubTools::determineOwnInternalAddress(),
+ NodeInformationDatabaseWrapper::DB_COLUMN_EXTERNAL_UNL => HubTools::determineOwnExternalAddress(),
+ );
+
+ // Add the session id if acquired
+ if ($this->getSessionId() != '') {
+ $nodeData[NodeInformationDatabaseWrapper::DB_COLUMN_SESSION_ID] = $this->getSessionId();
+ } // END - if
+
+ // Add the private key if acquired
+ if ($this->getPrivateKey() != '') {
+ $nodeData[NodeInformationDatabaseWrapper::DB_COLUMN_PRIVATE_KEY] = base64_encode($this->getPrivateKey());
+ $nodeData[NodeInformationDatabaseWrapper::DB_COLUMN_PRIVATE_KEY_HASH] = $this->getPrivateKeyHash();
+ } // END - if
+
+ // Debugging:
+ //* DEBUG-DIE: */ die(sprintf('[%s:%d]: nodeData=%s', __METHOD__, __LINE__, print_r($nodeData, TRUE)));
+
+ // Return it
+ return $nodeData;
+ }
+
}
// Import application-specific stuff
use Org\Shipsimu\Hub\Node\BaseHubNode;
-use Org\Shipsimu\Hub\Helper\Node\NodeHelper;
+use Org\Shipsimu\Hub\Node\Node;
// Import framework stuff
use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-class HubListNode extends BaseHubNode implements NodeHelper, Registerable {
+class HubListNode extends BaseHubNode implements Node, Registerable {
/**
* Protected constructor
*
}
/**
- * Creates an instance of this hub-node class
+ * Creates an instance of a Node class
*
* @param $requestInstance An instance of a Requestable class
- * @return $nodeInstance An instance of this hub-node class
+ * @return $nodeInstance An instance of a Node class
*/
public static final function createHubListNode () {
// Get a new instance
// Import application-specific stuff
use Org\Shipsimu\Hub\Node\BaseHubNode;
-use Org\Shipsimu\Hub\Helper\Node\NodeHelper;
+use Org\Shipsimu\Hub\Node\Node;
// Import framework stuff
use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-class HubMasterNode extends BaseHubNode implements NodeHelper, Registerable {
+class HubMasterNode extends BaseHubNode implements Node, Registerable {
/**
* Protected constructor
*
}
/**
- * Creates an instance of this hub-node class
+ * Creates an instance of a Node class
*
- * @return $nodeInstance An instance of this hub-node class
+ * @return $nodeInstance An instance of a Node class
*/
public static final function createHubMasterNode () {
// Get a new instance
// Import application-specific stuff
use Org\Shipsimu\Hub\Node\BaseHubNode;
-use Org\Shipsimu\Hub\Helper\Node\NodeHelper;
+use Org\Shipsimu\Hub\Node\Node;
// Import framework stuff
use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-class HubRegularNode extends BaseHubNode implements NodeHelper, Registerable {
+class HubRegularNode extends BaseHubNode implements Node, Registerable {
/**
* Protected constructor
*
}
/**
- * Creates an instance of this hub-node class
+ * Creates an instance of a Node class
*
* @param $requestInstance An instance of a Requestable class
- * @return $nodeInstance An instance of this hub-node class
+ * @return $nodeInstance An instance of a Node class
*/
public static final function createHubRegularNode () {
// Get a new instance
use Org\Shipsimu\Hub\Network\Networkable;
use Org\Shipsimu\Hub\Network\Package\Fragment\PackageFragmenter;
use Org\Shipsimu\Hub\Network\Receive\Receivable;
+use Org\Shipsimu\Hub\Node\Generic\InvalidPrivateKeyHashException;
use Org\Shipsimu\Hub\Tag\Tagable;
use Org\Shipsimu\Hub\Tools\HubTools;
* @throws InvalidPrivateKeyHashException If the private key's hash is not valid
*/
private function determineSenderPrivateKeyHash (array $decodedData) {
+ // Assert on required fields
+ assert(!empty($decodedData[self::PACKAGE_CONTENT_SENDER]));
+
// Get DHT instance
$dhtInstance = DhtObjectFactory::createDhtInstance('node');
// Ask DHT for session id
$senderData = $dhtInstance->findNodeLocalBySessionId($decodedData[self::PACKAGE_CONTENT_SENDER]);
+ // Debugging:
+ //* DEBUG-DIE: */ die(sprintf('[%s:%d]: senderData=%s', __METHOD__, __LINE__, print_r($senderData, TRUE)));
+
// Is an entry found?
if (count($senderData) > 0) {
// Make sure the element 'private_key_hash' is there
*/
private function sendOutgoingRawPackageData (array $packageData) {
// Trace message
- /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('NETWORK-PACKAGE: packageData()=%d - CALLED!', count($packageData)));
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('NETWORK-PACKAGE: packageData()=%d - CALLED!', count($packageData)));
// Init sent bytes
$sentBytes = 0;
$helperInstance->sendRawPackageData($packageData);
// Debug message
- /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE: EXIT!');
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE: EXIT!');
}
/**
// Debug message
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE: content()=' . strlen($content) . ',senderId=' . $senderId . ' - CALLED!');
+ // Assert on variables
+ assert(!empty($content));
+ assert(!empty($senderId));
+
// Is the feature enabled?
if (!FrameworkFeature::isFeatureAvailable('hubcoin_reward')) {
// Feature is not enabled
$data = array(
self::PACKAGE_CONTENT_SENDER => $senderId,
self::PACKAGE_CONTENT_MESSAGE => $content,
- self::PACKAGE_CONTENT_PRIVATE_KEY_HASH => ''
+ self::PACKAGE_CONTENT_PRIVATE_KEY_HASH => $this->getPrivateKeyHash(),
);
// Hash content and sender id together, use scrypt
// Debug message
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE: Enqueueing package for recipientType=' . $helperInstance->getRecipientType() . ' ...');
+ // Make sure required data is there
+ assert(!empty($content));
+ assert($this->getSessionId() != '');
+
// Now prepare the temporary array and push it on the 'undeclared' stack
$this->getStackInstance()->pushNamed(self::STACKER_NAME_UNDECLARED, array(
self::PACKAGE_DATA_SENDER_ADDRESS => $this->getSessionId(),
} // END - if
// Debug message
- /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('NETWORK-PACKAGE: sentBytes[%s]=%d', gettype($sentBytes), $sentBytes));
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('NETWORK-PACKAGE: sentBytes[%s]=%d', gettype($sentBytes), $sentBytes));
// If there was an error, don't continue here
if (($sentBytes === 0) && (strlen($encodedDataArray[self::RAW_INDEX_ENCODED_DATA]) > 0)) {
// Nothing sent means all data has been sent
- /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONNECTION-HELPER: All sent! (LINE=' . __LINE__ . ')');
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONNECTION-HELPER: All sent! (LINE=' . __LINE__ . ')');
return;
} elseif (strlen($encodedDataArray[self::RAW_INDEX_ENCODED_DATA]) == 0) {
// Abort here, all sent!
- /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONNECTION-HELPER: All sent! (LINE=' . __LINE__ . ')');
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONNECTION-HELPER: All sent! (LINE=' . __LINE__ . ')');
return;
}
// Debug message
- /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONNECTION-HELPER: Pushing raw data back to stacker, as still some data is pending delivery.');
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONNECTION-HELPER: Pushing raw data back to stacker, as still some data is pending delivery.');
// Push array back in stack
$this->getStackInstance()->pushNamed(self::STACKER_NAME_OUTGOING_STREAM, $encodedDataArray);
// Debug message
- /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE: EXIT!');
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE: EXIT!');
}
///////////////////////////////////////////////////////////////////////////
*/
public function handleAssemblerPendingData () {
// Debug message
- /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE: Calling this->getAssemblerInstance()->handlePendingData() ...');
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE: Calling this->getAssemblerInstance()->handlePendingData() ...');
// Handle it
$this->getAssemblerInstance()->handlePendingData();
*/
public function handleMultipleMessages () {
// Debug message
- /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE: Calling this->getAssemblerInstance()->handleMultipleMessages() ...');
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE: Calling this->getAssemblerInstance()->handleMultipleMessages() ...');
// Handle it
$this->getAssemblerInstance()->handleMultipleMessages();
use Org\Shipsimu\Hub\Network\Package\NetworkPackage;
// Import framework stuff
+use Org\Mxchange\CoreFramework\Assertion\AssertionException;
use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
use Org\Mxchange\CoreFramework\Registry\Registerable;
<?php
// Own namespace
-namespace Hub\Pool\;
+namespace Org\Mxchange\Hub\Pool\;
// Import application-specific stuff
-use Hub\Listener\Listenable;
-use Hub\Pool\BasePool;
-use Hub\Pool\Poolable;
+use Org\Mxchange\Hub\Listener\Listenable;
+use Org\Mxchange\Hub\Pool\BasePool;
+use Org\Mxchange\Hub\Pool\Poolable;
// Import framework stuff
namespace Org\Shipsimu\Hub\Pool\Listener;
// Import application-specific stuff
-use Org\Shipsimu\Hub\Helper\Node\NodeHelper;
use Org\Shipsimu\Hub\Listener\Listenable;
+use Org\Shipsimu\Hub\Node\Node;
use Org\Shipsimu\Hub\Pool\BasePool;
use Org\Shipsimu\Hub\Pool\Listener\PoolableListener;
/**
* Creates an instance of this class
*
- * @param $nodeInstance A NodeHelper instance
+ * @param $nodeInstance An instance of a Node class
* @return $listenerInstance An instance a prepared listener class
*/
- public static final function createDefaultListenerPool (NodeHelper $nodeInstance) {
+ public static final function createDefaultListenerPool (Node $nodeInstance) {
// Get new instance
$listenerInstance = new DefaultListenerPool();
<?php
// Own namespace
-namespace Hub\Network\Recipient\;
+namespace Org\Mxchange\Hub\Network\Recipient\;
// Import application-specific stuff
-use Hub\Network\Recipient\BaseRecipient;
+use Org\Mxchange\Hub\Network\Recipient\BaseRecipient;
// Import framework stuff
use Org\Mxchange\CoreFramework\Lists\Listable;
/**
* A ??? recipient
*
- * @author Roland Haeder <webmaster@ship-simu.org>
+ * @author Roland Haeder <webmaster@shipsimu.org>
* @version 0.0.0
* @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2015 Hub Developer Team
* @license GNU GPL 3.0 or any newer version
- * @link http://www.ship-simu.org
+ * @link http://www.shipsimu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
<?php
// Own namespace
-namespace Hub\Resolver\Protocol\;
+namespace Org\Mxchange\Hub\Resolver\Protocol\;
// Import application-specific stuff
-use Hub\Helper\Node\NodeHelper;
-use Hub\Resolver\Protocol\BaseProtocolResolver;
-use Hub\Resolver\Protocol\ProtocolResolver;
+use Org\Mxchange\Hub\Node\Node;
+use Org\Mxchange\Hub\Resolver\Protocol\BaseProtocolResolver;
+use Org\Mxchange\Hub\Resolver\Protocol\ProtocolResolver;
/**
* A !!! protocol resolver class
}
/**
- * Returns an instance of a LocateableNode class for a given NodeHelper
+ * Returns an instance of a LocateableNode class for a given Node
* instance or null if it was not found.
*
- * @param $nodeInstance An instance of a NodeHelper class
+ * @param $nodeInstance An instance of a Node class
* @return $unlInstance An instance of a LocateableNode class
* @todo 0% done
*/
- public function resolveUniversalNodeLocatorFromNodeHelper (NodeHelper $nodeInstance) {
+ public function resolveUniversalNodeLocatorFromNode (Node $nodeInstance) {
$this->partialStub('Please implement this method. nodeInstance=' . $nodeInstance->__toString());
}
// Import application-specific stuff
use Org\Shipsimu\Hub\Database\Frontend\Node\Information\NodeInformationDatabaseWrapper;
use Org\Shipsimu\Hub\Factory\Network\Locator\UniversalNodeLocatorFactory;
-use Org\Shipsimu\Hub\Helper\Node\NodeHelper;
+use Org\Shipsimu\Hub\Node\Node;
use Org\Shipsimu\Hub\Resolver\Protocol\BaseProtocolResolver;
use Org\Shipsimu\Hub\Resolver\Protocol\ProtocolResolver;
// Import framework stuff
use Org\Mxchange\CoreFramework\Console\Tools\ConsoleTools;
+use Org\Mxchange\CoreFramework\Criteria\Search\SearchCriteria;
use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
use Org\Mxchange\CoreFramework\Registry\Registerable;
}
/**
- * Returns an instance of a LocateableNode class for a given NodeHelper
+ * Returns an instance of a LocateableNode class for a given Node
* instance or null if it was not found.
*
- * @param $nodeInstance An instance of a NodeHelper class
+ * @param $nodeInstance An instance of a Node class
* @return $unlInstance An instance of a LocateableNode class
- * @todo 0% done
*/
- public function resolveUniversalNodeLocatorFromNodeHelper (NodeHelper $nodeInstance) {
+ public function resolveUniversalNodeLocatorFromNode (Node $nodeInstance) {
// Get search instance (to lookup database result)
$searchInstance = $nodeInstance->getSearchInstance();
// Is the result valid?
if ((!$resultInstance->valid()) || (!$resultInstance->next())) {
- // Node not found in database, this could mean that your database file is damaged.
- return NULL;
- } // END - if
-
- // Get current entry
- $current = $resultInstance->current();
+ /*
+ * Node not found in database, this happens on first startup. So
+ * let's get a prepared array from the node instance.
+ */
+ $current = $nodeInstance->createNodeDataArray();
+ } else {
+ // Get current entry
+ $current = $resultInstance->current();
+ }
// This should always be the case, if not your database file might be damaged.
+ assert(is_array($current));
assert($nodeInstance->getNodeId() == $current[NodeInformationDatabaseWrapper::DB_COLUMN_NODE_ID]);
// Get UNL instance and handle over all data
*/
return $unl;
}
-}
-// [EOF]
-?>
+}
<?php
// Own namespace
-namespace Hub\State\Communicator\;
+namespace Org\Mxchange\Hub\State\Communicator\;
// Import framework stuff
use Org\Mxchange\CoreFramework\State\Stateable;
<?php
// Own namespace
-namespace Hub\State\Crawler\;
+namespace Org\Mxchange\Hub\State\Crawler\;
// Import framework stuff
use Org\Mxchange\CoreFramework\State\Stateable;
<?php
// Own namespace
-namespace Hub\State\Cruncher\;
+namespace Org\Mxchange\Hub\State\Cruncher\;
// Import framework stuff
use Org\Mxchange\CoreFramework\Executor\Executor;
<?php
// Own namespace
-namespace Hub\State\Dht\;
+namespace Org\Mxchange\Hub\State\Dht\;
// Import application-specific stuff
-use Hub\Dht\Distributable;
+use Org\Mxchange\Hub\Dht\Distributable;
// Import framework stuff
use Org\Mxchange\CoreFramework\State\Stateable;
<?php
// Own namespace
-namespace Hub\State\Miner\;
+namespace Org\Mxchange\Hub\State\Miner\;
// Import framework stuff
use Org\Mxchange\CoreFramework\Executor\Executor;
<?php
// Own namespace
-namespace Hub\State\Node\;
+namespace Org\Mxchange\Hub\State\Node\;
// Import application-specific stuff
-use Hub\Helper\Node\NodeHelper;
+use Org\Mxchange\Hub\Node\Node;
// Import framework stuff
use Org\Mxchange\CoreFramework\State\Stateable;
/**
* Creates an instance of this class
*
- * @param $nodeInstance An instance of a NodeHelper class
+ * @param $nodeInstance An instance of a Node class
* @return $stateInstance An instance of a Stateable class
*/
- public final static function createNode???State (NodeHelper $nodeInstance) {
+ public final static function createNode???State (Node $nodeInstance) {
// Get new instance
$stateInstance = new Node???State();
<?php
// Own namespace
-namespace Hub\State\Peer;
+namespace Org\Mxchange\Hub\State\Peer;
// Import application-specific stuff
-use Hub\Container\Socket\StorableSocket;
-use Hub\State\Peer\PeerStateable;
+use Org\Mxchange\Hub\Container\Socket\StorableSocket;
+use Org\Mxchange\Hub\State\Peer\PeerStateable;
// Import framework stuff
use Org\Mxchange\CoreFramework\State\Stateable;
<?php
// Own namespace
-namespace Hub\Tag\;
+namespace Org\Mxchange\Hub\Tag\;
// Import application-specific stuff
-use Hub\Tag\BaseTag;
-use Hub\Tag\Tagable;
+use Org\Mxchange\Hub\Tag\BaseTag;
+use Org\Mxchange\Hub\Tag\Tagable;
/**
* A ??? tags class
<?php
// Own namespace
-namespace Hub\Task\AptProxy\;
+namespace Org\Mxchange\Hub\Task\AptProxy\;
// Import framework stuff
use Org\Mxchange\CoreFramework\Task\BaseTask;
<?php
// Own namespace
-namespace Hub\Task\Chat\;
+namespace Org\Mxchange\Hub\Task\Chat\;
// Import framework stuff
use Org\Mxchange\CoreFramework\Task\BaseTask;
<?php
// Own namespace
-namespace Hub\Task\Crawler\;
+namespace Org\Mxchange\Hub\Task\Crawler\;
// Import framework stuff
use Org\Mxchange\CoreFramework\Task\BaseTask;
<?php
// Own namespace
-namespace Hub\Task\Crawler\Scanner\;
+namespace Org\Mxchange\Hub\Task\Crawler\Scanner\;
// Import framework stuff
use Org\Mxchange\CoreFramework\Task\BaseTask;
<?php
// Own namespace
-namespace Hub\Task\Crawler\Source\Url\;
+namespace Org\Mxchange\Hub\Task\Crawler\Source\Url\;
// Import framework stuff
use Org\Mxchange\CoreFramework\Task\Taskable;
<?php
// Own namespace
-namespace Hub\Task\Cruncher\;
+namespace Org\Mxchange\Hub\Task\Cruncher\;
// Import framework stuff
use Org\Mxchange\CoreFramework\Task\BaseTask;
<?php
// Own namespace
-namespace Hub\Task\Miner\;
+namespace Org\Mxchange\Hub\Task\Miner\;
// Import framework stuff
use Org\Mxchange\CoreFramework\Task\BaseTask;
<?php
// Own namespace
-namespace Hub\Task\AptProxy\Task\Network\;
+namespace Org\Mxchange\Hub\Task\AptProxy\Task\Network\;
// Import framework stuff
use Org\Mxchange\CoreFramework\Task\BaseTask;
<?php
// Own namespace
-namespace Hub\Node\Task\;
+namespace Org\Mxchange\Hub\Node\Task\;
// Import framework stuff
use Org\Mxchange\CoreFramework\Task\BaseTask;
<?php
// Own namespace
-namespace Hub\Task\Node\Dht\;
+namespace Org\Mxchange\Hub\Task\Node\Dht\;
// Import framework stuff
use Org\Mxchange\CoreFramework\Task\BaseTask;
<?php
// Own namespace
-namespace Hub\Template\Engine\Xml\Network\Answer\;
+namespace Org\Mxchange\Hub\Template\Engine\Xml\Network\Answer\;
// Import application-specific stuff
-use Hub\Template\Engine\Xml\Network\Answer\BaseXmlAnswerTemplateEngine;
+use Org\Mxchange\Hub\Template\Engine\Xml\Network\Answer\BaseXmlAnswerTemplateEngine;
// Import framework stuff
use Org\Mxchange\CoreFramework\Registry\Registerable;
<?php
// Own namespace
-namespace Hub\Template\Engine\Xml\;
+namespace Org\Mxchange\Hub\Template\Engine\Xml\;
// Import application-specific stuff
-use Hub\Template\Engine\Xml\BaseXmlTemplateEngine;
+use Org\Mxchange\Hub\Template\Engine\Xml\BaseXmlTemplateEngine;
// Import framework stuff
use Org\Mxchange\CoreFramework\Registry\Registerable;
<?php
// Own namespace
-namespace Hub\Visitor\;
+namespace Org\Mxchange\Hub\Visitor\;
// Import application-specific stuff
-use Hub\Pool\Poolable;
-use Hub\Visitor\Pool\PoolVisitor;
+use Org\Mxchange\Hub\Pool\Poolable;
+use Org\Mxchange\Hub\Visitor\Pool\PoolVisitor;
// Import framework stuff
use Org\Mxchange\CoreFramework\Visitor\BaseVisitor;
<?php
// Own namespace
-namespace Hub\Visitor\Handler\;
+namespace Org\Mxchange\Hub\Visitor\Handler\;
// Import application-specific stuff
-use Hub\Pool\Poolable;
-use Hub\Visitor\Pool\PoolVisitor;
+use Org\Mxchange\Hub\Pool\Poolable;
+use Org\Mxchange\Hub\Visitor\Pool\PoolVisitor;
// Import framework stuff
use Org\Mxchange\CoreFramework\Visitor\BaseVisitor;
<?php
// Own namespace
-namespace Hub\Visitor\;
+namespace Org\Mxchange\Hub\Visitor\;
// Import application-specific stuff
-use Hub\Pool\Poolable;
-use Hub\Visitor\Pool\PoolVisitor;
+use Org\Mxchange\Hub\Pool\Poolable;
+use Org\Mxchange\Hub\Visitor\Pool\PoolVisitor;
// Import framework stuff
use Org\Mxchange\CoreFramework\Visitor\BaseVisitor;
* connections because they might be disconnected every 24 hours and rotate the
* IP number.
*
- * @author Roland Haeder <webmaster@ship-simu.org>
+ * @author Roland Haeder <webmaster@shipsimu.org>
* @version 0.0
* @copyright Copyright (c) 2007 - 2008 Roland Haeder, 2009 - 2015 Hub Developer Team
* @license GNU GPL 3.0 or any newer version
<?php
// Import framework stuff
+use Org\Mxchange\CoreFramework\Assertion\AssertionException;
use Org\Mxchange\CoreFramework\Generic\FrameworkException;
use Org\Mxchange\CoreFramework\Object\BaseFrameworkSystem;
// Own namespace
namespace Org\Shipsimu\Hub\Node\Announcement;
+// Import own stuff
+use Org\Shipsimu\Hub\Node\Node;
+
// Import framework stuff
use Org\Mxchange\CoreFramework\Generic\FrameworkException;
/**
* The super constructor for all exceptions
*
- * @param $messageArray Error message array
+ * @param $nodeInstance An instance of a Node class
* @param $code Error code
* @return void
*/
- public function __construct (NodeHelper $nodeInstance, $code) {
+ public function __construct (Node $nodeInstance, $code) {
// Construct the message
$message = sprintf('[%s:%d] This node is already announced. Please fix this.',
$nodeInstance->__toString(),
// Call parent exception constructor
parent::__construct($message, $code);
}
-}
-// [EOF]
-?>
+}
$message = sprintf('[%s:%d] The package hash is not valid, data=%s, message: %s',
$messageArray[0]->__toString(),
$this->getLine(),
- $messageArray[1],
+ json_encode($messageArray[1]),
$messageArray[2]
);
// Import framework stuff
use Org\Mxchange\CoreFramework\Criteria\Local\LocalSearchCriteria;
use Org\Mxchange\CoreFramework\Database\Frontend\DatabaseWrapper;
-use Org\Mxchange\CoreFramework\Request\Requestable;
/**
* An interface for node-information (database) wrapper
* This may sound confusing but avoids double code very nicely...
*
* @param $nodeInstance A node instance
- * @param $requestInstance An instance of a Requestable class
* @return void
*/
- function registerNodeId (BaseHubNode $nodeInstance, Requestable $requestInstance);
+ function registerNodeId (BaseHubNode $nodeInstance);
/**
* 'Registers' a new session id along with data provided in the node instance.
* This may sound confusing but avoids double code very nicely...
*
* @param $nodeInstance An instance of a BaseHubNode class
- * @param $requestInstance An instance of a Requestable class
* @param $searchInstance An instance of a LocalSearchCriteria class
* @return void
*/
- function registerSessionId (BaseHubNode $nodeInstance, Requestable $requestInstance, LocalSearchCriteria $searchInstance);
+ function registerSessionId (BaseHubNode $nodeInstance, LocalSearchCriteria $searchInstance);
/**
* 'Registers' a private key along with data provided in the node instance.
* @param $searchInstance An instance of a LocalSearchCriteria class
* @return void
*/
- function registerPrivateKey (BaseHubNode $nodeInstance, Requestable $requestInstance, LocalSearchCriteria $searchInstance);
+ function registerPrivateKey (BaseHubNode $nodeInstance, LocalSearchCriteria $searchInstance);
}
<?php
// Own namespace
-namespace Hub\Discovery\;
+namespace Org\Mxchange\Hub\Discovery\;
// Import framework stuff
use Org\Mxchange\CoreFramework\Discovery\Discoverable;
*/
interface Discoverable!!! extends Discoverable {
}
-
-// [EOF]
-?>
*/
interface DiscoverableProtocol extends Discoverable {
}
-
-// [EOF]
-?>
* @return $isEmpty Whether the recipient list is empty
*/
function isRecipientListEmpty ();
-}
-// [EOF]
-?>
+}
namespace Org\Shipsimu\Hub\Discovery\Locator;
// Import application-specific stuff
-use Org\Shipsimu\Hub\Helper\Node\NodeHelper;
+use Org\Shipsimu\Hub\Node\Node;
// Import framework stuff
use Org\Mxchange\CoreFramework\Discovery\Discoverable;
*/
interface DiscoverableUniversalNodeLocator extends Discoverable {
/**
- * "Discovers" an instance of a LocateableNode class for given NodeHelper class
+ * "Discovers" an instance of a LocateableNode class for given Node class
*
- * @param $nodeInstance An instance of a NodeHelper class
+ * @param $nodeInstance An instance of a Node class
* @return $unlInstance An instance of a LocateableNode class
+ * @throws NullPointerException If $unlInstance is NULL
*/
- function discoverUniversalNodeLocatorByNode (NodeHelper $nodeInstance);
+ function discoverUniversalNodeLocatorByNode (Node $nodeInstance);
/**
* "Discovers" the full universal node locator for given configuration entry
* @return $unl Universal node locator
*/
function discoverUniversalNodeLocatorByConfiguredAddress ($configKey);
-}
-// [EOF]
-?>
+}
<?php
// Own namespace
-namespace Org\Shipsimu\Hub\Node\Helper;
+namespace Org\Shipsimu\Hub\Helper\Node;
// Import application-specific stuff
use Org\Shipsimu\Hub\Helper\HubHelper;
-use Org\Shipsimu\Hub\Helper\Node\NodeHelper;
+use Org\Shipsimu\Hub\Node\Node;
/**
* An interface for node helper classes
/**
* Loads the descriptor XML file
*
- * @param $nodeInstance An instance of a NodeHelper class
+ * @param $nodeInstance An instance of a Node class
* @return void
*/
- function loadDescriptorXml (NodeHelper $nodeInstance);
+ function loadDescriptorXml (Node $nodeInstance);
/**
* Send a package out
*
- * @param $nodeInstance An instance of a NodeHelper class
+ * @param $nodeInstance An instance of a Node class
* @return void
*/
- function sendPackage (NodeHelper $nodeInstance);
+ function sendPackage (Node $nodeInstance);
}
+++ /dev/null
-Deny from all
+++ /dev/null
-<?php
-// Own namespace
-namespace Org\Shipsimu\Hub\Helper\Node;
-
-// Import application-specific stuff
-use Org\Shipsimu\Hub\Network\Receive\Receivable;
-
-// Import framework stuff
-use Org\Mxchange\CoreFramework\Criteria\Add\AddableCriteria;
-use Org\Mxchange\CoreFramework\Handler\Task\HandleableTask;
-use Org\Mxchange\CoreFramework\Helper\Helper;
-use Org\Mxchange\CoreFramework\Request\Requestable;
-use Org\Mxchange\CoreFramework\Response\Responseable;
-use Org\Mxchange\CoreFramework\Task\Taskable;
-
-/**
- * An interface for "node-helper" classes
- *
- * @author Roland Haeder <webmaster@shipsimu.org>
- * @version 0.0.0
- * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2015 Hub Developer Team
- * @license GNU GPL 3.0 or any newer version
- * @link http://www.shipsimu.org
- * @todo We need to find a better name for this interface
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-interface NodeHelper extends Helper, AddableCriteria {
- /**
- * Method to "bootstrap" the node. This step does also apply provided
- * command-line arguments stored in the request instance. You should now
- * get it from calling FrameworkBootstrap::getRequestInstance().
- *
- * @return void
- */
- function doBootstrapping ();
-
- /**
- * Outputs the console teaser. This should only be executed on startup or
- * full restarts. This method generates some space around the teaser.
- *
- * @return void
- */
- function outputConsoleTeaser ();
-
- /**
- * Add some node-specific filters
- *
- * @return void
- */
- function addExtraNodeFilters ();
-
- /**
- * Generic method to acquire a hub-id. On first run this generates a new one
- * based on many pseudo-random data. On any later run, unless the id
- * got not removed from database, it will be restored from the database.
- *
- * @param $requestInstance A Requestable class
- * @param $responseInstance A Responseable class
- * @return void
- */
- function bootstrapAcquireNodeId (Requestable $requestInstance, Responseable $responseInstance);
-
- /**
- * Activates the hub by doing some final preparation and setting
- * $hubIsActive to TRUE.
- *
- * @param $requestInstance A Requestable class
- * @param $responseInstance A Responseable class
- * @return void
- */
- function activateNode (Requestable $requestInstance, Responseable $responseInstance);
-
- /**
- * Generates a session id which will be sent to the other hubs and peers
- *
- * @return void
- */
- function bootstrapGenerateSessionId ();
-
- /**
- * Generates a private key for en-/decryption
- *
- * @return void
- */
- function bootstrapGeneratePrivateKey ();
-
- /**
- * Initializes the listener pool (class)
- *
- * @return void
- */
- function initializeListenerPool ();
-
- /**
- * Announces this hub to the upper (bootstrap or list) hubs. After this is
- * successfully done the given task is unregistered from the handler.
- *
- * @param $taskInstance The task instance running this announcement
- * @return void
- * @throws NodeAlreadyAnnouncedException If this hub is already announced
- */
- function announceToUpperNodes (Taskable $taskInstance);
-
- /**
- * Does a self-connect attempt on the public IP address. This should make
- * it sure, we are reachable from outside world.
- *
- * @param $taskInstance The task instance running this announcement
- * @return void
- */
- function doSelfConnection (Taskable $taskInstance);
-
- /**
- * Determines an instance of a LocateableNode class
- *
- * @return $unlInstance An instance of a LocateableNode class for this node
- */
- function determineUniversalNodeLocator ();
-
- /**
- * Updates/refreshes node data (e.g. state).
- *
- * @return void
- */
- function updateNodeData ();
-
- /**
- * Checks whether this node accepts announcements
- *
- * @return $acceptAnnouncements Whether this node accepts announcements
- */
- function isAcceptingAnnouncements ();
-
- /**
- * Checks whether this node has attempted to announce itself
- *
- * @return $hasAnnounced Whether this node has attempted to announce itself
- */
- function ifNodeIsAnnouncing ();
-
- /**
- * Checks whether this node has attempted to announce itself and completed it
- *
- * @return $hasAnnouncementCompleted Whether this node has attempted to announce itself and completed it
- */
- function ifNodeHasAnnouncementCompleted ();
-
- /**
- * Checks wether this node is accepting node-list requests
- *
- * @return $acceptsRequest Wether this node accepts node-list requests
- */
- function isAcceptingNodeListRequests ();
-
- /**
- * Handles message answer by given data array
- *
- * @param $messageData A valid answer message data array
- * @param $packageInstance An instance of a Receivable class
- * @return void
- */
- function handleAnswerStatusByMessageData (array $messageData, Receivable $packageInstance);
-
- /**
- * "Getter" for an array of all accepted object types
- *
- * @return $objectList Array of all accepted object types
- */
- function getListFromAcceptedObjectTypes ();
-
- /**
- * Adds extra tasks to the given handler for this node
- *
- * @param $handlerInstance An instance of a HandleableTask class
- * @return void
- */
- function addExtraTasks (HandleableTask $handlerInstance);
-
- /**
- * Tries to detect own UNL (Universal Node Locator)
- *
- * @return $unl Node's own universal node locator
- */
- function detectOwnUniversalNodeLocator ();
-}
-
-// [EOF]
-?>
--- /dev/null
+<?php
+// Own namespace
+namespace Org\Shipsimu\Hub\Node;
+
+// Import application-specific stuff
+use Org\Shipsimu\Hub\Network\Receive\Receivable;
+
+// Import framework stuff
+use Org\Mxchange\CoreFramework\Handler\Task\HandleableTask;
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
+use Org\Mxchange\CoreFramework\Request\Requestable;
+use Org\Mxchange\CoreFramework\Response\Responseable;
+use Org\Mxchange\CoreFramework\Task\Taskable;
+
+/**
+ * An interface for "node-helper" classes
+ *
+ * @author Roland Haeder <webmaster@shipsimu.org>
+ * @version 0.0.0
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2015 Hub Developer Team
+ * @license GNU GPL 3.0 or any newer version
+ * @link http://www.shipsimu.org
+ * @todo We need to find a better name for this interface
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+interface Node extends FrameworkInterface {
+ /**
+ * Method to "bootstrap" the node. This step does also apply provided
+ * command-line arguments stored in the request instance. You should now
+ * get it from calling FrameworkBootstrap::getRequestInstance().
+ *
+ * @return void
+ */
+ function doBootstrapping ();
+
+ /**
+ * Outputs the console teaser. This should only be executed on startup or
+ * full restarts. This method generates some space around the teaser.
+ *
+ * @return void
+ */
+ function outputConsoleTeaser ();
+
+ /**
+ * Add some node-specific filters
+ *
+ * @return void
+ */
+ function addExtraNodeFilters ();
+
+ /**
+ * Generic method to acquire a hub-id. On first run this generates a new one
+ * based on many pseudo-random data. On any later run, unless the id
+ * got not removed from database, it will be restored from the database.
+ *
+ * @param $requestInstance A Requestable class
+ * @param $responseInstance A Responseable class
+ * @return void
+ */
+ function bootstrapAcquireNodeId (Requestable $requestInstance, Responseable $responseInstance);
+
+ /**
+ * Activates the hub by doing some final preparation and setting
+ * $hubIsActive to TRUE.
+ *
+ * @param $requestInstance A Requestable class
+ * @param $responseInstance A Responseable class
+ * @return void
+ */
+ function activateNode (Requestable $requestInstance, Responseable $responseInstance);
+
+ /**
+ * Generates a session id which will be sent to the other hubs and peers
+ *
+ * @return void
+ */
+ function bootstrapGenerateSessionId ();
+
+ /**
+ * Generates a private key for en-/decryption
+ *
+ * @return void
+ */
+ function bootstrapGeneratePrivateKey ();
+
+ /**
+ * Initializes the listener pool (class)
+ *
+ * @return void
+ */
+ function initializeListenerPool ();
+
+ /**
+ * Announces this hub to the upper (bootstrap or list) hubs. After this is
+ * successfully done the given task is unregistered from the handler.
+ *
+ * @param $taskInstance The task instance running this announcement
+ * @return void
+ * @throws NodeAlreadyAnnouncedException If this hub is already announced
+ */
+ function announceToUpperNodes (Taskable $taskInstance);
+
+ /**
+ * Does a self-connect attempt on the public IP address. This should make
+ * it sure, we are reachable from outside world.
+ *
+ * @param $taskInstance The task instance running this announcement
+ * @return void
+ */
+ function doSelfConnection (Taskable $taskInstance);
+
+ /**
+ * Determines an instance of a LocateableNode class
+ *
+ * @return $unlInstance An instance of a LocateableNode class for this node
+ */
+ function determineUniversalNodeLocator ();
+
+ /**
+ * Updates/refreshes node data (e.g. state).
+ *
+ * @return void
+ */
+ function updateNodeData ();
+
+ /**
+ * Checks whether this node accepts announcements
+ *
+ * @return $acceptAnnouncements Whether this node accepts announcements
+ */
+ function isAcceptingAnnouncements ();
+
+ /**
+ * Checks whether this node has attempted to announce itself
+ *
+ * @return $hasAnnounced Whether this node has attempted to announce itself
+ */
+ function ifNodeIsAnnouncing ();
+
+ /**
+ * Checks whether this node has attempted to announce itself and completed it
+ *
+ * @return $hasAnnouncementCompleted Whether this node has attempted to announce itself and completed it
+ */
+ function ifNodeHasAnnouncementCompleted ();
+
+ /**
+ * Checks wether this node is accepting node-list requests
+ *
+ * @return $acceptsRequest Wether this node accepts node-list requests
+ */
+ function isAcceptingNodeListRequests ();
+
+ /**
+ * Handles message answer by given data array
+ *
+ * @param $messageData A valid answer message data array
+ * @param $packageInstance An instance of a Receivable class
+ * @return void
+ */
+ function handleAnswerStatusByMessageData (array $messageData, Receivable $packageInstance);
+
+ /**
+ * "Getter" for an array of all accepted object types
+ *
+ * @return $objectList Array of all accepted object types
+ */
+ function getListFromAcceptedObjectTypes ();
+
+ /**
+ * Adds extra tasks to the given handler for this node
+ *
+ * @param $handlerInstance An instance of a HandleableTask class
+ * @return void
+ */
+ function addExtraTasks (HandleableTask $handlerInstance);
+
+ /**
+ * Tries to detect own UNL (Universal Node Locator)
+ *
+ * @return $unl Node's own universal node locator
+ */
+ function detectOwnUniversalNodeLocator ();
+
+ /**
+ * Creates a data array for this node suitable for UNL-generation.
+ *
+ * @return $nodeData Node's data
+ */
+ function createNodeDataArray ();
+
+}
/**
* A Poolable interface
*
- * @author Roland Haeder <webmaster@ship-simu.org>
+ * @author Roland Haeder <webmaster@shipsimu.org>
* @version 0.0.0
* @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2017 Hub Developer Team
* @license GNU GPL 3.0 or any newer version
- * @link http://www.ship-simu.org
+ * @link http://www.shipsimu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/**
* A Poolable interface for listener
*
- * @author Roland Haeder <webmaster@ship-simu.org>
+ * @author Roland Haeder <webmaster@shipsimu.org>
* @version 0.0.0
* @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2017 Hub Developer Team
* @license GNU GPL 3.0 or any newer version
- * @link http://www.ship-simu.org
+ * @link http://www.shipsimu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/**
* An interface for a ??? producer of the producer/consumer implementation
*
- * @author Roland Haeder <webmaster@ship-simu.org>
+ * @author Roland Haeder <webmaster@shipsimu.org>
* @version 0.0.0
* @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2015 Hub Developer Team
* @license GNU GPL 3.0 or any newer version
- * @link http://www.ship-simu.org
+ * @link http://www.shipsimu.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*/
interface ???Producer extends Producer {
}
-
-// [EOF]
-?>
// Import application-specific stuff
use Org\Shipsimu\Hub\Generic\HubInterface;
-use Org\Shipsimu\Hub\Helper\Node\NodeHelper;
-
+use Org\Shipsimu\Hub\Node\Node;
/**
* An interface for ProtocolResolvers
*/
interface ProtocolResolver extends HubInterface {
/**
- * Returns an instance of a LocateableNode class for a given NodeHelper
+ * Returns an instance of a LocateableNode class for a given Node
* instance or null if it was not found.
*
- * @param $nodeInstance An instance of a NodeHelper class
+ * @param $nodeInstance An instance of a Node class
* @return $unlInstance An instance of a LocateableNode class
*/
- function resolveUniversalNodeLocatorFromNodeHelper (NodeHelper $nodeInstance);
+ function resolveUniversalNodeLocatorFromNode (Node $nodeInstance);
/**
* Returns the UNL as string from given configuration key.
<!--
Generic menu entries. You should not touch this template for smooth upgrades.
-@author Roland Haeder <webmaster@ship-simu.org>
+@author Roland Haeder <webmaster@shipsimu.org>
@version 0.0.0
@copyright Copyright (c) 2007 - 2008 Roland Haeder, 2009 - 2015 Hub Developer Team
@license GNU GPL 3.0 or any newer version
-@link http://www.ship-simu.org
+@link http://www.shipsimu.org
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
<!--
-@author Roland Haeder <webmaster@ship-simu.org>
+@author Roland Haeder <webmaster@shipsimu.org>
@version 0.0.0
@copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2015 Hub Developer Team
@license GNU GPL 3.0 or any newer version
-@link http://www.ship-simu.org
+@link http://www.shipsimu.org
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
A template for announcing itself to upper hubs. Do not fill anything in here.
Please use config.php/config-local.php files at application/hub/ instead.
-@author Roland Haeder <webmaster@ship-simu.org>
+@author Roland Haeder <webmaster@shipsimu.org>
@version 0.0.0
@copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2015 Hub Developer Team
@license GNU GPL 3.0 or any newer version
-@link http://www.ship-simu.org
+@link http://www.shipsimu.org
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
An XML template for answering announcements from other nodes. This template may
be used to indicate that this node does not want to receive announcements.
-@author Roland Haeder <webmaster@ship-simu.org>
+@author Roland Haeder <webmaster@shipsimu.org>
@version 0.0.0
@copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2015 Hub Developer Team
@license GNU GPL 3.0 or any newer version
-@link http://www.ship-simu.org
+@link http://www.shipsimu.org
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
template may be used to indicate that this node does not want to receive
DHT bootstrap requests.
-@author Roland Haeder <webmaster@ship-simu.org>
+@author Roland Haeder <webmaster@shipsimu.org>
@version 0.0.0
@copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2015 Hub Developer Team
@license GNU GPL 3.0 or any newer version
-@link http://www.ship-simu.org
+@link http://www.shipsimu.org
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
<!--
An XML template for answering node-list requests
-@author Roland Haeder <webmaster@ship-simu.org>
+@author Roland Haeder <webmaster@shipsimu.org>
@version 0.0.0
@copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2015 Hub Developer Team
@license GNU GPL 3.0 or any newer version
-@link http://www.ship-simu.org
+@link http://www.shipsimu.org
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
<!--
A XML template for the producer to produce test units
-@author Roland Haeder <webmaster@ship-simu.org>
+@author Roland Haeder <webmaster@shipsimu.org>
@version 0.0.0
@copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2015 Hub Developer Team
@license GNU GPL 3.0 or any newer version
-@link http://www.ship-simu.org
+@link http://www.shipsimu.org
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
<!--
A XML template for the producer to produce work units
-@author Roland Haeder <webmaster@ship-simu.org>
+@author Roland Haeder <webmaster@shipsimu.org>
@version 0.0.0
@copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2015 Hub Developer Team
@license GNU GPL 3.0 or any newer version
-@link http://www.ship-simu.org
+@link http://www.shipsimu.org
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
<!--
An XML for DHT bootstrapping
-@author Roland Haeder <webmaster@ship-simu.org>
+@author Roland Haeder <webmaster@shipsimu.org>
@version 0.0.0
@copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2015 Hub Developer Team
@license GNU GPL 3.0 or any newer version
-@link http://www.ship-simu.org
+@link http://www.shipsimu.org
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
<!--
An XML for DHTs publishing their entries
-@author Roland Haeder <webmaster@ship-simu.org>
+@author Roland Haeder <webmaster@shipsimu.org>
@version 0.0.0
@copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2015 Hub Developer Team
@license GNU GPL 3.0 or any newer version
-@link http://www.ship-simu.org
+@link http://www.shipsimu.org
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
<!--
All valid node status.
-@author Roland Haeder <webmaster@ship-simu.org>
+@author Roland Haeder <webmaster@shipsimu.org>
@version 0.0.0
@copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2015 Hub Developer Team
@license GNU GPL 3.0 or any newer version
-@link http://www.ship-simu.org
+@link http://www.shipsimu.org
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
The object registry. All known (shareable!) object types/names are "registered"
here.
-@author Roland Haeder <webmaster@ship-simu.org>
+@author Roland Haeder <webmaster@shipsimu.org>
@version 0.0.0
@copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2015 Hub Developer Team
@license GNU GPL 3.0 or any newer version
-@link http://www.ship-simu.org
+@link http://www.shipsimu.org
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
An XML for requesting a node list, to specify which node data shall be
transmitted.
-@author Roland Haeder <webmaster@ship-simu.org>
+@author Roland Haeder <webmaster@shipsimu.org>
@version 0.0.0
@copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2015 Hub Developer Team
@license GNU GPL 3.0 or any newer version
-@link http://www.ship-simu.org
+@link http://www.shipsimu.org
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
<!--
A descriptor XML file for self-connect attempts
-@author Roland Haeder <webmaster@ship-simu.org>
+@author Roland Haeder <webmaster@shipsimu.org>
@version 0.0.0
@copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2015 Hub Developer Team
@license GNU GPL 3.0 or any newer version
-@link http://www.ship-simu.org
+@link http://www.shipsimu.org
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
-Subproject commit bb121094b0c87c1ed028dfb5f86565b782742e6d
+Subproject commit de0eb5a71c8f65df71712ba9c5cd7092baa8d980