application/hub/interfaces/.htaccess -text
application/hub/interfaces/connectors/.htaccess -text
application/hub/interfaces/connectors/class_Connectable.php -text
+application/hub/interfaces/handler/.htaccess -text
+application/hub/interfaces/handler/class_Handleable.php -text
+application/hub/interfaces/handler/network/.htaccess -text
+application/hub/interfaces/handler/network/class_Networkable.php -text
application/hub/interfaces/listener/.htaccess -text
application/hub/interfaces/listener/class_Listenable.php -text
application/hub/interfaces/lists/.htaccess -text
application/hub/main/filter/shutdown/class_HubShutdownFlushNodeListFilter.php -text
application/hub/main/filter/shutdown/class_HubShutdownListenerPoolFilter.php -text
application/hub/main/filter/shutdown/class_HubShutdownNodeFilter.php -text
+application/hub/main/handler/.htaccess -text
+application/hub/main/handler/class_ -text
+application/hub/main/handler/class_BaseHandler.php -text
+application/hub/main/handler/network/.htaccess -text
+application/hub/main/handler/network/class_ -text
+application/hub/main/handler/network/class_BaseNetworkPackageHandler.php -text
+application/hub/main/handler/network/tcp/.htaccess -text
+application/hub/main/handler/network/tcp/class_TcpNetworkPackageHandler.php -text
+application/hub/main/handler/network/udp/.htaccess -text
+application/hub/main/handler/network/udp/class_UdpNetworkPackageHandler.php -text
application/hub/main/iterator/.htaccess -text
application/hub/main/iterator/class_ -text
application/hub/main/iterator/class_BaseIterator.php -text
// CFG: NETWORK-LISTEN-ITERATOR-CLASS
$cfg->setConfigEntry('network_listen_iterator_class', 'NetworkListenIterator');
+// CFG: NETWORK-PACKAGE-HANDLER-CLASS
+$cfg->setConfigEntry('tcp_network_package_handler_class', 'TcpNetworkPackageHandler');
+
// CFG: LIST-GROUP-CLASS
$cfg->setConfigEntry('list_group_class', 'ListGroupList');
--- /dev/null
+Deny from all
--- /dev/null
+<?php
+/**
+ * A Handleable interface
+ *
+ * @author Roland Haeder <webmaster@ship-simu.org>
+ * @version 0.0.0
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 Core 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 Handleable extends FrameworkInterface {
+}
+
+//
+?>
--- /dev/null
+Deny from all
--- /dev/null
+<?php
+/**
+ * A Networkable interface
+ *
+ * @author Roland Haeder <webmaster@ship-simu.org>
+ * @version 0.0.0
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 Core 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 Networkable extends Handleable {
+}
+
+//
+?>
<?php
/**
- *
+ * A ???
*
* @author Roland Haeder <webmaster@ship-simu.org>
* @version 0.0.0
* 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 ??? extends BaseHubSystem {
+class ??? extends BaseFrameworkSystem {
/**
* Protected constructor
*
// Call parent constructor
parent::__construct(__CLASS__);
}
+
+ /**
+ * Creates an instance of this class
+ *
+ * @return $!!!Instance An instance of a === class
+ */
+ public final static function create??? () {
+ // Get new instance
+ $!!!Instance = new ???();
+
+ // Return the prepared instance
+ return $!!!Instance;
+ }
}
// [EOF]
<?php
/**
- * A general
+ * A general ???
*
* @author Roland Haeder <webmaster@ship-simu.org>
* @version 0.0.0
--- /dev/null
+Deny from all
--- /dev/null
+<?php
+/**
+ * A ??? handler
+ *
+ * @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/>.
+ */
+class ???Handler extends BaseHandler {
+ /**
+ * Protected constructor
+ *
+ * @return void
+ */
+ protected function __construct () {
+ // Call parent constructor
+ parent::__construct(__CLASS__);
+ }
+
+ /**
+ * Creates an instance of this class
+ *
+ * @return $handlerInstance An instance of a !!! class
+ */
+ public final static function create???Handler () {
+ // Get new instance
+ $handlerInstance = new ???Handler();
+
+ // Return the prepared instance
+ return $handlerInstance;
+ }
+}
+
+// [EOF]
+?>
--- /dev/null
+<?php
+/**
+ * A general Handler
+ *
+ * @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/>.
+ */
+class BaseHandler extends BaseHubSystem {
+ /**
+ * Protected constructor
+ *
+ * @param $className Name of the class
+ * @return void
+ */
+ protected function __construct ($className) {
+ // Call parent constructor
+ parent::__construct($className);
+ }
+}
+
+// [EOF]
+?>
--- /dev/null
+Deny from all
--- /dev/null
+<?php
+/**
+ * A ??? network package handler
+ *
+ * @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/>.
+ */
+class ???NetworkPackageHandler extends BaseNetworkPackageHandler implements !!! {
+ /**
+ * Protected constructor
+ *
+ * @return void
+ */
+ protected function __construct () {
+ // Call parent constructor
+ parent::__construct(__CLASS__);
+ }
+
+ /**
+ * Creates an instance of this class
+ *
+ * @return $handlerInstance An instance of a !!! class
+ */
+ public final static function create???NetworkPackageHandler () {
+ // Get new instance
+ $handlerInstance = new ???NetworkPackageHandler();
+
+ // Return the prepared instance
+ return $handlerInstance;
+ }
+}
+
+// [EOF]
+?>
--- /dev/null
+<?php
+/**
+ * A general Handler
+ *
+ * @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/>.
+ */
+class BaseNetworkPackageHandler extends BaseHandler {
+ /**
+ * Protected constructor
+ *
+ * @param $className Name of the class
+ * @return void
+ */
+ protected function __construct ($className) {
+ // Call parent constructor
+ parent::__construct($className);
+ }
+}
+
+// [EOF]
+?>
--- /dev/null
+Deny from all
--- /dev/null
+<?php
+/**
+ * A TCP network package handler
+ *
+ * @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/>.
+ */
+class TcpNetworkPackageHandler extends BaseNetworkPackageHandler implements Networkable {
+ /**
+ * Protected constructor
+ *
+ * @return void
+ */
+ protected function __construct () {
+ // Call parent constructor
+ parent::__construct(__CLASS__);
+ }
+
+ /**
+ * Creates an instance of this class
+ *
+ * @return $handlerInstance An instance of a !!! class
+ */
+ public final static function createTcpNetworkPackageHandler () {
+ // Get new instance
+ $handlerInstance = new TcpNetworkPackageHandler();
+
+ // Return the prepared instance
+ return $handlerInstance;
+ }
+}
+
+// [EOF]
+?>
--- /dev/null
+Deny from all
--- /dev/null
+<?php
+/**
+ * A UDP network package handler
+ *
+ * @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/>.
+ */
+class UdpNetworkPackageHandler extends BaseNetworkPackageHandler implements Networkable {
+ /**
+ * Protected constructor
+ *
+ * @return void
+ */
+ protected function __construct () {
+ // Call parent constructor
+ parent::__construct(__CLASS__);
+ }
+
+ /**
+ * Creates an instance of this class
+ *
+ * @return $handlerInstance An instance of a !!! class
+ */
+ public final static function createUdpNetworkPackageHandler () {
+ // Get new instance
+ $handlerInstance = new UdpNetworkPackageHandler();
+
+ // Return the prepared instance
+ return $handlerInstance;
+ }
+}
+
+// [EOF]
+?>
/**
* Creates an instance of this class
*
- * @return $iteratorInstance An instance a Iterator class
+ * @return $iteratorInstance An instance of a Iterator class
*/
public final static function create???Iterator () {
// Get new instance
*/
private $poolInstance = null;
+ /**
+ * A network package handler instance
+ */
+ private $packageInstance = null;
+
/**
* Protected constructor
*
return $this->poolInstance;
}
+ /**
+ * Setter for network package handler instance
+ *
+ * @param $packageInstance The network package handler instance we shall set
+ * @return void
+ */
+ protected final function setPackageInstance (Networkable $packageInstance) {
+ $this->packageInstance = $packageInstance;
+ }
+
+ /**
+ * Getter for network package handler instance
+ *
+ * @return $packageInstance The network package handler instance we shall set
+ */
+ protected final function getPackageInstance () {
+ return $this->packageInstance;
+ }
+
/**
* Accepts the visitor to rpocess the visit "request"
*
$iteratorInstance->rewind();
$this->setIteratorInstance($iteratorInstance);
+ // Initialize the network package handler
+ $packageInstance = ObjectFactory::createObjectByConfiguredName('tcp_network_package_handler_class');
+
+ // Set it in this class
+ $this->setPackageInstance($packageInstance);
+
// Output message
$this->debugOutput('LISTENER: TCP listener now ready on IP ' . $this->getListenAddress() . ', port ' . $this->getListenPort() . ' for service.');
}
$current = $this->getIteratorInstance()->current();
// Handle it here
- $this->partialStub('current['.gettype($current).']='.$current);
+ $this->getPackageInstance()->processPackage($current);
// Advance to next entry. This should be the last line
$this->getIteratorInstance()->next();
- die("OK!\n");
}
}
sh ./clear-cache.sh
echo -n "$0: Packaging... "
-zip -9 gos-hub_dev.zip docs/* Doxyfile *.php *.sh > /dev/null 2>&1
+zip -9 hub_dev.zip docs/* Doxyfile *.php *.sh > /dev/null 2>&1
echo -n "."
-zip -9r gos-hub_dev.zip application/ db/ devel/ Doxyfile inc/ templates/ tests/ > /dev/null 2>&1
+zip -9r hub_dev.zip application/ db/ devel/ Doxyfile inc/ templates/ tests/ > /dev/null 2>&1
echo -n "."
-zip -d gos-hub_dev.zip docs/warn.log db/*/*.serialized > /dev/null 2>&1
+zip -d hub_dev.zip docs/warn.log db/*/*.serialized > /dev/null 2>&1
echo ". done"
echo "$0: Renaming..."
-mv gos-hub_dev.zip gos-hub_dev_`date +%Y%m%d_%H%M%S`.zip
+mv hub_dev.zip hub_dev_`date +%Y%m%d_%H%M%S`.zip
echo "$0: All done."