]> git.mxchange.org Git - hub.git/commitdiff
Bootstrap filters filled with some content (basicly...)
authorRoland Häder <roland@mxchange.org>
Thu, 23 Jul 2009 20:26:10 +0000 (20:26 +0000)
committerRoland Häder <roland@mxchange.org>
Thu, 23 Jul 2009 20:26:10 +0000 (20:26 +0000)
application/hub/main/filter/bootstrap/class_HubBootstrapAquireHubIdFilter.php
application/hub/main/filter/bootstrap/class_HubBootstrapGenSessionIdFilter.php
application/hub/main/filter/bootstrap/class_HubBootstrapRestoreNodeListFilter.php
application/hub/main/nodes/boot/class_HubBootNode.php
application/hub/main/nodes/class_BaseHubNode.php
application/hub/main/nodes/list/class_HubListNode.php
application/hub/main/nodes/master/class_HubMasterNode.php
application/hub/main/nodes/regular/class_HubRegularNode.php

index e8147d77e9cbdd5f45a121ebe1e3e03365c293ee..7d3fed1bb8fc1d9fa6a13da66794fb4d92e2b293 100644 (file)
@@ -63,8 +63,12 @@ class HubBootstrapAquireHubIdFilter extends BaseFilter implements Filterable {
                        throw new FilterChainException($this, self::EXCEPTION_FILTER_CHAIN_INTERCEPTED);
                } // END - if
 
-               // Implement this!
-               $this->partialStub('Please implement this method.');
+               // --------------------- Hub-id acquirement phase ---------------------
+               // Acquire a hub-id. This step generates on first launch a new one and
+               // on any later launches it will restore the hub-id from the database.
+               // A passed 'nickname=xxx' argument will be used to add some
+               // 'personality' to the hub.
+               $nodeInstance->bootstrapAcquireHubId();
        }
 }
 
index 7322119d5a5870d64fd73470f5f1e72f3bfc69a8..7ebe0957f86dfec99e3dff02974f2c57479a0f00 100644 (file)
@@ -63,8 +63,10 @@ class HubBootstrapGenSessionIdFilter extends BaseFilter implements Filterable {
                        throw new FilterChainException($this, self::EXCEPTION_FILTER_CHAIN_INTERCEPTED);
                } // END - if
 
-               // Implement this!
-               $this->partialStub('Please implement this method.');
+               // ------------------- More generic bootstrap steps -------------------
+               // Generate the session id which will only be stored in RAM and kept for
+               // the whole "session".
+               $nodeInstance->bootstrapGenerateSessionId();
        }
 }
 
index 23f60f7dfcff69aaa8431bb56cd1c3f8c0691e8a..82ad3c92a0580a85ee90764e9d5bd573614e08ba 100644 (file)
@@ -63,8 +63,8 @@ class HubBootstrapRestoreNodeListFilter extends BaseFilter implements Filterable
                        throw new FilterChainException($this, self::EXCEPTION_FILTER_CHAIN_INTERCEPTED);
                } // END - if
 
-               // Implement this!
-               $this->partialStub('Please implement this method.');
+               // Restore a previously downloaded bootstrap-node list.
+               $nodeInstance->bootstrapRestoreNodeList();
        }
 }
 
index 3f2d9465c386a0b5631e2f79afbf5938301d82d8..ff55bcd77e7125054888b4c669982185b60cbcd8 100644 (file)
@@ -58,9 +58,6 @@ class HubBootNode extends BaseHubNode implements NodeHelper, Registerable {
         * @todo        add some more special bootstrap things for this boot node
         */
        public function doBootstrapping () {
-               // Call generic (parent) bootstrapping method first
-               parent::bootstrapGenericBootstrapping();
-
                // Now check if the IP address matches one of the bootstrap nodes
                if ($this->ifAddressMatchesBootstrappingNodes($_SERVER['SERVER_ADDR'])) {
                        // Get our port from configuration
index 92d794cc4b89a450bb7b53259dcf78cf6cce5a46..ff1cf1306920000172abd021ff8079824ec15528 100644 (file)
@@ -165,33 +165,6 @@ class BaseHubNode extends BaseHubSystem implements Updateable {
                $this->debugOutput(' ');
        }
 
-       /**
-        * Do generic things for bootup phase. This can be e.g. checking if the
-        * right node mode is selected for this hub's IP number.
-        *
-        * @return      void
-        * @todo        This method is maybe not yet finished.
-        */
-       protected function bootstrapGenericBootstrapping () {
-               // --------------------- Hub-id acquirement phase ---------------------
-               // Acquire a hub-id. This step generates on first launch a new one and
-               // on any later launches it will restore the hub-id from the database.
-               // A passed 'nickname=xxx' argument will be used to add some
-               // 'personality' to the hub.
-               $this->bootstrapAcquireHubId();
-
-               // ------------------- More generic bootstrap steps -------------------
-               // Generate the session id which will only be stored in RAM and kept for
-               // the whole "session".
-               $this->bootstrapGenerateSessionId();
-
-               // Restore a previously downloaded bootstrap-node list.
-               $this->bootstrapRestoreNodeList();
-
-               // @TODO Add some generic bootstrap steps
-               $this->partialStub('Add some generic bootstrap steps here.');
-       }
-
        /**
         * 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
index 3879b78ae3edfa0398757f34e08f1428252d9657..64dd44f4b14dd7c23d55ce00ad3f979ddb8f4ccd 100644 (file)
@@ -58,8 +58,6 @@ class HubListNode extends BaseHubNode implements NodeHelper, Registerable {
         * @todo        Implement this method
         */
        public function doBootstrapping () {
-               // Call generic (parent) bootstrapping method first
-               parent::bootstrapGenericBootstrapping();
                $this->partialStub('Please implement this method.');
        }
 
index d67910beefdd1c2306222b3e9bfd9dd467f01aca..3e9d399fe42f63bccc0c061412fffec14eb99bcd 100644 (file)
@@ -58,8 +58,6 @@ class HubMasterNode extends BaseHubNode implements NodeHelper, Registerable {
         * @todo        Implement this method
         */
        public function doBootstrapping () {
-               // Call generic (parent) bootstrapping method first
-               parent::bootstrapGenericBootstrapping();
                $this->partialStub('Please implement this method.');
        }
 
index cb2ff250bca266342e439cdbc43b87c9aacd0b9d..46105f22f79c1d991df641b92705d9dfda4bf30b 100644 (file)
@@ -58,8 +58,6 @@ class HubRegularNode extends BaseHubNode implements NodeHelper, Registerable {
         * @todo        Implement this method
         */
        public function doBootstrapping () {
-               // Call generic (parent) bootstrapping method first
-               parent::bootstrapGenericBootstrapping();
                $this->partialStub('Please implement this method.');
        }