+
+ /**
+ * Getter for $hubIsActive attribute
+ *
+ * @return $hubIsActive Wether the hub is activer
+ */
+ public final function isHubActive () {
+ return $this->hubIsActive;
+ }
+
+ /**
+ * Activates the hub by doing some final preparation and setting
+ * $hubIsActive to true
+ */
+ public function activateHub () {
+ // Checks wether a listener is still active and shuts it down if one
+ // is still listening
+ if (($this->checkIfListenerIsActive()) && ($this->isHubActive())) {
+ // Shutdown them down before they can hurt anything
+ $this->shutdownListenerPool();
+ } // END - if
+
+ // Initialize the TCP/UDP listener pool
+ $this->initializeListenerPool();
+
+ // @TODO Do some final preparation
+ $this->partialStub('Do some final preparation before the hub gots activated.');
+
+ // ----------------------- Last step from here ------------------------
+ // Activate the hub. This is ALWAYS the last step in this method
+ $this->hubIsActive = true;
+ // ---------------------- Last step until here ------------------------
+ }