/**
* An interface for "node-helper" classes
*
- * @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 - 2012 Hub Developer Team
+ * @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
* @todo We need to find a better name for this interface
*
* This program is free software: you can redistribute it and/or modify
* 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 {
+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
*/
function doBootstrapping ();
- /**
- * Initializes hub-specific queues
- *
- * @return void
- */
- function initQueues ();
-
/**
* Outputs the console teaser. This should only be executed on startup or
* full restarts. This method generates some space around the teaser.
/**
* Activates the hub by doing some final preparation and setting
- * $hubIsActive to true
+ * $hubIsActive to TRUE.
*
* @param $requestInstance A Requestable class
* @param $responseInstance A Responseable class
*/
function initializeListenerPool ();
- /**
- * Restores a previously stored node list from database
- *
- * @return void
- */
- function bootstrapRestoreNodeList ();
-
/**
* Announces this hub to the upper (bootstrap or list) hubs. After this is
* successfully done the given task is unregistered from the handler.
* @return void
* @throws NodeAlreadyAnnouncedException If this hub is already announced
*/
- function announceSelfToUpperNodes (Taskable $taskInstance);
+ function announceToUpperNodes (Taskable $taskInstance);
/**
* Does a self-connect attempt on the public IP address. This should make
function doSelfConnection (Taskable $taskInstance);
/**
- * "Getter for address:port combination
+ * Determines an instance of a LocateableNode class
*
- * @param $handlerInstance An instance of a Networkable class
- * @return $addressPort A address:port combination for this node
+ * @return $unlInstance An instance of a LocateableNode class for this node
*/
- function getAddressPort (Networkable $handlerInstance);
+ function determineUniversalNodeLocator ();
/**
- * Adds hub data elements to a given dataset instance
+ * "Getter for an array of an instance of a LocateableNode class
*
- * @param $criteriaInstance An instance of a storeable criteria
- * @param $requestInstance An instance of a Requestable class
- * @return void
+ * @return $unlData An array of an instance of a LocateableNode class
*/
- function addElementsToDataSet (StoreableCriteria $criteriaInstance, Requestable $requestInstance);
+ function getUniversalNodeLocatorArray ();
/**
* Updates/refreshes node data (e.g. state).
*/
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 $hasAnnounced 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 ();
* @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);
}
// [EOF]