3 * Configuration entries for the hub only
5 * @author Roland Haeder <webmaster@ship-simu.org>
7 * @copyright Copyright (c) 2007 - 2008 Roland Haeder, 2009, 2010 Hub Developer Team
8 * @license GNU GPL 3.0 or any newer version
10 * This program is free software: you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation, either version 3 of the License, or
13 * (at your option) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with this program. If not, see <http://www.gnu.org/licenses/>.
24 // Some hub-specific configuration like port hostname where we will listen, etc.
25 $cfg = FrameworkConfiguration::getInstance();
27 // CFG: NODE-LISTEN-ADDR
28 $cfg->setConfigEntry('node_listen_addr', '0.0.0.0');
30 // CFG: NODE-TCP-LISTEN-PORT
31 $cfg->setConfigEntry('node_tcp_listen_port', 9060);
33 // CFG: NODE-UDP-LISTEN-PORT
34 $cfg->setConfigEntry('node_udp_listen_port', 9060);
36 // CFG: NODE-MODE (can be 'regular', 'list', 'master' or 'boot', default is 'regular')
37 $cfg->setConfigEntry('node_mode', 'regular');
39 // CFG: TEMPLATE-ENGINE
40 $cfg->setConfigEntry('tpl_engine', 'ConsoleOutput');
43 $cfg->setConfigEntry('output_class', 'DebugConsoleOutput');
46 $cfg->setConfigEntry('debug_class', 'DebugConsoleOutput');
48 // CFG: NODE-INFO-DB-WRAPPER-CLASS
49 $cfg->setConfigEntry('node_info_db_wrapper_class', 'NodeInformationDatabaseWrapper');
51 // CFG: NODE-LIST-DB-WRAPPER-CLASS
52 $cfg->setConfigEntry('node_list_db_wrapper_class', 'NodeListDatabaseWrapper');
54 // CFG: PEER-LOOKUP-DB-WRAPPER-CLASS
55 $cfg->setConfigEntry('peer_state_lookup_db_wrapper_class', 'PeerStateLookupDatabaseWrapper');
57 // CFG: WEB-CONTENT-TYPE
58 $cfg->setConfigEntry('web_content_type', '');
60 // CFG: QUERY-CONNECTOR-CLASS
61 $cfg->setConfigEntry('query_connector_class', 'LocalQueryConnector');
63 // CFG: QUEUE-CONNECTOR-CLASS
64 $cfg->setConfigEntry('queue_connector_class', 'LocalQueueConnector');
66 // CFG: LISTENER-POOL-CLAS
67 $cfg->setConfigEntry('listener_pool_class', 'DefaultListenerPool');
69 // CFG: TCP-LISTENER-CLASS
70 $cfg->setConfigEntry('tcp_listener_class', 'TcpListener');
72 // CFG: UDP-LISTENER-CLASS
73 $cfg->setConfigEntry('udp_listener_class', 'UdpListener');
75 // CFG: HUB-TCP-LISTENER-CLASS
76 $cfg->setConfigEntry('hub_tcp_listener_class', 'HubTcpListenerDecorator');
78 // CFG: HUB-UDP-LISTENER-CLASS
79 $cfg->setConfigEntry('hub_udp_listener_class', 'HubUdpListenerDecorator');
81 // CFG: CLIENT-TCP-LISTENER-CLASS
82 $cfg->setConfigEntry('peer_tcp_listener_class', 'PeerTcpListenerDecorator');
84 // CFG: CLIENT-UDP-LISTENER-CLASS
85 $cfg->setConfigEntry('peer_udp_listener_class', 'PeerUdpListenerDecorator');
87 // CFG: CLIENT-POOL-CLASS
88 $cfg->setConfigEntry('peer_pool_class', 'DefaultPeerPool');
90 // CFG: POOL-ENTRIES-LIST-CLASS
91 $cfg->setConfigEntry('pool_entries_list_class', 'PoolEntriesList');
93 // CFG: SHUTDOWN-POOL-ITERATOR-CLASS
94 $cfg->setConfigEntry('shutdown_pool_iterator_class', 'ShutdownPoolIterator');
96 // CFG: HANDLER-POOL-ITERATOR-CLASS
97 $cfg->setConfigEntry('handler_pool_iterator_class', 'HandlerPoolIterator');
99 // CFG: NETWORK-LISTEN-ITERATOR-CLASS
100 $cfg->setConfigEntry('network_listen_iterator_class', 'NetworkListenIterator');
102 // CFG: NETWORK-PACKAGE-HANDLER-CLASS
103 $cfg->setConfigEntry('tcp_network_package_handler_class', 'TcpNetworkPackageHandler');
105 // CFG: SHUTDOWN-LISTENER-POOL-VISITOR-CLASS
106 $cfg->setConfigEntry('shutdown_listener_pool_visitor_class', 'ShutdownListenerPoolVisitor');
108 // CFG: SHUTDOWN-TASK-VISITOR-CLASS
109 $cfg->setConfigEntry('shutdown_task_visitor_class', 'ShutdownTaskVisitor');
111 // CFG: SHUTDOWN-SOCKET-VISITOR-CLASS
112 $cfg->setConfigEntry('shutdown_socket_visitor_class', 'ShutdownSocketVisitor');
114 // CFG: ACTIVE-TASK-VISITOR-CLASS
115 $cfg->setConfigEntry('active_task_visitor_class', 'ActiveTaskVisitor');
117 // CFG: LIST-GROUP-CLASS
118 $cfg->setConfigEntry('list_group_class', 'ListGroupList');
120 // CFG: HUB-ANNOUNCEMENT-HELPER-CLASS
121 $cfg->setConfigEntry('hub_announcement_helper_class', 'HubDescriptorHelper');
123 // CFG: HUB-SELF-CONNECT-HELPER-CLASS
124 $cfg->setConfigEntry('hub_self_connect_helper_class', 'HubSelfConnectHelper');
126 // CFG: DEFAULT-CONSOLE-COMMAND
127 $cfg->setConfigEntry('default_console_command', 'main');
129 // CFG: DEFAULT-HUBCONSOLE-COMMAND
130 $cfg->setConfigEntry('default_hubconsole_command', 'main');
132 // CFG: HUBCONSOLE-CMD-MAIN-RESOLVER-CLASS
133 $cfg->setConfigEntry('hubconsole_cmd_main_resolver_class', 'HubConsoleCommandResolver');
135 // CFG: NETWORK-STATE-RESOLVER-CLASS
136 $cfg->setConfigEntry('network_state_resolver_class', 'NetworkStateResolver');
138 // CFG: NEWS-DOWNLOAD-FILTER
139 $cfg->setConfigEntry('news_download_filter', 'NewsDownloadFilter');
141 // CFG: NEWS-PROCESS-FILTER
142 $cfg->setConfigEntry('news_process_filter', 'NewsProcessFilter');
144 // CFG: NODE-PHP-REQUIREMENTS-FILTER
145 $cfg->setConfigEntry('node_php_requirements_filter', 'NodePhpRequirementsFilter');
147 // CFG: NODE-INITIALIZER-FILTER
148 $cfg->setConfigEntry('node_initializer_filter', 'NodeInitializationFilter');
150 // CFG: HUB-ACTIVATION-TASK-HANDLER-INITIALIZER-FILTER
151 $cfg->setConfigEntry('hub_activation_task_handler_initializer_filter', 'TaskHandlerInitializerFilter');
153 // CFG: HUB-ACTIVATION-SELF-ANNOUNCEMENT-TASK-FILTER
154 $cfg->setConfigEntry('hub_activation_self_announcement_task_filter', 'HubActivationSelfAnnouncementFilter');
156 // CFG: CONSOLE-WELCOME-TEASER-FILTER
157 $cfg->setConfigEntry('console_welcome_teaser_filter', 'ConsoleWelcomeTeaserFilter');
159 // CFG: HUB-BOOTSTRAP-GENERATE-HUBID-FILTER
160 $cfg->setConfigEntry('hub_bootstrap_generate_hubid_filter', 'HubBootstrapGenerateHubIdFilter');
162 // CFG: HUB-BOOTSTRAP-GENERATE-SESSIONID-FILTER
163 $cfg->setConfigEntry('hub_bootstrap_generate_sessionid_filter', 'HubBootstrapGenerateSessionIdFilter');
165 // CFG: HUB-BOOTSTRAP-RESTORE-NODELIST-FILTER
166 $cfg->setConfigEntry('hub_bootstrap_restore_nodelist_filter', 'HubBootstrapRestoreNodeListFilter');
168 // CFG: HUB-BOOTSTRAP-INIT-QUEUES-FILTER
169 $cfg->setConfigEntry('hub_bootstrap_init_queues_filter', 'HubBootstrapInitQueuesFilter');
171 // CFG: HUB-BOOTSTRAP-EXTRA-BOOTSTRAP-FILTER
172 $cfg->setConfigEntry('hub_bootstrap_extra_bootstrap_filter', 'HubBootstrapExtraBootstrappingFilter');
174 // CFG: HUB-BOOTSTRAP-LISTENER-POOL-FILTER
175 $cfg->setConfigEntry('hub_bootstrap_listener_pool_filter', 'HubBootstrapListenerPoolFilter');
177 // CFG: HUB-SHUTDOWN-FLUSH-NODE-LIST-FILTER
178 $cfg->setConfigEntry('hub_shutdown_flush_node_list_filter', 'HubShutdownFlushNodeListFilter');
180 // CFG: HUB-SHUTDOWN-DEINIT-QUEUES-FILTER
181 $cfg->setConfigEntry('hub_shutdown_deinit_queues_filter', 'HubShutdownDeinitQueuesFilter');
183 // CFG: HUB-SHUTDOWN-TASK-HANDLER-FILTER
184 $cfg->setConfigEntry('hub_shutdown_task_handler_filter', 'HubShutdownTaskHandlerFilter');
186 // CFG: HUB-SHUTDOWN-NODE-FILTER
187 $cfg->setConfigEntry('hub_shutdown_node_filter', 'HubShutdownNodeFilter');
189 // CFG: NEWS-READER-CLASS
190 $cfg->setConfigEntry('news_reader_class', 'ConsoleNewsReader');
192 // CFG: ANNOUNCEMENT-TEMPLATE-CLASS
193 $cfg->setConfigEntry('announcement_template_class', 'AnnouncementTemplateEngine');
195 // CFG: ANNOUNCEMENT-TEMPLATE-EXTENSION
196 $cfg->setConfigEntry('announcement_template_extension', '.xml');
198 // CFG: ANNOUNCEMENT-TEMPLATE-TYPE
199 $cfg->setConfigEntry('announcement_template_type', 'xml/announcement');
201 // CFG: ANNOUNCEMENT-STACKER-CLASS
202 $cfg->setConfigEntry('announcement_stacker_class', 'FiLoStacker');
204 // CFG: OBJECT-REGISTRY-TEMPLATE-CLASS
205 $cfg->setConfigEntry('object_registry_template_class', 'ObjectRegistryTemplateEngine');
207 // CFG: OBJECT-REGISTRY-TEMPLATE-EXTENSION
208 $cfg->setConfigEntry('object_registry_template_extension', '.xml');
210 // CFG: OBJECT-REGISTRY-TEMPLATE-TYPE
211 $cfg->setConfigEntry('object_registry_template_type', 'xml/object_registry');
213 // CFG: OBJECT-REGISTRY-STACKER-CLASS
214 $cfg->setConfigEntry('object_registry_stacker_class', 'FiLoStacker');
216 // CFG: OBJECT-TYPE-REGISTRY-CLASS
217 $cfg->setConfigEntry('object_type_registry_class', 'ObjectTypeRegistry');
219 // CFG: CODE-TEMPLATE-TYPE
220 $cfg->setConfigEntry('code_template_type', 'xml/announcement');
222 // CFG: PACKAGE-STACKER-CLASS
223 $cfg->setConfigEntry('package_stacker_class', 'FiFoStacker');
225 // CFG: STACKER-ANNOUNCEMENT-MAX-SIZE
226 $cfg->setConfigEntry('stacker_announcement_max_size', 20);
228 // CFG: STACKER-UNDECLARED-MAX-SIZE
229 $cfg->setConfigEntry('stacker_undeclared_max_size', 10000);
231 // CFG: STACKER-DECLARED-MAX-SIZE
232 $cfg->setConfigEntry('stacker_declared_max_size', 1000);
234 // CFG: STACKER-OUTGOING-MAX-SIZE
235 $cfg->setConfigEntry('stacker_outgoing_max_size', 100);
237 // CFG: STACKER-OBJECT-REGISTRY-MAX-SIZE
238 $cfg->setConfigEntry('stacker_object_registry_max_size', 100);
240 // CFG: NEWS-MAIN-LIMIT
241 $cfg->setConfigEntry('news_main_limit', 5);
243 // CFG: TASK-HANDLER-CLASS
244 $cfg->setConfigEntry('task_handler_class', 'TaskHandler');
246 // CFG: TASK-NETWORK-PACKAGE-READER-STARTUP-DELAY
247 $cfg->setConfigEntry('task_network_package_reader_startup_delay', 2000);
249 // CFG: TASK-NETWORK-PACKAGE-READER-INTERVAL-DELAY
250 $cfg->setConfigEntry('task_network_package_reader_interval_delay', 10);
252 // CFG: TASK-NETWORK-PACKAGE-READER-MAX-RUNS
253 $cfg->setConfigEntry('task_network_package_reader_max_runs', 0);
255 // CFG: TASK-QUERY-HANDLER-STARTUP-DELAY
256 $cfg->setConfigEntry('task_query_handler_startup_delay', 1000);
258 // CFG: TASK-QUERY-HANDLER-INTERVAL-DELAY
259 $cfg->setConfigEntry('task_query_handler_interval_delay', 10);
261 // CFG: TASK-QUERY-HANDLER-MAX-RUNS
262 $cfg->setConfigEntry('task_query_handler_max_runs', 0);
264 // CFG: TASK-IDLE-LOOP-STARTUP-DELAY
265 $cfg->setConfigEntry('task_idle_loop_startup_delay', 0);
267 // CFG: TASK-IDLE-LOOP-INTERVAL-DELAY
268 $cfg->setConfigEntry('task_idle_loop_interval_delay', 0);
270 // CFG: TASK-IDLE-LOOP-MAX-RUNS
271 $cfg->setConfigEntry('task_idle_loop_max_runs', 0);
273 // CFG: TASK-SELF-CONNECT-STARTUP-DELAY
274 $cfg->setConfigEntry('task_self_connect_startup_delay', 4000);
276 // CFG: TASK-SELF-CONNECT-INTERVAL-DELAY
277 $cfg->setConfigEntry('task_self_connect_interval_delay', 1000*60*30);
279 // CFG: TASK-SELF-CONNECT-MAX-RUNS
280 $cfg->setConfigEntry('task_self_connect_max_runs', 0);
282 // CFG: TASK-SELF-ANNOUNCEMENT-STARTUP-DELAY
283 $cfg->setConfigEntry('task_self_announcement_startup_delay', 10000);
285 // CFG: TASK-SELF-ANNOUNCEMENT-INTERVAL-DELAY
286 $cfg->setConfigEntry('task_self_announcement_interval_delay', 1000);
288 // CFG: TASK-SELF-ANNOUNCEMENT-MAX-RUNS
289 $cfg->setConfigEntry('task_self_announcement_max_runs', 1);
291 // CFG: TASK-UPDATE-CHECK-STARTUP-DELAY
292 $cfg->setConfigEntry('task_update_check_startup_delay', 1000*60*60*6);
294 // CFG: TASK-UPDATE-CHECK-INTERVAL-DELAY
295 $cfg->setConfigEntry('task_update_check_interval_delay', 1000*60*60*24);
297 // CFG: TASK-UPDATE-CHECK-MAX-RUNS
298 $cfg->setConfigEntry('task_update_check_max_runs', 0);
300 // CFG: TASK-PING-STARTUP-DELAY
301 $cfg->setConfigEntry('task_ping_startup_delay', 1000*60);
303 // CFG: TASK-PING-INTERVAL-DELAY
304 $cfg->setConfigEntry('task_ping_interval_delay', 1000*60*60);
306 // CFG: TASK-PING-MAX-RUNS
307 $cfg->setConfigEntry('task_ping_max_runs', 0);
309 // CFG: IDLE-TASK-CLASS
310 $cfg->setConfigEntry('idle_task_class', 'IdleLoopTask');
312 // CFG: HUB-SELFCONNECT-TASK-CLASS
313 $cfg->setConfigEntry('hub_selfconnect_task_class', 'HubSelfConnectTask');
315 // CFG: HUB-UPDATE-CHECK-TASK-CLASS
316 $cfg->setConfigEntry('hub_update_check_task_class', 'HubUpdateCheckTask');
318 // CFG: HUB-PING-TASK-CLASS
319 $cfg->setConfigEntry('hub_ping_task_class', 'HubPingTask');
321 // CFG: HUB-SELF-ANNOUNCEMENT-TASK-CLASS
322 $cfg->setConfigEntry('hub_self_announcement_task_class', 'HubSelfAnnouncementTask');
324 // CFG: HUB-PACKAGE-WRITER-TASK-CLASS
325 $cfg->setConfigEntry('hub_package_writer_task_class', 'NetworkPackageWriterTask');
327 // CFG: TASK-NETWORK-PACKAGE-WRITER-STARTUP-DELAY
328 $cfg->setConfigEntry('task_network_package_writer_startup_delay', 2500);
330 // CFG: TASK-NETWORK-PACKAGE-WRITER-INTERVAL-DELAY
331 $cfg->setConfigEntry('task_network_package_writer_interval_delay', 10);
333 // CFG: TASK-NETWORK-PACKAGE-WRITER-MAX-RUNS
334 $cfg->setConfigEntry('task_network_package_writer_max_runs', 0);
336 // CFG: TASK-LIST-CLASS
337 $cfg->setConfigEntry('task_list_class', 'TaskList');
339 // CFG: TASK-POOL-ITERATOR-CLASS
340 $cfg->setConfigEntry('task_pool_iterator_class', 'TaskPoolIterator');
342 // CFG: DEFAULT-ITERATOR-CLASS
343 $cfg->setConfigEntry('default_iterator_class', 'DefaultIterator');
345 // CFG: QUERY-ITERATOR-CLASS
346 $cfg->setConfigEntry('query_iterator_class', 'DefaultIterator');
348 // CFG: HUB-PING-ITERATOR-CLASS
349 $cfg->setConfigEntry('hub_ping_iterator_class', 'HubPingIterator');
351 // CFG: LOCAL-QUERY-LIST-CLASS
352 $cfg->setConfigEntry('local_query_list_class', 'LocalQueryList');
354 // CFG: LOCAL-QUERY-CLASS
355 $cfg->setConfigEntry('local_query_class', 'LocalQuery');
357 // CFG: WEB-TEMPLATE-CLASS @OVERRIDE
358 $cfg->setConfigEntry('web_template_class', 'ConsoleTemplateEngine');
360 // CFG: NODE-INIT-STATE-CLASS
361 $cfg->setConfigEntry('node_init_state_class', 'NodeInitState');
363 // CFG: NODE-VIRGIN-STATE-CLASS
364 $cfg->setConfigEntry('node_virgin_state_class', 'NodeVirginState');
366 // CFG: NODE-ACTIVE-STATE-CLASS
367 $cfg->setConfigEntry('node_active_state_class', 'NodeActiveState');
369 // CFG: NODE-ANNOUNCED-STATE-CLASS
370 $cfg->setConfigEntry('node_announced_state_class', 'NodeAnnouncedState');
372 // CFG: NETWORK-PACKAGE-CLASS
373 $cfg->setConfigEntry('network_package_class', 'NetworkPackage');
375 // CFG: PACKAGE-COMPRESSOR-CLASS
376 $cfg->setConfigEntry('deco_package_compressor_class', 'NetworkPackageCompressorDecorator');
378 // CFG: RAW-PACKAGE-COMPRESSOR-CLASS
379 $cfg->setConfigEntry('raw_package_compressor_class', 'GzipCompressor');
381 // CFG: SOCKET-REGISTRY-CLASS
382 $cfg->setConfigEntry('socket_registry_class', 'SocketRegistry');
384 // CFG: SOCKET-CONTAINER-CLASS
385 $cfg->setConfigEntry('socket_container_class', 'SocketContainer');
387 // CFG: PACKAGE-RECIPIENT-DISCOVERY
388 $cfg->setConfigEntry('package_recipient_discovery_class', 'PackageRecipientDiscovery');
390 // CFG: SOCKET-DISCOVERY
391 $cfg->setConfigEntry('socket_discovery_class', 'PackageSocketDiscovery');
393 // CFG: RECIPIENT-LIST-CLASS
394 $cfg->setConfigEntry('recipient_list_class', 'RecipientList');
396 // CFG: PACKAGE-TAGS-CLASS
397 $cfg->setConfigEntry('package_tags_class', 'PackageTags');
399 // CFG: TCP-CONNECTION-CLASS
400 $cfg->setConfigEntry('tcp_connection_class', 'TcpConnectionHelper');
402 // CFG: UDP-CONNECTION-CLASS
403 $cfg->setConfigEntry('udp_connection_class', 'UdpConnectionHelper');
405 // CFG: TCP-BUFFER-LENGTH
406 $cfg->setConfigEntry('tcp_buffer_length', 1024);
408 // CFG: UDP-BUFFER-LENGTH
409 $cfg->setConfigEntry('udp_buffer_length', 1024);
411 // CFG: TCP-CONNECT-RETRY-MAX
412 $cfg->setConfigEntry('tcp_connect_retry_max', 10);
414 // CFG: UDP-CONNECT-RETRY-MAX
415 $cfg->setConfigEntry('udp_connect_retry_max', 10);
417 // CFG: PEER-STATE-LOOKUP-TABLE-CLASS
418 $cfg->setConfigEntry('peer_state_lookup_table_class', 'PeerStateLookupTable');
420 // CFG: PEER-STATE-CHECKED-PACKAGE-CLASS
421 $cfg->setConfigEntry('peer_state_checked_package_class', 'NewConnectionPeerState');