application/hub/main/tags/package/.htaccess -text svneol=unset#text/plain
application/hub/main/tags/package/class_PackageTags.php svneol=native#text/plain
application/hub/main/tasks/.htaccess -text svneol=unset#text/plain
+application/hub/main/tasks/chat/.htaccess -text svneol=unset#text/plain
+application/hub/main/tasks/chat/class_ svneol=native#text/plain
+application/hub/main/tasks/chat/class_ChatTelnetListenerTask.php svneol=native#text/plain
application/hub/main/tasks/class_ svneol=native#text/plain
application/hub/main/tasks/class_BaseTask.php svneol=native#text/plain
application/hub/main/tasks/cruncher/.htaccess svneol=native#text/plain
// CFG: CHAT-SHUTDOWN-FILTER
$cfg->setConfigEntry('chat_shutdown_filter', 'ChatShutdownFilter');
+// CFG: CHAT-TELNET-LISTENER-TASK-CLASS
+$cfg->setConfigEntry('chat_telnet_listener_task_class', 'ChatTelnetListenerTask');
+
+// CFG: TASK-CHAT-TELNET-LISTENER-STARTUP-DELAY
+$cfg->setConfigEntry('task_chat_telnet_listener_startup_delay', 2500);
+
+// CFG: TASK-CHAT-TELNET-LISTENER-INTERVAL-DELAY
+$cfg->setConfigEntry('task_chat_telnet_listener_interval_delay', 10);
+
+// CFG: TASK-CHAT-TELNET-LISTENER-MAX-RUNS
+$cfg->setConfigEntry('task_chat_telnet_listener_max_runs', 0);
+
///////////////////////////////////////////////////////////////////////////////
// HTTP Configuration
///////////////////////////////////////////////////////////////////////////////
// Get a new task handler instance
$handlerInstance = ObjectFactory::createObjectByConfiguredName('task_handler_class');
- // Register all tasks:
- //
- // 1) A task for fetching WUs (work units) or test units
- //$taskInstance = ObjectFactory::createObjectByConfiguredName('chat_work_unit_fetcher_task_class');
- //$handlerInstance->registerTask('chat_work_unit_fetcher', $taskInstance);
+ /*
+ * Register all tasks:
+ *
+ * 1) Telnet session listener
+ */
+ $taskInstance = ObjectFactory::createObjectByConfiguredName('chat_telnet_listener_task_class');
+ $handlerInstance->registerTask('chat_telnet_listener', $taskInstance);
// Put the task handler in registry
Registry::getRegistry()->addInstance('task', $handlerInstance);
// Get node instance
$nodeInstance = Registry::getRegistry()->getInstance('node');
- // Get the list instance here
- $listInstance = $nodeInstance->getListenerPoolInstance()->getPoolEntriesInstance();
-
// Get a new task handler instance
$handlerInstance = ObjectFactory::createObjectByConfiguredName('task_handler_class');
// Register it
$handlerInstance->registerTask('update_check', $taskInstance);
+ // Get the list instance here
+ $listInstance = $nodeInstance->getListenerPoolInstance()->getPoolEntriesInstance();
+
// Prepare a ping task
$taskInstance = ObjectFactory::createObjectByConfiguredName('hub_ping_task_class', array($listInstance));
* @return $accepts Wether this listener does accept
*/
public function ifListenerAcceptsPackageData (array $packageData) {
- $this->partialStub('This call should not happen. Please report it.');
+ $this->debugBackTrace('This call should not happen. Please report it.');
}
}
// Is this entry visitable?
if ($poolEntry instanceof Visitable) {
// Visit this entry as well
+ //* NOISY-DEBUG: */ $this->debugOutput('BASE-POOL: Going to visit pooled object ' . $poolEntry->__toString() . ' with visitor ' . $visitorInstance->__toString() . ' ...');
$poolEntry->accept($visitorInstance);
} else {
// Cannot visit this entry
- $this->partialStub('Pool entry with key ' . $iteratorInstance->key() . ' has improper type ' . gettype($poolEntry) . '.');
+ $this->partialStub('Pool entry with key ' . $iteratorInstance->key() . ' has improper type ' . gettype($poolEntry) . ', reason: not implementing Visitable.');
}
// Advance to next entry
private static $connectionStatistics = array(
// Statistics for TCP connections
'tcp' => array(
- // Tried connection attempts
+ // Tried TCP connection attempts
'retry_count' => array(),
),
// Statistics for UDP connections
'udp' => array(
+ // Tried UDP connection attempts
'retry_count' => array(),
)
);
--- /dev/null
+Deny from all
--- /dev/null
+<?php
+/**
+ * A ??? task for chat consoles
+ *
+ * @author Roland Haeder <webmaster@ship-simu.org>
+ * @version 0.0.0
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 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 Chat???Task extends BaseTask implements Taskable, Visitable {
+ /**
+ * Protected constructor
+ *
+ * @return void
+ */
+ protected function __construct () {
+ // Call parent constructor
+ parent::__construct(__CLASS__);
+ }
+
+ /**
+ * Creates an instance of this class
+ *
+ * @return $taskInstance An instance of a Visitable class
+ */
+ public final static function createChat???Task () {
+ // Get new instance
+ $taskInstance = new Chat???Task();
+
+ // Return the prepared instance
+ return $taskInstance;
+ }
+
+ /**
+ * Accepts the visitor to process the visit "request"
+ *
+ * @param $visitorInstance An instance of a Visitor class
+ * @return void
+ * @todo Maybe visit some sub-objects
+ */
+ public function accept (Visitor $visitorInstance) {
+ // Visit this task
+ $visitorInstance->visitTask($this);
+ }
+
+ /**
+ * Executes the task
+ *
+ * @return void
+ * @todo 0%
+ */
+ public function executeTask () {
+ $this->partialStub('Unimplemented task.');
+ }
+}
+
+// [EOF]
+?>
--- /dev/null
+<?php
+/**
+ * A TelnetListener task for chat consoles
+ *
+ * @author Roland Haeder <webmaster@ship-simu.org>
+ * @version 0.0.0
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 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 ChatTelnetListenerTask extends BaseTask implements Taskable, Visitable {
+ /**
+ * Protected constructor
+ *
+ * @return void
+ */
+ protected function __construct () {
+ // Call parent constructor
+ parent::__construct(__CLASS__);
+ }
+
+ /**
+ * Creates an instance of this class
+ *
+ * @return $taskInstance An instance of a Visitable class
+ */
+ public final static function createChatTelnetListenerTask () {
+ // Get new instance
+ $taskInstance = new ChatTelnetListenerTask();
+
+ // Return the prepared instance
+ return $taskInstance;
+ }
+
+ /**
+ * Accepts the visitor to process the visit "request"
+ *
+ * @param $visitorInstance An instance of a Visitor class
+ * @return void
+ * @todo Maybe visit some sub-objects
+ */
+ public function accept (Visitor $visitorInstance) {
+ // Visit this task
+ $visitorInstance->visitTask($this);
+ }
+
+ /**
+ * Executes the task
+ *
+ * @return void
+ * @todo 0%
+ */
+ public function executeTask () {
+ $this->partialStub('Unimplemented task.');
+ }
+}
+
+// [EOF]
+?>
<?php
/**
- * A ??? task for crunchers
+ * A ??? task for !!!
*
* @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 Cruncher???Task extends BaseTask implements Taskable, Visitable {
+class !!!???Task extends BaseTask implements Taskable, Visitable {
/**
* Protected constructor
*
*
* @return $taskInstance An instance of a Visitable class
*/
- public final static function createCruncher???Task () {
+ public final static function create!!!???Task () {
// Get new instance
- $taskInstance = new Cruncher???Task();
+ $taskInstance = new !!!???Task();
// Return the prepared instance
return $taskInstance;
$nodeInstance = Registry::getRegistry()->getInstance('node');
// Visit the pool listener task
+ //* NOISY-DEBUG: */ $this->debugOutput('LISTENER-TASK: Going to visit object ' . $nodeInstance->getListenerPoolInstance()->__toString() . ' ...');
$nodeInstance->getListenerPoolInstance()->accept($visitorInstance);
// Visit this task
*/
public function visitDecorator (BaseDecorator $decoratorInstance) {
// Do monitor here
- //* DEBUG: */ $this->debugOutput('VISITOR: Visiting ' . $listenerInstance->__toString() . ' - START');
+ //* NOISY-DEBUG: */ $this->debugOutput('VISITOR: Visiting ' . $listenerInstance->__toString() . ' - START');
$decoratorInstance->monitorIncomingRawData($this->getReceiverInstance());
- //* DEBUG: */ $this->debugOutput('VISITOR: Visiting ' . $listenerInstance->__toString() . ' - FINISH');
+ //* NOISY-DEBUG: */ $this->debugOutput('VISITOR: Visiting ' . $listenerInstance->__toString() . ' - FINISH');
}
}
<cipher-name>{?cipher_name?}</cipher-name>
</cipher>
<!--
- Timestamp in the format YYYY-mm-dd HH:ii:ss when this test unit has been
+ Timestamp in the format YYYY-mm-dd HH:ii:ss when this work unit has been
created.
//-->
- <test-unit-created>{?test_unit_created</test-unit-created>
+ <work-unit-created>{?work_unit_created</work-unit-created>
<!--
The node's hub-id. This is required to verify the GPI.
//-->