]> git.mxchange.org Git - hub.git/blobdiff - application/hub/interfaces/nodes/class_NodeHelper.php
Hub project continued: (I have now a little more time)
[hub.git] / application / hub / interfaces / nodes / class_NodeHelper.php
index b76bb29b82af146aceb915ff20e17637003a5618..80addaf8144a865b3af0ef82970ee9e410cfd527 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@ship-simu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.ship-simu.org
  * @todo               We need to find a better name for this interface
@@ -47,6 +47,13 @@ interface NodeHelper extends FrameworkInterface {
         */
        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
@@ -56,7 +63,7 @@ interface NodeHelper extends FrameworkInterface {
         * @param       $responseInstance       A Responseable class
         * @return      void
         */
-       function bootstrapAcquireHubId (Requestable $requestInstance, Responseable $responseInstance);
+       function bootstrapAcquireNodeId (Requestable $requestInstance, Responseable $responseInstance);
 
        /**
         * Activates the hub by doing some final preparation and setting
@@ -66,35 +73,35 @@ interface NodeHelper extends FrameworkInterface {
         * @param       $responseInstance       A Responseable class
         * @return      void
         */
-       function activateHub (Requestable $requestInstance, Responseable $responseInstance);
+       function activateNode (Requestable $requestInstance, Responseable $responseInstance);
 
        /**
-        * Generates a session id which will be sent to the other hubs and clients
+        * Generates a session id which will be sent to the other hubs and peers
         *
         * @return      void
         */
        function bootstrapGenerateSessionId ();
 
        /**
-        * Initializes the listener pool (class)
+        * Generates a private key for en-/decryption
         *
         * @return      void
         */
-       function initializeListenerPool ();
+       function bootstrapGeneratePrivateKey ();
 
        /**
-        * Restores a previously stored node list from database
+        * Initializes the listener pool (class)
         *
         * @return      void
         */
-       function bootstrapRestoreNodeList ();
+       function initializeListenerPool ();
 
        /**
-        * Add some node-specific filters
+        * Restores a previously stored node list from database
         *
         * @return      void
         */
-       function addExtraHubFilters ();
+       function bootstrapRestoreNodeList ();
 
        /**
         * Announces this hub to the upper (bootstrap or list) hubs. After this is
@@ -105,8 +112,40 @@ interface NodeHelper extends FrameworkInterface {
         * @throws      HubAlreadyAnnouncedException    If this hub is already announced
         */
        function announceSelfToUpperNodes (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);
+
+       /**
+        * "Getter for address:port combination
+        *
+        * @param       $handlerInstance        A valid Networkable instance
+        * @return      $addressPort            A address:port combination for this node
+        */
+       function getAddressPort (Networkable $handlerInstance);
+
+       /**
+        * 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
+        * @return      void
+        */
+       function addElementsToDataSet (StoreableCriteria $criteriaInstance, Requestable $requestInstance);
+
+       /**
+        * Updates/refreshes node data (e.g. state).
+        *
+        * @return      void
+        */
+       function updateNodeData ();
 }
 
-//
+// [EOF]
 ?>
-