application/hub/main/filter/.htaccess -text
application/hub/main/filter/activation/.htaccess -text
application/hub/main/filter/activation/class_HubActivation -text
+application/hub/main/filter/activation/class_HubActivationSelfAnnouncementFilter.php -text
application/hub/main/filter/bootstrap/.htaccess -text
application/hub/main/filter/bootstrap/class_HubBootstrap -text
application/hub/main/filter/bootstrap/class_HubBootstrapAquireHubIdFilter.php -text
application/hub/main/handler/network/udp/class_UdpNetworkPackageHandler.php -text
application/hub/main/handler/tasks/.htaccess -text
application/hub/main/handler/tasks/class_TaskHandler.php -text
+application/hub/main/helper/.htaccess -text
+application/hub/main/helper/hub/.htaccess -text
+application/hub/main/helper/hub/announcement/.htaccess -text
+application/hub/main/helper/hub/announcement/class_HubDescriptorHelper.php -text
+application/hub/main/helper/hub/class_ -text
+application/hub/main/helper/hub/class_BaseHubHelper.php -text
application/hub/main/iterator/.htaccess -text
application/hub/main/iterator/class_ -text
application/hub/main/iterator/class_BaseIterator.php -text
application/hub/main/tasks/class_ -text
application/hub/main/tasks/class_BaseTask.php -text
application/hub/main/tasks/hub/.htaccess -text
+application/hub/main/tasks/hub/announcement/.htaccess -text
+application/hub/main/tasks/hub/announcement/class_HubSelfAnnouncementTask.php -text
application/hub/main/tasks/hub/class_HubSelfConnectTask.php -text
application/hub/main/tasks/hub/ping/.htaccess -text
application/hub/main/tasks/hub/ping/class_HubPingTask.php -text
application/hub/main/visitor/tasks/.htaccess -text
application/hub/main/visitor/tasks/class_ActiveTaskVisitor.php -text
application/hub/starter.php -text
+application/hub/templates/.htaccess -text
+application/hub/templates/xml/.htaccess -text
+application/hub/templates/xml/.xml -text
+application/hub/templates/xml/announcement/.htaccess -text
+application/hub/templates/xml/announcement/self_announcement.xml -text
/clear-cache.sh -text
db/.htaccess -text
db/news/.htaccess -text
// CFG: LIST-GROUP-CLASS
$cfg->setConfigEntry('list_group_class', 'ListGroupList');
+// CFG: HUB-DESCRIPTOR-CLASS
+$cfg->setConfigEntry('hub_descriptor_class', 'HubDescriptorHelper');
+
// CFG: DEFAULT-CONSOLE-COMMAND
$cfg->setConfigEntry('default_console_command', 'main');
// CFG: HUB-ACTIVATION-TASK-HANDLER-INITIALIZER-FILTER
$cfg->setConfigEntry('hub_activation_task_handler_initializer_filter', 'TaskHandlerInitializerFilter');
+// CFG: HUB-ACTIVATION-SELF-ANNOUNCEMENT-TASK-FILTER
+$cfg->setConfigEntry('hub_activation_self_announcement_task_filter', 'HubActivationSelfAnnouncementFilter');
+
// CFG: CONSOLE-WELCOME-TEASER-FILTER
$cfg->setConfigEntry('console_welcome_teaser_filter', 'ConsoleWelcomeTeaserFilter');
// CFG: TASK-NETWORK-PACKAGE-READER-INTERVAL-DELAY
$cfg->setConfigEntry('task_network_package_reader_interval_delay', 10);
+// CFG: TASK-NETWORK-PACKAGE-READER-MAX-RUNS
+$cfg->setConfigEntry('task_network_package_reader_max_runs', 0);
+
// CFG: TASK-QUERY-HANDLER-STARTUP-DELAY
$cfg->setConfigEntry('task_query_handler_startup_delay', 1000);
// CFG: TASK-QUERY-HANDLER-INTERVAL-DELAY
$cfg->setConfigEntry('task_query_handler_interval_delay', 10);
+// CFG: TASK-QUERY-HANDLER-MAX-RUNS
+$cfg->setConfigEntry('task_query_handler_max_runs', 0);
+
// CFG: TASK-IDLE-LOOP-STARTUP-DELAY
$cfg->setConfigEntry('task_idle_loop_startup_delay', 0);
// CFG: TASK-IDLE-LOOP-INTERVAL-DELAY
$cfg->setConfigEntry('task_idle_loop_interval_delay', 0);
+// CFG: TASK-IDLE-LOOP-MAX-RUNS
+$cfg->setConfigEntry('task_idle_loop_max_runs', 0);
+
// CFG: TASK-SELF-CONNECT-STARTUP-DELAY
$cfg->setConfigEntry('task_self_connect_startup_delay', 4000);
// CFG: TASK-SELF-CONNECT-INTERVAL-DELAY
$cfg->setConfigEntry('task_self_connect_interval_delay', 1000*60*30);
+// CFG: TASK-SELF-CONNECT-MAX-RUNS
+$cfg->setConfigEntry('task_self_connect_max_runs', 0);
+
+// CFG: TASK-SELF-ANNOUNCEMENT-STARTUP-DELAY
+$cfg->setConfigEntry('task_self_announcement_startup_delay', 10000);
+
+// CFG: TASK-SELF-ANNOUNCEMENT-INTERVAL-DELAY
+$cfg->setConfigEntry('task_self_announcement_interval_delay', 1000);
+
+// CFG: TASK-SELF-ANNOUNCEMENT-MAX-RUNS
+$cfg->setConfigEntry('task_self_announcement_max_runs', 1);
+
// CFG: TASK-UPDATE-CHECK-STARTUP-DELAY
$cfg->setConfigEntry('task_update_check_startup_delay', 1000*60*60*6);
// CFG: TASK-UPDATE-CHECK-INTERVAL-DELAY
$cfg->setConfigEntry('task_update_check_interval_delay', 1000*60*60*24);
+// CFG: TASK-UPDATE-CHECK-MAX-RUNS
+$cfg->setConfigEntry('task_update_check_max_runs', 0);
+
// CFG: TASK-PING-STARTUP-DELAY
$cfg->setConfigEntry('task_ping_startup_delay', 1000*60);
// CFG: TASK-PING-INTERVAL-DELAY
$cfg->setConfigEntry('task_ping_interval_delay', 1000*60*60);
+// CFG: TASK-PING-MAX-RUNS
+$cfg->setConfigEntry('task_ping_max_runs', 0);
+
// CFG: IDLE-TASK-CLASS
$cfg->setConfigEntry('idle_task_class', 'IdleLoopTask');
// CFG: HUB-PING-TASK-CLASS
$cfg->setConfigEntry('hub_ping_task_class', 'HubPingTask');
+// CFG: HUB-SELF-ANNOUNCEMENT-TASK-CLASS
+$cfg->setConfigEntry('hub_self_announcement_task_class', 'HubSelfAnnouncementTask');
+
// CFG: TASK-LIST-CLASS
$cfg->setConfigEntry('task_list_class', 'TaskList');
*/
function activateHub (Requestable $requestInstance, Responseable $responseInstance);
- /**
- * Adds some node-specific filters to the filter chains
- *
- * @param $requestInstance A Requestable class
- * @param $responseInstance A Responseable class
- * @return void
- */
- function addExtraFilters (Requestable $requestInstance, Responseable $responseInstance);
-
/**
* Generates a session id which will be sent to the other hubs and clients
*
* @return void
*/
function bootstrapRestoreNodeList ();
+
+ /**
+ * Add some node-specific filters
+ *
+ * @return void
+ */
+ function addExtraHubFilters ();
}
//
// Get node instance
$nodeInstance = Registry::getRegistry()->getInstance('node');
+ // Add some node-specific filters, e.g. self-announcement
+ $nodeInstance->addExtraHubFilters();
+
// -------------------------- Hub activation --------------------------
// Activates the hub by doing some final preparation steps and setting
// the attribute $hubIsActive to true
--- /dev/null
+<?php
+/**
+ * A SelfAnnouncement filter for hub activation
+ *
+ * @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 HubActivationSelfAnnouncementFilter extends BaseFilter implements Filterable {
+ /**
+ * Protected constructor
+ *
+ * @return void
+ */
+ protected function __construct () {
+ // Call parent constructor
+ parent::__construct(__CLASS__);
+ }
+
+ /**
+ * Creates an instance of this filter class
+ *
+ * @return $filterInstance An instance of this filter class
+ */
+ public final static function createHubActivationSelfAnnouncementFilter () {
+ // Get a new instance
+ $filterInstance = new HubActivationSelfAnnouncementFilter();
+
+ // Return the instance
+ return $filterInstance;
+ }
+
+ /**
+ * Executes the filter with given request and response objects
+ *
+ * @param $requestInstance An instance of a class with an Requestable interface
+ * @param $responseInstance An instance of a class with an Responseable interface
+ * @return void
+ * @todo 0% done
+ */
+ public function execute (Requestable $requestInstance, Responseable $responseInstance) {
+ // Get task handler instance
+ $handlerInstance = Registry::getRegistry()->getInstance('task');
+
+ // Prepare a self-test task for the listeners
+ $taskInstance = ObjectFactory::createObjectByConfiguredName('hub_self_announcement_task_class');
+
+ // Register it
+ $handlerInstance->registerTask('self_announcement', $taskInstance);
+ }
+}
+
+// [EOF]
+?>
$diff = ($this->getMilliTime() - $currentTask['task_last_activity']) * 1000;
// Is the interval delay reached?
- if ($diff < $currentTask['task_interval_delay']) {
+ if ((($diff < $currentTask['task_interval_delay']) && ($currentTask['task_max_runs'] == 0)) || (($currentTask['task_total_runs'] == $currentTask['task_max_runs']) && ($currentTask['task_max_runs'] > 0))) {
// Should we update the task from startup?
if ($updateTask === true) {
// Update the task before leaving
// Set last activity
$currentTask['task_last_activity'] = $this->getMilliTime();
+ // Count this run
+ $currentTask['task_total_runs']++;
+
// Update the task
$this->updateTask($currentTask);
'task_registered' => $this->getMilliTime(),
// Last activity timestamp
'task_last_activity' => 0,
+ // Total runs of this task
+ 'task_total_runs' => 0,
// Task instance itself
'task_instance' => $taskInstance,
// Startup delay in milliseconds
'task_startup_delay' => $this->getConfigInstance()->getConfigEntry('task_' . $taskName . '_startup_delay'),
// Interval time (delay) in milliseconds before this task is executed again
'task_interval_delay' => $this->getConfigInstance()->getConfigEntry('task_' . $taskName . '_interval_delay'),
+ // How often should this task run?
+ 'task_max_runs' => $this->getConfigInstance()->getConfigEntry('task_' . $taskName . '_max_runs'),
);
// Add the entry
$this->debugOutput('TASK-HANDLER: Task ' . $taskName .
' (taskInstance=' . $taskInstance->__toString() . ')' .
', startupDelay=' . $taskEntry['task_startup_delay'] . 'ms' .
- ', intervalDelay=' . $taskEntry['task_interval_delay'] . 'ms registered.'
+ ', intervalDelay=' . $taskEntry['task_interval_delay'] . 'ms' .
+ ', maxRuns=' . $taskEntry['task_max_runs'] . ' times registered.'
);
}
--- /dev/null
+Deny from all
--- /dev/null
+Deny from all
--- /dev/null
+Deny from all
--- /dev/null
+<?php
+/**
+ * A Descriptor hub helper class
+ *
+ * @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/>.
+ */
+class HubDescriptorHelper extends BaseHubHelper {
+ /**
+ * Protected constructor
+ *
+ * @return void
+ */
+ protected function __construct () {
+ // Call parent constructor
+ parent::__construct(__CLASS__);
+ }
+
+ /**
+ * Creates the helper class
+ *
+ * @param $nodeInstance An instance of a NodeHelper class
+ * @return $helperInstance A prepared instance of this helper
+ */
+ public final static function createHubDescriptorHelper (NodeHelper $nodeInstance) {
+ // Get new instance
+ $helperInstance = new HubDescriptorHelper();
+
+ // Set the node instance
+ $helperInstance->setNodeInstance($nodeInstance);
+
+ // Return the prepared instance
+ return $helperInstance;
+ }
+}
+
+// [EOF]
+?>
--- /dev/null
+<?php
+/**
+ * A ??? hub helper class
+ *
+ * @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/>.
+ */
+class Hub???Helper extends BaseHubHelper {
+ /**
+ * Protected constructor
+ *
+ * @return void
+ */
+ protected function __construct () {
+ // Call parent constructor
+ parent::__construct(__CLASS__);
+ }
+
+ /**
+ * Creates the helper class
+ *
+ * @return $helperInstance A prepared instance of this helper
+ */
+ public final static function createHub???Helper () {
+ // Get new instance
+ $helperInstance = new Hub???Helper();
+
+ // Return the prepared instance
+ return $helperInstance;
+ }
+}
+
+// [EOF]
+?>
--- /dev/null
+<?php
+/**
+ * A general hub helper class
+ *
+ * @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/>.
+ */
+class BaseHubHelper extends BaseHelper {
+ /**
+ * An instance of a node
+ */
+ private $nodeInstance = null;
+
+ /**
+ * Protected constructor
+ *
+ * @param $className Name of the concrete class
+ * @return void
+ */
+ protected function __construct ($className) {
+ // Call parent constructor
+ parent::__construct($className);
+ }
+
+ /**
+ * Setter for node instance
+ *
+ * @param $nodeInstance An instance of a node node
+ * @return void
+ */
+ protected final function setNodeInstance (NodeHelper $nodeInstance) {
+ $this->nodeInstance = $nodeInstance;
+ }
+
+ /**
+ * Getter for node instance
+ *
+ * @return $nodeInstance An instance of a node node
+ */
+ public final function getNodeInstance () {
+ return $this->nodeInstance;
+ }
+}
+
+// [EOF]
+?>
}
/**
- * Adds some node-specific filters to the filter chains
+ * Add some node-specific filters
*
- * @param $requestInstance A Requestable class
- * @param $responseInstance A Responseable class
* @return void
- * @todo 0%
*/
- public function addExtraFilters (Requestable $requestInstance, Responseable $responseInstance) {
- $this->partialStub('Please implement this method.');
+ public function addExtraHubFilters () {
+ // Get the application instance from registry
+ $applicationInstance = Registry::getRegistry()->getInstance('app');
+
+ // Get the controller from the application
+ $controllerInstance = $applicationInstance->getControllerInstance();
+
+ // @TODO Add some filters here
+ $this->partialStub('Add some filters here.');
}
}
}
/**
- * Adds some node-specific filters to the filter chains
+ * Add some node-specific filters
*
- * @param $requestInstance A Requestable class
- * @param $responseInstance A Responseable class
* @return void
- * @todo 0%
*/
- public function addExtraFilters (Requestable $requestInstance, Responseable $responseInstance) {
- $this->partialStub('Please implement this method.');
+ public function addExtraHubFilters () {
+ // Add some filters here
}
}
$this->debugOutput('BOOTSTRAP: Initialize queues: FINISHED');
}
- /**
- * Publish our hub descriptor to the upper hub(s)
- *
- * @return void
- * @todo This should be implemented in a generic way to keep things easy.
- */
- protected function publishHubDescriptor () {
- $this->partialStub('Unfinished method.');
- }
-
/**
* Adds hub data elements to a given dataset instance
*
* @todo Implement more bootstrap steps
*/
public function doBootstrapping () {
- // Do more here
- $this->partialStub('Do something before hub descriptor is published.');
-
- // Publish the descriptor of this hub, this will "announce" us to upper hubs
- $this->publishHubDescriptor();
-
- // Do more here
- $this->partialStub('Do something after hub descriptor is published.');
+ $this->partialStub();
}
/**
}
/**
- * Adds some node-specific filters to the filter chains
+ * Add some node-specific filters
*
- * @param $requestInstance A Requestable class
- * @param $responseInstance A Responseable class
* @return void
- * @todo 0%
*/
- public function addExtraFilters (Requestable $requestInstance, Responseable $responseInstance) {
- $this->partialStub('Please implement this method.');
+ public function addExtraHubFilters () {
+ // Get the application instance from registry
+ $applicationInstance = Registry::getRegistry()->getInstance('app');
+
+ // Get the controller from the application
+ $controllerInstance = $applicationInstance->getControllerInstance();
+
+ // Self-announcement task
+ $controllerInstance->addActivationFilter(ObjectFactory::createObjectByConfiguredName('hub_activation_self_announcement_task_filter'));
+
+ // @TODO Add some filters here
+ $this->partialStub('Add some filters here.');
}
}
* @todo Implement this method
*/
public function doBootstrapping () {
- // Do more here
- $this->partialStub('Do something before hub descriptor is published.');
-
- // Publish the descriptor of this hub, this will "announce" us to upper hubs
- $this->publishHubDescriptor();
-
- // Do more here
- $this->partialStub('Do something after hub descriptor is published.');
+ $this->partialStub();
}
/**
}
/**
- * Adds some node-specific filters to the filter chains
+ * Add some node-specific filters
*
- * @param $requestInstance A Requestable class
- * @param $responseInstance A Responseable class
* @return void
- * @todo 0%
*/
- public function addExtraFilters (Requestable $requestInstance, Responseable $responseInstance) {
- $this->partialStub('Please implement this method.');
+ public function addExtraHubFilters () {
+ // Get the application instance from registry
+ $applicationInstance = Registry::getRegistry()->getInstance('app');
+
+ // Get the controller from the application
+ $controllerInstance = $applicationInstance->getControllerInstance();
+
+ // Self-announcement task
+ $controllerInstance->addActivationFilter(ObjectFactory::createObjectByConfiguredName('hub_activation_self_announcement_task_filter'));
+
+ // @TODO Add some filters here
+ $this->partialStub('Add some filters here.');
}
}
* @todo Implement this method
*/
public function doBootstrapping () {
- // Do more here
- $this->partialStub('Do something before hub descriptor is published.');
-
- // Publish the descriptor of this hub, this will "announce" us to upper hubs
- $this->publishHubDescriptor();
-
- // Do more here
- $this->partialStub('Do something after hub descriptor is published.');
+ $this->partialStub();
}
/**
}
/**
- * Adds some node-specific filters to the filter chains
+ * Add some node-specific filters
*
- * @param $requestInstance A Requestable class
- * @param $responseInstance A Responseable class
* @return void
- * @todo 0%
*/
- public function addExtraFilters (Requestable $requestInstance, Responseable $responseInstance) {
- $this->partialStub('Please implement this method.');
+ public function addExtraHubFilters () {
+ // Get the application instance from registry
+ $applicationInstance = Registry::getRegistry()->getInstance('app');
+
+ // Get the controller from the application
+ $controllerInstance = $applicationInstance->getControllerInstance();
+
+ // Self-announcement task
+ $controllerInstance->addActivationFilter(ObjectFactory::createObjectByConfiguredName('hub_activation_self_announcement_task_filter'));
+
+ // @TODO Add some filters here
+ $this->partialStub('Add some filters here.');
}
}
--- /dev/null
+Deny from all
--- /dev/null
+<?php
+/**
+ * A HubSelfAnnouncement task
+ *
+ * @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 HubSelfAnnouncementTask 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 createHubSelfAnnouncementTask () {
+ // Get new instance
+ $taskInstance = new HubSelfAnnouncementTask();
+
+ // Return the prepared instance
+ return $taskInstance;
+ }
+
+ /**
+ * Accepts the visitor to rpocess the visit "request"
+ *
+ * @param $visitorInstance An instance of a Visitor class
+ * @return void
+ * @todo 0%
+ */
+ public function accept (Visitor $visitorInstance) {
+ // Visit this task
+ $visitorInstance->visitTask($this);
+ }
+
+ /**
+ * Executes the task
+ *
+ * @return void
+ */
+ public function execute () {
+ $this->partialStub('Unimplemented task.');
+ }
+}
+
+// [EOF]
+?>
--- /dev/null
+Deny from all
--- /dev/null
+Deny from all
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+
+
+@author Roland Haeder <webmaster@ship-simu.org>
+@version 0.0.0
+@copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 Ship-Simu 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/>
+//-->
--- /dev/null
+Deny from all
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+A template for announcing itself to upper hubs.
+
+@author Roland Haeder <webmaster@ship-simu.org>
+@version 0.0.0
+@copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 Ship-Simu 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/>
+//-->
+<announcement>
+ <!-- Announcement data like, node id, session id and object types. //-->
+ <annoucement-data>
+ <!-- Our node id. This should be announced only to upper hubs. //-->
+ <node-id>{?node_id?}</node-id>
+ <!-- The session id. This should be announced to all other hubs. //-->
+ <session-id>{?session_id?}</session-id>
+ <!-- A list of shared object types. //-->
+ <object-type-list>
+ <object-type type="{?object_type?}" />
+ </object-type-list>
+ </annoucement-data>
+</announcement>