]> git.mxchange.org Git - hub.git/commitdiff
Interface Poolable rewritten to PoolableListener and kept as generic interface
authorRoland Häder <roland@mxchange.org>
Wed, 8 Jul 2009 21:02:36 +0000 (21:02 +0000)
committerRoland Häder <roland@mxchange.org>
Wed, 8 Jul 2009 21:02:36 +0000 (21:02 +0000)
.gitattributes
application/hub/interfaces/pool/class_Poolable.php
application/hub/interfaces/pool/class_PoolableClient.php
application/hub/interfaces/pool/class_PoolableListener.php [new file with mode: 0644]
application/hub/main/nodes/class_BaseHubNode.php
application/hub/main/pools/listener/class_DefaultListenerPool.php

index c19a615d18033e70532be8a58ecec592bfa03539..5313adb66b1a37805aabeaf4e1e08abfceb42e22 100644 (file)
@@ -19,6 +19,7 @@ application/hub/interfaces/nodes/class_NodeHelper.php -text
 application/hub/interfaces/pool/.htaccess -text
 application/hub/interfaces/pool/class_Poolable.php -text
 application/hub/interfaces/pool/class_PoolableClient.php -text
+application/hub/interfaces/pool/class_PoolableListener.php -text
 application/hub/interfaces/query/.htaccess -text
 application/hub/interfaces/query/class_Queryable.php -text
 application/hub/interfaces/queues/.htaccess -text
index 1f58cb0804ee3b991f3c86b372eece802253874a..8a95117481f697373ee5571adf9f7fbbfec5a802 100644 (file)
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
 interface Poolable extends FrameworkInterface {
-       /**
-        * Adds a listener instance to this pool
-        *
-        * @param       $listenerInstance       An instance of a Listenable class
-        * @return      void
-        */
-       function addListener (Listenable $listenerInstance);
 }
 
 //
index 36f258d76d88d9a18195cb01591ec84645076967..c74c72f523ae62a1a3d2d47e51c205a8bfb25721 100644 (file)
@@ -21,7 +21,7 @@
  * 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 PoolableClient extends FrameworkInterface {
+interface PoolableClient extends Poolable {
        /**
         * Adds a socket resource to the client pool
         *
diff --git a/application/hub/interfaces/pool/class_PoolableListener.php b/application/hub/interfaces/pool/class_PoolableListener.php
new file mode 100644 (file)
index 0000000..162d8a6
--- /dev/null
@@ -0,0 +1,35 @@
+<?php
+/**
+ * An interface for pools
+ *
+ * @author             Roland Haeder <webmaster@ship-simu.org>
+ * @version            0.0.0
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 Hub Developer Team
+ * @license            GNU GPL 3.0 or any newer version
+ * @link               http://www.ship-simu.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 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 PoolableListener extends Poolable {
+       /**
+        * Adds a listener instance to this pool
+        *
+        * @param       $listenerInstance       An instance of a Listenable class
+        * @return      void
+        */
+       function addListener (Listenable $listenerInstance);
+}
+
+//
+?>
index c76e89776964fe7213137609aa79383a7c7d5ae9..5bf97fb0af20a1351ea11edead339f1034cdd240 100644 (file)
@@ -316,7 +316,7 @@ class BaseHubNode extends BaseHubSystem implements Updateable {
        public function activateHub () {
                // Checks wether a listener is still active and shuts it down if one
                // is still listening
-               if (($this->checkIfListenerIsActive()) && ($this->isHubActive())) {
+               if (($this->determineIfListenerIsActive()) && ($this->isHubActive())) {
                        // Shutdown them down before they can hurt anything
                        $this->shutdownListenerPool();
                } // END - if
index 051f7e62225a8a90a416b425db498f4bd99a0adb..1340c89544d95815b74a15160956e6ff2f21089b 100644 (file)
@@ -21,7 +21,7 @@
  * 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 DefaultListenerPool extends BasePool implements Poolable {
+class DefaultListenerPool extends BasePool implements PoolableListener {
        /**
         * Protected constructor
         *