]> git.mxchange.org Git - hub.git/commitdiff
Merge branch 'master' into refacuring/protocol_handler
authorRoland Haeder <roland@mxchange.org>
Sun, 7 Dec 2014 22:30:22 +0000 (23:30 +0100)
committerRoland Haeder <roland@mxchange.org>
Sun, 7 Dec 2014 22:30:22 +0000 (23:30 +0100)
Signed-off-by: Roland Haeder <roland@mxchange.org>
Conflicts:
application/hub/config.php
application/hub/interfaces/resolver/.htaccess
application/hub/main/nodes/class_BaseHubNode.php
application/hub/main/resolver/protocol/class_BaseProtocolResolver.php
application/hub/main/source/urls/class_CrawlerUploadedListUrlSource.php

412 files changed:
application/hub/class_ApplicationHelper.php
application/hub/config-local.php-dist
application/hub/config.php
application/hub/data.php
application/hub/debug.php
application/hub/exceptions.php
application/hub/exceptions/announcement/class_AnnouncementNotAcceptedException.php
application/hub/exceptions/announcement/class_NoAnnouncementAttemptedException.php
application/hub/exceptions/connection/class_InvalidConnectionTypeException.php
application/hub/exceptions/dht/class_DhtBootstrapNotAcceptedException.php
application/hub/exceptions/dht/class_NoDhtBootstrapAttemptedException.php
application/hub/exceptions/factory/class_FactoryRequiredParameterException.php
application/hub/exceptions/ids/class_InvalidSessionIdException.php
application/hub/exceptions/lists/class_InvalidListHashException.php
application/hub/exceptions/lists/class_ListGroupAlreadyAddedException.php
application/hub/exceptions/lists/class_NoListGroupException.php
application/hub/exceptions/node/class_NodeAlreadyAnnouncedException.php
application/hub/exceptions/node/class_NodeSessionIdVerficationException.php
application/hub/exceptions/package/class_FinalChunkVerificationException.php
application/hub/exceptions/package/class_InvalidDataChecksumException.php
application/hub/exceptions/package/class_UnexpectedPackageStatusException.php
application/hub/exceptions/package/class_UnsupportedPackageCodeHandlerException.php
application/hub/exceptions/peer/class_PeerAlreadyRegisteredException.php
application/hub/exceptions/requests/class_NoRequestNodeListAttemptedException.php
application/hub/exceptions/requests/class_RequestNotAcceptedException.php
application/hub/exceptions/resolver/class_NoValidHostnameException.php
application/hub/exceptions/state/class_InvalidStateException.php
application/hub/exceptions/stream/class_MultipleMessageSentException.php
application/hub/exceptions/tags/class_InvalidTagException.php
application/hub/exceptions/tasks/class_InvalidTaskException.php
application/hub/exceptions/wrapper/class_NodeAlreadyRegisteredException.php
application/hub/exceptions/wrapper/class_NodeDataMissingException.php
application/hub/init.php
application/hub/interfaces/apt-proxy/class_AptProxy.php
application/hub/interfaces/consumer/class_Consumer.php
application/hub/interfaces/decoder/class_Decodeable.php
application/hub/interfaces/discovery/class_Discoverable.php
application/hub/interfaces/discovery/dht/.htaccess [deleted file]
application/hub/interfaces/discovery/dht/class_DiscoverableDhtRecipient.php [deleted file]
application/hub/interfaces/discovery/node/.htaccess [deleted file]
application/hub/interfaces/discovery/node/class_DiscoverableNodeRecipient.php [deleted file]
application/hub/interfaces/discovery/recipient/.htaccess [new file with mode: 0644]
application/hub/interfaces/discovery/recipient/class_DiscoverableRecipient.php [new file with mode: 0644]
application/hub/interfaces/discovery/recipient/dht/.htaccess [new file with mode: 0644]
application/hub/interfaces/discovery/recipient/dht/class_DiscoverableDhtRecipient.php [new file with mode: 0644]
application/hub/interfaces/discovery/recipient/node/.htaccess [new file with mode: 0644]
application/hub/interfaces/discovery/recipient/node/class_DiscoverableNodeRecipient.php [new file with mode: 0644]
application/hub/interfaces/discovery/recipient/socket/.htaccess [new file with mode: 0644]
application/hub/interfaces/discovery/recipient/socket/class_DiscoverableSocket.php [new file with mode: 0644]
application/hub/interfaces/discovery/socket/.htaccess [deleted file]
application/hub/interfaces/discovery/socket/class_DiscoverableSocket.php [deleted file]
application/hub/interfaces/discovery/unl/.htaccess [new file with mode: 0644]
application/hub/interfaces/discovery/unl/class_DiscoverableUniversalNodeLocator.php [new file with mode: 0644]
application/hub/interfaces/distributable/class_Distributable.php
application/hub/interfaces/distributable/node/class_DistributableNode.php
application/hub/interfaces/executor/class_Executor.php
application/hub/interfaces/filter/class_FilterablePackage.php
application/hub/interfaces/handler/answer-status/class_HandleableAnswerStatus.php
application/hub/interfaces/handler/chunks/class_HandleableChunks.php
application/hub/interfaces/handler/class_Handleable.php [deleted file]
application/hub/interfaces/handler/message-types/class_HandleableMessage.php
application/hub/interfaces/handler/network/class_Networkable.php
application/hub/interfaces/handler/task/class_HandleableTask.php
application/hub/interfaces/helper/connections/class_ConnectionHelper.php
application/hub/interfaces/helper/dht/class_HelpableDht.php
application/hub/interfaces/helper/hub/class_HubHelper.php [new file with mode: 0644]
application/hub/interfaces/helper/messages/class_MessageHelper.php
application/hub/interfaces/helper/node/class_HelpableNode.php
application/hub/interfaces/helper/nodes/class_NodeHelper.php
application/hub/interfaces/listener/class_Listenable.php
application/hub/interfaces/lists/class_Listable.php
application/hub/interfaces/locator/.htaccess [new file with mode: 0644]
application/hub/interfaces/locator/class_LocateableNode.php [new file with mode: 0644]
application/hub/interfaces/lookup/class_Lookupable.php
application/hub/interfaces/lookup/node_states/class_LookupableNodeState.php
application/hub/interfaces/lookup/peer_states/class_LookupablePeerState.php
application/hub/interfaces/package/assembler/class_Assembler.php
application/hub/interfaces/package/class_Deliverable.php
application/hub/interfaces/package/class_Receivable.php
application/hub/interfaces/package/fragmenter/class_Fragmentable.php
application/hub/interfaces/pool/class_Poolable.php
application/hub/interfaces/pool/listener/class_PoolableListener.php
application/hub/interfaces/pool/peer/class_PoolablePeer.php
application/hub/interfaces/producer/block/class_BlockProducer.php
application/hub/interfaces/producer/class_
application/hub/interfaces/producer/class_Producer.php
application/hub/interfaces/producer/keys/class_KeyProducer.php
application/hub/interfaces/producer/work_units/class_UnitProducer.php
application/hub/interfaces/protocol/class_ProtocolHandler.php [deleted file]
application/hub/interfaces/recipient/class_Recipient.php
application/hub/interfaces/resolver/.htaccess [new file with mode: 0644]
application/hub/interfaces/resolver/class_ProtocolResolver.php [new file with mode: 0644]
application/hub/interfaces/scanner/class_Scanner.php
application/hub/interfaces/socket/class_SocketTag.php
application/hub/interfaces/source/class_Source.php
application/hub/interfaces/source/units/class_UnitSource.php
application/hub/interfaces/source/urls/class_UrlSource.php
application/hub/interfaces/states/class_
application/hub/interfaces/states/class_Stateable.php
application/hub/interfaces/states/client/class_ClientStateable.php
application/hub/interfaces/states/hub/class_HubStateable.php
application/hub/interfaces/states/peer/class_PeerStateable.php
application/hub/interfaces/tags/class_Tagable.php
application/hub/interfaces/tasks/class_Taskable.php
application/hub/interfaces/visitor/class_Visitable.php
application/hub/interfaces/visitor/class_Visitor.php
application/hub/interfaces/visitor/decorator/class_DecoratorVisitor.php
application/hub/interfaces/visitor/listener/class_ListenerVisitor.php
application/hub/interfaces/visitor/pool/class_PoolVisitor.php
application/hub/interfaces/visitor/pool/listener/class_ListenerPoolVisitor.php
application/hub/interfaces/visitor/tasks/class_TaskVisitor.php
application/hub/interfaces/work_units/class_UnitHelper.php
application/hub/interfaces/wrapper/class_NodeDhtWrapper.php
application/hub/interfaces/wrapper/class_NodeInformationWrapper.php
application/hub/interfaces/wrapper/class_UnitDatabaseWrapper.php
application/hub/loader.php
application/hub/main/blocks/class_
application/hub/main/blocks/class_BaseBlock.php
application/hub/main/blocks/miner/class_HashBlock.php
application/hub/main/chains/class_PackageFilterChain.php
application/hub/main/class_
application/hub/main/class_Base
application/hub/main/class_BaseHubSystem.php
application/hub/main/commands/console/class_HubConsoleMainCommand.php
application/hub/main/compressor/decorator/class_NetworkPackageCompressorDecorator.php
application/hub/main/controller/console/class_HubConsoleDefaultNewsController.php
application/hub/main/decoder/class_
application/hub/main/decoder/class_BaseDecoder.php
application/hub/main/decoder/package/class_PackageDecoder.php
application/hub/main/decorators/class_BaseDecorator.php
application/hub/main/dht/class_
application/hub/main/dht/class_BaseDht.php
application/hub/main/dht/node/class_NodeDhtFacade.php
application/hub/main/discovery/class_ [new file with mode: 0644]
application/hub/main/discovery/class_BaseNodeDiscovery.php
application/hub/main/discovery/dht/.htaccess [deleted file]
application/hub/main/discovery/dht/class_DhtRecipientDiscovery.php [deleted file]
application/hub/main/discovery/node/.htaccess [new file with mode: 0644]
application/hub/main/discovery/node/class_UniversalNodeLocatorDiscovery.php [new file with mode: 0644]
application/hub/main/discovery/package/.htaccess [deleted file]
application/hub/main/discovery/package/class_PackageRecipientDiscovery.php [deleted file]
application/hub/main/discovery/recipient/.htaccess [new file with mode: 0644]
application/hub/main/discovery/recipient/class_ [new file with mode: 0644]
application/hub/main/discovery/recipient/class_BaseRecipientDiscovery.php [new file with mode: 0644]
application/hub/main/discovery/recipient/dht/.htaccess [new file with mode: 0644]
application/hub/main/discovery/recipient/dht/class_DhtRecipientDiscovery.php [new file with mode: 0644]
application/hub/main/discovery/recipient/package/.htaccess [new file with mode: 0644]
application/hub/main/discovery/recipient/package/class_PackageRecipientDiscovery.php [new file with mode: 0644]
application/hub/main/discovery/recipient/socket/.htaccess [new file with mode: 0644]
application/hub/main/discovery/recipient/socket/class_PackageSocketDiscovery.php [new file with mode: 0644]
application/hub/main/discovery/socket/.htaccess [deleted file]
application/hub/main/discovery/socket/class_PackageSocketDiscovery.php [deleted file]
application/hub/main/factories/chain/class_PackageFilterChainFactory.php
application/hub/main/factories/chunks/class_ChunkHandlerFactory.php
application/hub/main/factories/class_
application/hub/main/factories/dht/class_DhtObjectFactory.php
application/hub/main/factories/discovery/class_PackageDiscoveryFactory.php
application/hub/main/factories/discovery/class_SocketDiscoveryFactory.php
application/hub/main/factories/handler/class_MessageTypeHandlerFactory.php
application/hub/main/factories/handler/class_ProtocolHandlerFactory.php
application/hub/main/factories/lists/class_RecipientListFactory.php
application/hub/main/factories/node/class_NodeObjectFactory.php
application/hub/main/factories/package/assembler/class_PackageAssemblerFactory.php
application/hub/main/factories/package/class_NetworkPackageFactory.php
application/hub/main/factories/package/fragmenter/class_FragmenterFactory.php
application/hub/main/factories/producer/class_ProducerFactory.php
application/hub/main/factories/registry/class_ObjectTypeRegistryFactory.php
application/hub/main/factories/resolver/.htaccess [new file with mode: 0644]
application/hub/main/factories/resolver/class_ProtocolResolverFactory.php [new file with mode: 0644]
application/hub/main/factories/scanner/class_ScannerObjectFactory.php
application/hub/main/factories/socket/class_SocketFactory.php
application/hub/main/factories/source/units/class_UnitSourceFactory.php
application/hub/main/factories/source/url/class_UrlSourceObjectFactory.php
application/hub/main/factories/states/dht/class_DhtStateFactory.php
application/hub/main/factories/states/node/class_NodeStateFactory.php
application/hub/main/factories/states/peer/class_PeerStateFactory.php
application/hub/main/factories/tags/class_PackageTagsFactory.php
application/hub/main/filter/activation/node/class_NodeActivation
application/hub/main/filter/activation/node/class_NodeActivationAnnouncementFilter.php
application/hub/main/filter/bootstrap/node/class_NodeBootstrapExtraBootstrappingFilter.php
application/hub/main/filter/class_
application/hub/main/filter/class_BaseHubFilter.php
application/hub/main/filter/class_BaseNodeFilter.php
application/hub/main/filter/node/class_Node
application/hub/main/filter/node/class_NodeInitializationFilter.php
application/hub/main/filter/node/class_NodePhpRequirementsFilter.php
application/hub/main/filter/node/class_NodeWelcomeTeaserFilter.php
application/hub/main/filter/shutdown/node/class_NodeShutdown
application/hub/main/filter/shutdown/node/class_NodeShutdownFlushNodeListFilter.php
application/hub/main/filter/shutdown/node/class_NodeShutdownNodeFilter.php
application/hub/main/filter/shutdown/node/class_NodeShutdownTaskHandlerFilter.php
application/hub/main/filter/tags/answer/class_PackageAnnouncementAnswerTagFilter.php
application/hub/main/filter/tags/answer/class_PackageDhtBootstrapAnswerTagFilter.php
application/hub/main/filter/tags/answer/class_PackageRequestNodeListAnswerTagFilter.php
application/hub/main/filter/tags/class_PackageAnnouncementTagFilter.php
application/hub/main/filter/tags/class_PackageDhtBootstrapTagFilter.php
application/hub/main/filter/tags/class_PackageRequestNodeListTagFilter.php
application/hub/main/filter/tags/class_PackageSelfConnectTagFilter.php
application/hub/main/filter/task/node/class_NodeTaskHandlerInitializerFilter.php
application/hub/main/handler/answer-status/announcement/class_AnnouncementAnswerOkayHandler.php
application/hub/main/handler/answer-status/class_
application/hub/main/handler/answer-status/class_BaseAnserStatusHandler.php
application/hub/main/handler/answer-status/requests/class_RequestNodeListAnswerOkayHandler.php
application/hub/main/handler/chunks/class_ChunkHandler.php
application/hub/main/handler/class_BaseDataHandler.php
application/hub/main/handler/class_BaseHandler.php
application/hub/main/handler/message-types/announcement/class_NodeMessageAnnouncementHandler.php
application/hub/main/handler/message-types/answer/class_NodeMessageAnnouncementAnswerHandler.php
application/hub/main/handler/message-types/answer/class_NodeMessageDhtBootstrapAnswerHandler.php
application/hub/main/handler/message-types/answer/class_NodeMessageRequestNodeListAnswerHandler.php
application/hub/main/handler/message-types/class_
application/hub/main/handler/message-types/class_BaseMessageHandler.php
application/hub/main/handler/message-types/dht/class_NodeMessageDhtBootstrapHandler.php
application/hub/main/handler/message-types/requests/class_NodeMessageRequestNodeListHandler.php
application/hub/main/handler/message-types/self-connect/class_NodeMessageSelfConnectHandler.php
application/hub/main/handler/network/class_BaseRawDataHandler.php
application/hub/main/handler/network/tcp/class_
application/hub/main/handler/network/tcp/class_TcpRawDataHandler.php
application/hub/main/handler/network/udp/class_UdpRawDataHandler.php
application/hub/main/handler/tasks/class_TaskHandler.php
application/hub/main/helper/class_
application/hub/main/helper/class_BaseHubSystemHelper.php
application/hub/main/helper/connection/class_
application/hub/main/helper/connection/class_BaseConnectionHelper.php
application/hub/main/helper/connection/tcp/class_TcpConnectionHelper.php
application/hub/main/helper/connection/udp/class_UdpConnectionHelper.php
application/hub/main/helper/dht/class_DhtBootstrapHelper.php
application/hub/main/helper/dht/class_DhtPublishEntryHelper.php
application/hub/main/helper/messages/class_
application/hub/main/helper/messages/class_BaseMessageHelper.php
application/hub/main/helper/messages/crypto/class_CryptoRandomUnitMessageHelper.php
application/hub/main/helper/node/announcement/class_NodeAnnouncementHelper.php
application/hub/main/helper/node/answer/announcement/class_NodeAnnouncementMessageAnswerHelper.php
application/hub/main/helper/node/answer/class_BaseHubAnswerHelper.php
application/hub/main/helper/node/answer/dht/class_NodeDhtBootstrapMessageAnswerHelper.php
application/hub/main/helper/node/answer/requests/class_NodeRequestNodeListMessageAnswerHelper.php
application/hub/main/helper/node/class_
application/hub/main/helper/node/class_BaseNodeHelper.php
application/hub/main/helper/node/connection/class_NodeSelfConnectHelper.php
application/hub/main/helper/node/requests/class_NodeRequestNodeListHelper.php
application/hub/main/helper/work_units/class_BaseWorkUnitHelper.php
application/hub/main/iterator/hub/class_HubPingIterator.php
application/hub/main/iterator/network/class_NetworkListenIterator.php
application/hub/main/iterator/pool/class_DefaultIterator.php
application/hub/main/iterator/pool/handler/class_Handler
application/hub/main/iterator/pool/handler/class_HandlerPoolIterator.php
application/hub/main/iterator/pool/monitor/class_MonitorPoolIterator.php
application/hub/main/iterator/pool/shutdown/class_Shutdown
application/hub/main/iterator/pool/shutdown/class_ShutdownPoolIterator.php
application/hub/main/iterator/pool/tasks/class_TaskPoolIterator.php
application/hub/main/iterator/producer/keys/class_TestUnitKeyProducerIterator.php
application/hub/main/listener/class_
application/hub/main/listener/class_BaseListener.php
application/hub/main/listener/class_BaseListenerDecorator.php
application/hub/main/listener/tcp/class_
application/hub/main/listener/tcp/class_TcpListener.php
application/hub/main/listener/tcp/decorators/class_ClientTcpListenerDecorator.php
application/hub/main/listener/tcp/decorators/class_HubTcpListenerDecorator.php
application/hub/main/listener/udp/class_
application/hub/main/listener/udp/class_UdpListener.php
application/hub/main/listener/udp/decorators/class_ClientUdpListenerDecorator.php
application/hub/main/listener/udp/decorators/class_HubUdpListenerDecorator.php
application/hub/main/lists/class_
application/hub/main/lists/class_BaseList.php
application/hub/main/lists/groups/class_ListGroupList.php
application/hub/main/lists/hub/class_HubList.php
application/hub/main/lists/pool/class_PoolEntriesList.php
application/hub/main/lists/recipient/class_RecipientList.php
application/hub/main/lists/tasks/class_TaskList.php
application/hub/main/nodes/boot/class_HubBootNode.php
application/hub/main/nodes/class_
application/hub/main/nodes/class_BaseHubNode.php
application/hub/main/nodes/list/class_HubListNode.php
application/hub/main/nodes/master/class_HubMasterNode.php
application/hub/main/nodes/regular/class_HubRegularNode.php
application/hub/main/package/assembler/class_PackageAssembler.php
application/hub/main/package/class_NetworkPackage.php
application/hub/main/package/fragmenter/class_PackageFragmenter.php
application/hub/main/pools/class_
application/hub/main/pools/class_BasePool.php
application/hub/main/pools/listener/class_DefaultListenerPool.php
application/hub/main/pools/peer/class_DefaultPeerPool.php
application/hub/main/producer/class_
application/hub/main/producer/class_BaseProducer.php
application/hub/main/producer/cruncher/class_BaseKeyProducer.php
application/hub/main/producer/cruncher/class_BaseUnitProducer.php
application/hub/main/recipient/class_
application/hub/main/recipient/class_BaseRecipient.php
application/hub/main/recipient/dht/class_DhtRecipient.php
application/hub/main/recipient/direct/class_DirectRecipient.php
application/hub/main/recipient/self/class_SelfRecipient.php
application/hub/main/recipient/upper/class_UpperRecipient.php
application/hub/main/registry/connection/class_ConnectionRegistry.php
application/hub/main/registry/objects/class_ObjectTypeRegistry.php
application/hub/main/registry/socket/class_SocketRegistry.php
application/hub/main/resolver/command/console/class_HubConsoleCommandResolver.php
application/hub/main/resolver/controller/console/class_HubConsoleControllerResolver.php
application/hub/main/resolver/controller/http/class_HubHttpControllerResolver.php
application/hub/main/resolver/protocol/.htaccess [new file with mode: 0644]
application/hub/main/resolver/protocol/class_ [new file with mode: 0644]
application/hub/main/resolver/protocol/class_BaseProtocolResolver.php [new file with mode: 0644]
application/hub/main/resolver/protocol/tcp/.htaccess [new file with mode: 0644]
application/hub/main/resolver/protocol/tcp/class_TcpProtocolResolver.php [new file with mode: 0644]
application/hub/main/resolver/state/class_BaseStateResolver.php
application/hub/main/resolver/state/peer/class_PeerStateResolver.php
application/hub/main/scanner/class_
application/hub/main/scanner/class_BaseScanner.php
application/hub/main/source/class_
application/hub/main/source/class_BaseSource.php
application/hub/main/source/class_BaseUrlSource.php
application/hub/main/source/units/class_TestUnitSource.php
application/hub/main/source/urls/class_CrawlerUploadedListUrlSource.php
application/hub/main/states/class_
application/hub/main/states/class_BaseState.php
application/hub/main/states/communicator/active/class_CommunicatorActiveState.php
application/hub/main/states/communicator/init/class_CommunicatorInitState.php
application/hub/main/states/crawler/active/class_CrawlerActiveState.php
application/hub/main/states/crawler/booting/class_CrawlerBootingState.php
application/hub/main/states/crawler/init/class_CrawlerInitState.php
application/hub/main/states/dht/active/class_DhtActiveState.php
application/hub/main/states/dht/booting/class_DhtBootingState.php
application/hub/main/states/dht/class_
application/hub/main/states/dht/class_BaseDhtState.php
application/hub/main/states/dht/init/class_DhtInitState.php
application/hub/main/states/dht/virgin/class_DhtVirginState.php
application/hub/main/states/node/active/class_NodeActiveState.php
application/hub/main/states/node/announced/class_NodeAnnouncementCompletedState.php
application/hub/main/states/node/announced/class_NodeAnnouncingState.php
application/hub/main/states/node/class_
application/hub/main/states/node/class_BaseNodeState.php
application/hub/main/states/node/init/class_NodeInitState.php
application/hub/main/states/node/seniors/class_NodeReachableState.php
application/hub/main/states/node/virgin/class_NodeVirginState.php
application/hub/main/states/peer/class_
application/hub/main/states/peer/class_BasePeerState.php
application/hub/main/states/peer/connected/class_ConnectedPeerState.php
application/hub/main/states/peer/errors/class_ConnectionRefusedPeerState.php
application/hub/main/states/peer/errors/class_ConnectionTimedOutPeerState.php
application/hub/main/states/peer/errors/class_NoRouteToHostPeerState.php
application/hub/main/states/peer/errors/class_OperationAlreadyProgressPeerState.php
application/hub/main/states/peer/errors/class_ProblemPeerState.php
application/hub/main/states/peer/errors/class_TransportEndpointGonePeerState.php
application/hub/main/states/peer/init/class_InitPeerState.php
application/hub/main/statistics/connection/class_ConnectionStatisticsHelper.php
application/hub/main/tags/class_
application/hub/main/tags/class_BaseTags.php
application/hub/main/tags/package/class_PackageTags.php
application/hub/main/tasks/chat/class_
application/hub/main/tasks/class_
application/hub/main/tasks/class_BaseTask.php
application/hub/main/tasks/idle/class_IdleLoopTask.php
application/hub/main/tasks/network/class_NetworkPackageReaderTask.php
application/hub/main/tasks/network/class_NetworkPackageWriterTask.php
application/hub/main/tasks/node/announcement/class_NodeAnnouncementTask.php
application/hub/main/tasks/node/chunks/class_NodeChunkAssemblerTask.php
application/hub/main/tasks/node/class_Node
application/hub/main/tasks/node/decoder/class_NodePackageDecoderTask.php
application/hub/main/tasks/node/dht/class_NodeDhtBootstrapTask.php
application/hub/main/tasks/node/dht/class_NodeDhtInitializationTask.php
application/hub/main/tasks/node/dht/class_NodeDhtLateBootstrapTask.php
application/hub/main/tasks/node/dht/class_NodeDhtPublicationCheckTask.php
application/hub/main/tasks/node/dht/class_NodeDhtPublicationTask.php
application/hub/main/tasks/node/dht/class_NodeDhtQueryTask.php
application/hub/main/tasks/node/listener/class_NodeSocketListenerTask.php
application/hub/main/tasks/node/ping/class_NodePingTask.php
application/hub/main/tasks/node/self_connect/class_NodeSelfConnectTask.php
application/hub/main/tasks/node/tags/class_NodePackageTagsInitTask.php
application/hub/main/tasks/node/update/class_NodeUpdateCheckTask.php
application/hub/main/template/announcement/class_XmlAnnouncementTemplateEngine.php
application/hub/main/template/answer/announcement/class_XmlAnnouncementAnswerTemplateEngine.php
application/hub/main/template/answer/class_
application/hub/main/template/answer/class_BaseXmlAnswerTemplateEngine.php
application/hub/main/template/answer/dht/class_XmlDhtBootstrapAnswerTemplateEngine.php
application/hub/main/template/answer/requests/class_XmlRequestNodeListAnswerTemplateEngine.php
application/hub/main/template/class_
application/hub/main/template/class_BaseXmlTemplateEngine.php
application/hub/main/template/connect/class_XmlSelfConnectTemplateEngine.php
application/hub/main/template/dht/class_XmlDhtBootstrapTemplateEngine.php
application/hub/main/template/entries/class_XmlRequestNodeListEntryTemplateEngine.php
application/hub/main/template/objects/class_XmlObjectRegistryTemplateEngine.php
application/hub/main/template/publish/class_XmlDhtPublishEntryTemplateEngine.php
application/hub/main/template/requests/class_XmlRequestNodeListTemplateEngine.php
application/hub/main/tools/class_HubTools.php
application/hub/main/visitor/class_
application/hub/main/visitor/class_BaseVisitor.php
application/hub/main/visitor/pool/class_
application/hub/main/visitor/pool/handler/class_Handler
application/hub/main/visitor/pool/monitor/class_RawDataPoolMonitorVisitor.php
application/hub/main/visitor/pool/shutdown/class_Shutdown
application/hub/main/visitor/pool/shutdown/class_ShutdownListenerPoolVisitor.php
application/hub/main/visitor/socket/class_HalfShutdownSocketVisitor.php
application/hub/main/visitor/socket/class_ShutdownSocketVisitor.php
application/hub/main/visitor/tasks/class_ActiveTaskVisitor.php
application/hub/main/visitor/tasks/class_ShutdownTaskVisitor.php
application/hub/main/wrapper/node/class_NodeDistributedHashTableDatabaseWrapper.php
application/hub/main/wrapper/node/class_NodeInformationDatabaseWrapper.php
application/hub/main/wrapper/states/class_PeerStateLookupDatabaseWrapper.php
application/hub/starter.php
application/hub/templates/xml/.xml
application/hub/templates/xml/announcement/announcement.xml
application/hub/templates/xml/answer/announcement/announcement_answer.xml
application/hub/templates/xml/answer/dht_bootstrap/dht_bootstrap_answer.xml
application/hub/templates/xml/answer/requests/request_node_list_answer.xml
application/hub/templates/xml/cruncher/producer/test_unit.xml
application/hub/templates/xml/cruncher/producer/work_unit.xml
application/hub/templates/xml/dht_bootstrap/dht_bootstrap.xml
application/hub/templates/xml/dht_publish/publish.xml
application/hub/templates/xml/node/node_status.xml
application/hub/templates/xml/object_registry/object_registry.xml
application/hub/templates/xml/requests/request_node_list.xml
application/hub/templates/xml/self_connect/self_connect.xml
index.php

index 6ee84878739f623d34ebb7257180454db085086b..7352bc010aa33fe2f0ca77c453f08fc795270452 100644 (file)
@@ -22,7 +22,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0
- * @copyright  Copyright (c) 2007 - 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007 - 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  *
  * This program is free software: you can redistribute it and/or modify
index bf693f8e54ea6a14f073736bf564a5df8f12e7ad..9722460b0700968b84bde72e3f4a984ca02b6ed3 100644 (file)
@@ -16,7 +16,7 @@
  *
  * @author             Roland Haeder <webmaster@ship-simu.org>
  * @version            0.0
- * @copyright  Copyright (c) 2007 - 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007 - 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  *
  * This program is free software: you can redistribute it and/or modify
index 33069d54f026ad4de21587a26a55474c806ba3d0..f6196ff8b6f106de492d1078625554cf336ae068 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0
- * @copyright  Copyright (c) 2007 - 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007 - 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  *
  * This program is free software: you can redistribute it and/or modify
@@ -729,6 +729,9 @@ $cfg->setConfigEntry('socket_discovery_class', 'PackageSocketDiscovery');
 // CFG: DHT-RECIPIENT-DISCOVERY-CLASS
 $cfg->setConfigEntry('dht_recipient_discovery_class', 'DhtRecipientDiscovery');
 
+// CFG: UNIVERSAL-NODE-LOCATOR-DISCOVERY-CLASS
+$cfg->setConfigEntry('unl_discovery_class', 'UniversalNodeLocatorDiscovery');
+
 // CFG: RECIPIENT-LIST-CLASS
 $cfg->setConfigEntry('recipient_list_class', 'RecipientList');
 
@@ -741,6 +744,12 @@ $cfg->setConfigEntry('tcp_connection_helper_class', 'TcpConnectionHelper');
 // CFG: UDP-CONNECTION-HELPER-CLASS
 $cfg->setConfigEntry('udp_connection_helper_class', 'UdpConnectionHelper');
 
+// CFG: HUB-COMMUNICATION-PROTOCOL-TYPE
+$cfg->setConfigEntry('hub_communication_protocol_type', 'tcp');
+
+// CFG: TCP-PROTOCOL-RESOLVER-CLASS
+$cfg->setConfigEntry('tcp_protocol_resolver_class', 'TcpProtocolResolver');
+
 // CFG: TCP-BUFFER-LENGTH
 $cfg->setConfigEntry('tcp_buffer_length', 1024);
 
@@ -1460,8 +1469,8 @@ $cfg->setConfigEntry('task_crawler_uploaded_list_scanner_interval_delay', 1000);
 // CFG: TASK-CRAWLER-URL-SOURCE-FOUND-RSS-MAX-RUNS
 $cfg->setConfigEntry('task_crawler_uploaded_list_scanner_max_runs', 0);
 
-// CFG: CSV-FILE-PATH
-$cfg->setConfigEntry('csv_file_path', 'data/url_lists');
+// CFG: CRAWLER-CSV-FILE-PATH
+$cfg->setConfigEntry('crawler_csv_file_path', 'data/url_lists');
 
 ///////////////////////////////////////////////////////////////////////////////
 //                            HTTP Configuration
index a2870c05c04f8d332721c409f2d85ed8222882b8..054c9374115ada9679cd8700aa0873df527aaa51 100644 (file)
@@ -7,7 +7,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 5fe2cdc4e9a232b0211829c508c9f5ebcb4f1997..ee6d5b66d56eb168ed566ec0b41d29e4a6243c33 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0
- * @copyright  Copyright (c) 2007 - 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007 - 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  *
  * This program is free software: you can redistribute it and/or modify
index a7c409ae1805ab82a18d5fc06dc0e6d3a423b36c..18642da28013a7d9a5c250f2cddef5be0296477b 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0
- * @copyright  Copyright (c) 2007 - 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007 - 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  *
  * This program is free software: you can redistribute it and/or modify
index ff059215476d94cd4924344810a5a8849a52dde9..46ac205cd94cfa3a41062a51f640513e13f0eb8a 100644 (file)
@@ -5,7 +5,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index ba21567d9f010d31c59f7755d70516b76dc5ca4e..c5500752dbeea251c27eb05c33bce20cf23298f8 100644 (file)
@@ -5,7 +5,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 74ffabb24c7ac98deea227e12d5e65f32695e70e..33edad1f380dbc7e1c1d5178b625b3293c89c4d1 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 66a905e97b1039656ec0fcdc0e67c44d6b375cfb..ad8c18bce23e452795491e6c144a7982d70fcba0 100644 (file)
@@ -5,7 +5,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 3d73caf9160f9ede120e065799f15a883cecbd31..68c03c13823d7b64a5d5de05cf92eb15d1068148 100644 (file)
@@ -5,7 +5,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 6f0cdc6946cff152a064fe537b9209447678d0df..3d91bd7f45248e25285c91995844e95ad18f4838 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index dbf11328bfa9a25e2d3b8652c250409a8c406d64..535a0e3b5e8e67d741f839862debce28ab7994ac 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 8f3fe264fb7fb6351b4d4630d0f4d5813551f615..7f290ae009d562cdc7b9d1fd41d0eb0e08d7c58e 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 3ef764fda3368a558c84ccfe6227a73f614cb93d..551c0e04e7a37f50ca16d765b17dc3d109360409 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index a96831c54a7f1cd4a707b8f49665b41c824fbcd5..d6898a2f56c15200e3654b84556c31e12a90ce4d 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 4f89d51700307970a8a61654717e06451a4edc68..169ed9feb33ac2a2f2c51271ec7fe98e6ad92fcc 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 33d33b8815bcce6183558001b785e1ba8bca0701..d91f14453439184a60ee3a4195d7196342526eab 100644 (file)
@@ -6,7 +6,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 1ec55d640e5b5469f679fc0af15b06e8a8696fe0..d8ba0021516af4a385d1d284030b316b0b86ff21 100644 (file)
@@ -5,7 +5,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index da2bc467c2e477d7ddf7fd0f5ae9602302db47b1..e2e50c74ce9537dd776a9a04abf1f6ea062fb913 100644 (file)
@@ -5,7 +5,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index d72bec643d8887246a8285417334547e7a5410f6..7b2d89c759ff99dec44fd9a3f473585a3eb4190b 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 1fdef6b5d53b9a52d86f0b1d1fc2fea4d943319a..0c4a04a9c08d225bedb2e4604cd12d31ba01e662 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 864292993934f05d179dc054b0577ab5c3cc0d5e..c211d002875cd51db64b43c7c8717193fe33603b 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 0eb7e2c202ba311fe93636486a27e728ccaa5d59..ed58f0d2921e849e734e247147ebb84cb0e1eeea 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 0706d6f0b9d84fb3fcc5c75de8a7981e15b44e3f..042e4048bb40e3eb08830ce144b3d0e6a093ff96 100644 (file)
@@ -6,7 +6,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index d369e6312001ad1cb6b5eb2d8dfaf8057de88d70..02e7546223c34021195ab92b69a2989dc520ae1b 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 1ad035033e96b940f035ce20c50f2e4a21cfbd69..4daf9ae14b62456898a678342f29575378d64e8c 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index bebe02b07393de78ea557ae27347164f85a4c509..ce41f4bfb7b7fea2cf6f49e5f012e5b9f0d9aa7c 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 8683bfc0edf69fe237513412feef7cc65fa9ccfe..062c37d2c9c7727c9009903816227be123d0c0c7 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 94a3bfb20e6299bce3d4df37649d967f70f9dd71..998d1ab25565c7514f5628238c04c110c55a82ee 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index c06f05f5154da4c076b41de95fa88e08af873fa5..84da0b169a618c9d5d95a1d4d63af1d6e0ba1e60 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index e679caae4b56e96315c9693b4d344d386abb3dbe..a9cd0090a55940c7bf95f300c8facd5f07797c71 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index d5920d42ab95ed2fe7b91eac213eb85ab978d7ef..a3b04697f3728ec246f78e403130ac0446dd70ec 100644 (file)
@@ -7,7 +7,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0
- * @copyright  Copyright (c) 2007 - 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007 - 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  *
  * This program is free software: you can redistribute it and/or modify
index 3440d33aed6ea8ab16c37b93ea4887d4f9fcc09a..2e31e8273098510feea2a010695a9f3c924e1928 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  * @todo               We need to find a better name for this interface
index 4d4c285e33bf9d663ce0b53b181757ae0700f58d..1199bd2fa41c822eb7cab6784c009619d369f8ab 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 9eec33074a8f490e874c5fa4e7414bdfa40b7dbf..bf9c84142d19855dbfbad9f972ba100616a1a911 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index b10b10dc2cc7c00106317dd47e619a5d49ca7479..8bb0dc9f0b0528b34ef40840acc81ce8941a9218 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Core Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Core Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
 interface Discoverable extends FrameworkInterface {
-       /**
-        * "Getter" for recipient iterator
-        *
-        * @return      $iteratorInstance       An instance of a Iterateable object
-        */
-       function getIterator ();
-
-       /**
-        * Clears all recipients for e.g. another package to deliver
-        *
-        * @return      void
-        */
-       function clearRecipients ();
-
-       /**
-        * Checks whether the recipient list is empty
-        *
-        * @return      $isEmpty        Whether the recipient list is empty
-        */
-       function isRecipientListEmpty ();
 }
 
 // [EOF]
diff --git a/application/hub/interfaces/discovery/dht/.htaccess b/application/hub/interfaces/discovery/dht/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
diff --git a/application/hub/interfaces/discovery/dht/class_DiscoverableDhtRecipient.php b/application/hub/interfaces/discovery/dht/class_DiscoverableDhtRecipient.php
deleted file mode 100644 (file)
index d015336..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-<?php
-/**
- * An interface for socket discovery
- *
- * @author             Roland Haeder <webmaster@shipsimu.org>
- * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Core Developer Team
- * @license            GNU GPL 3.0 or any newer version
- * @link               http://www.shipsimu.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 DiscoverableDhtRecipient extends Discoverable {
-       /**
-        * Resolves one or more recipients for a DHT transfer by given package data.
-        *
-        * @param       $packageData    Valid package data array
-        * @return      $recipients             An indexed array with DHT recipients
-        */
-       function resolveRecipientsByPackageData (array $packageData);
-}
-
-// [EOF]
-?>
diff --git a/application/hub/interfaces/discovery/node/.htaccess b/application/hub/interfaces/discovery/node/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
diff --git a/application/hub/interfaces/discovery/node/class_DiscoverableNodeRecipient.php b/application/hub/interfaces/discovery/node/class_DiscoverableNodeRecipient.php
deleted file mode 100644 (file)
index 2b1b7b4..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-<?php
-/**
- * An interface for recipient discovery
- *
- * @author             Roland Haeder <webmaster@shipsimu.org>
- * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Core Developer Team
- * @license            GNU GPL 3.0 or any newer version
- * @link               http://www.shipsimu.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 DiscoverableNodeRecipient extends Discoverable, IteratorAggregate {
-       /**
-        * Tries to discover all recipients for given package data
-        *
-        * @param       $packageData    Raw package data array
-        * @return      void
-        */
-       function discoverRecipients (array $packageData);
-
-       /**
-        * Tries to discover all recipients by given decoded package data.
-        *
-        * @param       $decodedData    Raw raw package data array
-        * @return      void
-        */
-       function discoverRawRecipients (array $decodedData);
-
-       /**
-        * "Getter" for recipient iterator
-        *
-        * @return      $iteratorInstance       An instance of a Iterateable object
-        */
-       function getIterator ();
-
-       /**
-        * Clears all recipients for e.g. another package to deliver
-        *
-        * @return      void
-        */
-       function clearRecipients ();
-}
-
-// [EOF]
-?>
diff --git a/application/hub/interfaces/discovery/recipient/.htaccess b/application/hub/interfaces/discovery/recipient/.htaccess
new file mode 100644 (file)
index 0000000..3a42882
--- /dev/null
@@ -0,0 +1 @@
+Deny from all
diff --git a/application/hub/interfaces/discovery/recipient/class_DiscoverableRecipient.php b/application/hub/interfaces/discovery/recipient/class_DiscoverableRecipient.php
new file mode 100644 (file)
index 0000000..28f7db1
--- /dev/null
@@ -0,0 +1,48 @@
+<?php
+/**
+ * An interface for recipient discovery
+ *
+ * @author             Roland Haeder <webmaster@shipsimu.org>
+ * @version            0.0.0
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Core Developer Team
+ * @license            GNU GPL 3.0 or any newer version
+ * @link               http://www.shipsimu.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 DiscoverableRecipient extends Discoverable {
+       /**
+        * "Getter" for recipient iterator
+        *
+        * @return      $iteratorInstance       An instance of a Iterateable object
+        */
+       function getIterator ();
+
+       /**
+        * Clears all recipients for e.g. another package to deliver
+        *
+        * @return      void
+        */
+       function clearRecipients ();
+
+       /**
+        * Checks whether the recipient list is empty
+        *
+        * @return      $isEmpty        Whether the recipient list is empty
+        */
+       function isRecipientListEmpty ();
+}
+
+// [EOF]
+?>
diff --git a/application/hub/interfaces/discovery/recipient/dht/.htaccess b/application/hub/interfaces/discovery/recipient/dht/.htaccess
new file mode 100644 (file)
index 0000000..3a42882
--- /dev/null
@@ -0,0 +1 @@
+Deny from all
diff --git a/application/hub/interfaces/discovery/recipient/dht/class_DiscoverableDhtRecipient.php b/application/hub/interfaces/discovery/recipient/dht/class_DiscoverableDhtRecipient.php
new file mode 100644 (file)
index 0000000..79e721c
--- /dev/null
@@ -0,0 +1,35 @@
+<?php
+/**
+ * An interface for DHT recipient discovery
+ *
+ * @author             Roland Haeder <webmaster@shipsimu.org>
+ * @version            0.0.0
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Core Developer Team
+ * @license            GNU GPL 3.0 or any newer version
+ * @link               http://www.shipsimu.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 DiscoverableDhtRecipient extends DiscoverableRecipient {
+       /**
+        * Resolves one or more recipients for a DHT transfer by given package data.
+        *
+        * @param       $packageData    Valid package data array
+        * @return      $recipients             An indexed array with DHT recipients
+        */
+       function resolveRecipientsByPackageData (array $packageData);
+}
+
+// [EOF]
+?>
diff --git a/application/hub/interfaces/discovery/recipient/node/.htaccess b/application/hub/interfaces/discovery/recipient/node/.htaccess
new file mode 100644 (file)
index 0000000..3a42882
--- /dev/null
@@ -0,0 +1 @@
+Deny from all
diff --git a/application/hub/interfaces/discovery/recipient/node/class_DiscoverableNodeRecipient.php b/application/hub/interfaces/discovery/recipient/node/class_DiscoverableNodeRecipient.php
new file mode 100644 (file)
index 0000000..a36d119
--- /dev/null
@@ -0,0 +1,43 @@
+<?php
+/**
+ * An interface for node recipient discovery
+ *
+ * @author             Roland Haeder <webmaster@shipsimu.org>
+ * @version            0.0.0
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Core Developer Team
+ * @license            GNU GPL 3.0 or any newer version
+ * @link               http://www.shipsimu.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 DiscoverableNodeRecipient extends DiscoverableRecipient {
+       /**
+        * Tries to discover all recipients for given package data
+        *
+        * @param       $packageData    Raw package data array
+        * @return      void
+        */
+       function discoverRecipients (array $packageData);
+
+       /**
+        * Tries to discover all recipients by given decoded package data.
+        *
+        * @param       $decodedData    Raw raw package data array
+        * @return      void
+        */
+       function discoverRawRecipients (array $decodedData);
+}
+
+// [EOF]
+?>
diff --git a/application/hub/interfaces/discovery/recipient/socket/.htaccess b/application/hub/interfaces/discovery/recipient/socket/.htaccess
new file mode 100644 (file)
index 0000000..3a42882
--- /dev/null
@@ -0,0 +1 @@
+Deny from all
diff --git a/application/hub/interfaces/discovery/recipient/socket/class_DiscoverableSocket.php b/application/hub/interfaces/discovery/recipient/socket/class_DiscoverableSocket.php
new file mode 100644 (file)
index 0000000..a943526
--- /dev/null
@@ -0,0 +1,39 @@
+<?php
+/**
+ * An interface for socket discovery
+ *
+ * @author             Roland Haeder <webmaster@shipsimu.org>
+ * @version            0.0.0
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Core Developer Team
+ * @license            GNU GPL 3.0 or any newer version
+ * @link               http://www.shipsimu.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 DiscoverableSocket extends DiscoverableRecipient {
+       /**
+        * Tries to discover the right socket for given package data and returns a
+        * matching socket resource.
+        *
+        * @param       $packageData            Raw package data array
+        * @param       $connectionType         Type of connection, can be 'incoming' or 'outgoing', *NEVER* 'server'!
+        * @return      $socketResource         A valid socket resource
+        * @throws      NoListGroupException    If the procol group is not found in peer list
+        * @throws      NullPointerException    If listenerInstance is NULL
+        */
+       function discoverSocket (array $packageData, $connectionType);
+}
+
+// [EOF]
+?>
diff --git a/application/hub/interfaces/discovery/socket/.htaccess b/application/hub/interfaces/discovery/socket/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
diff --git a/application/hub/interfaces/discovery/socket/class_DiscoverableSocket.php b/application/hub/interfaces/discovery/socket/class_DiscoverableSocket.php
deleted file mode 100644 (file)
index 332bf1e..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-<?php
-/**
- * An interface for socket discovery
- *
- * @author             Roland Haeder <webmaster@shipsimu.org>
- * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Core Developer Team
- * @license            GNU GPL 3.0 or any newer version
- * @link               http://www.shipsimu.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 DiscoverableSocket extends Discoverable {
-       /**
-        * Tries to discover the right socket for given package data and returns a
-        * matching socket resource.
-        *
-        * @param       $packageData            Raw package data array
-        * @param       $connectionType         Type of connection, can be 'incoming' or 'outgoing', *NEVER* 'server'!
-        * @return      $socketResource         A valid socket resource
-        * @throws      NoListGroupException    If the procol group is not found in peer list
-        * @throws      NullPointerException    If listenerInstance is NULL
-        */
-       function discoverSocket (array $packageData, $connectionType);
-}
-
-// [EOF]
-?>
diff --git a/application/hub/interfaces/discovery/unl/.htaccess b/application/hub/interfaces/discovery/unl/.htaccess
new file mode 100644 (file)
index 0000000..3a42882
--- /dev/null
@@ -0,0 +1 @@
+Deny from all
diff --git a/application/hub/interfaces/discovery/unl/class_DiscoverableUniversalNodeLocator.php b/application/hub/interfaces/discovery/unl/class_DiscoverableUniversalNodeLocator.php
new file mode 100644 (file)
index 0000000..9885b37
--- /dev/null
@@ -0,0 +1,35 @@
+<?php
+/**
+ * An interface for UNL discovery
+ *
+ * @author             Roland Haeder <webmaster@shipsimu.org>
+ * @version            0.0.0
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Core Developer Team
+ * @license            GNU GPL 3.0 or any newer version
+ * @link               http://www.shipsimu.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 DiscoverableUniversalNodeLocator extends Discoverable {
+       /**
+        * "Discovers" an instance of a LocateableNode class for given NodeHelper class
+        *
+        * @param       $nodeInstance   An instance of a NodeHelper class
+        * @return      $unlInstance    An instance of a LocateableNode class
+        */
+       function discoverUniversalNodeLocatorByNode (NodeHelper $nodeInstance);
+}
+
+// [EOF]
+?>
index 4ed84d86a1636e519f32503f88cd70cf7c98f170..a58ec5436cb8a7d1bb8000cc06a570519f175791 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index c44bc463ca5780f4d4ba8b0ea09f784cc363fae0..5f5596f8ebae1a422147129171528e386fe357e3 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
@@ -39,24 +39,24 @@ interface DistributableNode extends Distributable {
         * - listen-port (TCP/UDP listen port for inbound connections)
         *
         * @param       $messageData            An array with all minimum message data
-        * @param       $handlerInstance        An instance of a Handleable class
+        * @param       $handlerInstance        An instance of a HandleableDataSet class
         * @param       $forceUpdate            Optionally force update, don't register (default: register if not found)
         * @return      void
         */
-       function registerNodeByMessageData (array $messageData, Handleable $handlerInstance, $forceUpdate = FALSE);
+       function registerNodeByMessageData (array $messageData, HandleableDataSet $handlerInstance, $forceUpdate = FALSE);
 
        /**
         * Queries the local DHT data(base) for a node list with all supported
         * object types except the node by given session id.
         *
         * @param       $messageData            An array with message data from a node_list request
-        * @param       $handlerInstance        An instance of a Handleable class
+        * @param       $handlerInstance        An instance of a HandleableDataSet class
         * @param       $excludeKey                     Array key which should be excluded
         * @param       $andKey                         Array of $separator-separated list of elements which all must match
         * @param       $separator                      Sepator char (1st parameter for explode() call)
         * @return      $nodeList                       An array with all found nodes
         */
-       function queryLocalNodeListExceptByMessageData (array $messageData, Handleable $handlerInstance, $excludeKey, $andKey, $separator);
+       function queryLocalNodeListExceptByMessageData (array $messageData, HandleableDataSet $handlerInstance, $excludeKey, $andKey, $separator);
 
        /**
         * Inserts given node list array (from earlier database result produced by
index d85585cd571db5940167a726fe56bf53e366a70b..11ee81b7d0f15719837fe772ab76b9fd7c5c875a 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index c046d3276ebefa491ba8f55c7dc0702ca6be75cb..4a700c0cd3273c6ceaafafbfe91920184bf912bc 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Core Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Core Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 86dbb9eaff72ce91a0a56fdf277c9758b6bc7845..bdbf13bac05f71dc09616cc704af18268e7f8106 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
@@ -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 HandleableAnswerStatus extends Handleable {
+interface HandleableAnswerStatus extends HandleableDataSet {
        /**
         * Handles given message data array
         *
index 173e70666f66890083639cf2e03b87892cb9b9c5..76d7b56b2c16e26c1ea9c5b485a99b0a9bb330e1 100644 (file)
@@ -1,10 +1,10 @@
 <?php
 /**
- * Handleable chunks interface
+ * An interface for chunk handlers
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
diff --git a/application/hub/interfaces/handler/class_Handleable.php b/application/hub/interfaces/handler/class_Handleable.php
deleted file mode 100644 (file)
index 66c0c29..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-<?php
-/**
- * A Handleable interface
- *
- * @author             Roland Haeder <webmaster@shipsimu.org>
- * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
- * @license            GNU GPL 3.0 or any newer version
- * @link               http://www.shipsimu.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 {
-       /**
-        * Adds all required elements from given array into data set instance
-        *
-        * @param       $dataSetInstance        An instance of a StoreableCriteria class
-        * @param       $messageData            An array with all message data
-        * @return      void
-        */
-       function addArrayToDataSet (StoreableCriteria $dataSetInstance, array $messageData);
-}
-
-// [EOF]
-?>
index ea4246c822139dff0b3df961d1c0b9ddce5a1111..8bf0ab5a9f588193df586e7ec338c3f4c22326cf 100644 (file)
@@ -1,10 +1,10 @@
 <?php
 /**
- * Handleable chunks interface
+ * An interface for message handlers
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
@@ -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 HandleableMessage extends Handleable {
+interface HandleableMessage extends HandleableDataSet {
        /**
         * Handles data array of the message
         *
index f250481ed19ee6e6889b508ab07351f7dd0759f2..242491123b7f9530a0028bf1f14ea953ba7a5bdf 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
@@ -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 Networkable extends Handleable {
+interface Networkable extends HandleableDataSet {
        /**
         * Processes raw data from given resource. This is mostly useful for TCP
         * package handling and is implemented in the TcpListener class
index 2020c566f84a6dd39e1e5e2ef4078f85ff276781..905fd664e8079e9370e082cbc8b72d6c2ba81733 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
@@ -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 HandleableTask extends Handleable {
+interface HandleableTask extends HandleableDataSet {
        /**
         * Searches a task by given instance
         *
index f6530d87b5c096ebfed0c8263e786edd5b11dd6f..4074932f811cbdb0230c6911bd2ad40adddbf794 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  * @todo               Please find another name for this interface
@@ -22,7 +22,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 ConnectionHelper extends Helper {
+interface ConnectionHelper extends HubHelper {
        /**
         * Sends raw package data to the recipient
         *
@@ -48,13 +48,6 @@ interface ConnectionHelper extends Helper {
         */
        function getPort ();
 
-       /**
-        * Getter for protocol
-        *
-        * @return      $protocol       Used protocol
-        */
-       function getProtocol ();
-
        /**
         * Getter for IP address
         *
index c0864204a7e2273e533dfafd2af543fd8d5c8c2f..a7aafa2b1b562f5d2c2a51e9c7c0571c410d01f6 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
@@ -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 HelpableDht extends Helper {
+interface HelpableDht extends HubHelper {
        /**
         * Loads the descriptor XML file
         *
diff --git a/application/hub/interfaces/helper/hub/class_HubHelper.php b/application/hub/interfaces/helper/hub/class_HubHelper.php
new file mode 100644 (file)
index 0000000..5ef351e
--- /dev/null
@@ -0,0 +1,28 @@
+<?php
+/**
+ * An general interface for hub helper classes
+ *
+ * @author             Roland Haeder <webmaster@shipsimu.org>
+ * @version            0.0.0
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
+ * @license            GNU GPL 3.0 or any newer version
+ * @link               http://www.shipsimu.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 HubHelper extends Helper {
+}
+
+// [EOF]
+?>
index 72570eb4993a69f3258f309287618933e4d362ed..3385cfe32927140b0d2c677e04e51f68e8cee313 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  * @todo               Please find another name for this interface
index 177610f20216a83837f240434f318d2e53f2b368..fc783208bdc0da9f6a6c88c5b59bb15e83802668 100644 (file)
@@ -1,10 +1,10 @@
 <?php
 /**
- * An interface for hub helper classes
+ * An interface for node helper classes
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
@@ -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 HelpableNode extends Helper {
+interface HelpableNode extends HubHelper {
        /**
         * Loads the descriptor XML file
         *
index 325c8e12d9250efaa0c6d227de427d0cef1093ba..59e0760cfb71a1a85559d1c3f9e5f931d99693c0 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  * @todo               We need to find a better name for this interface
@@ -109,18 +109,18 @@ interface NodeHelper extends Helper, AddableCriteria {
        function doSelfConnection (Taskable $taskInstance);
 
        /**
-        * "Getter for address:port combination
+        * Determines an instance of a LocateableNode class
         *
-        * @return      $addressPort    A address:port combination for this node
+        * @return      $unlInstance    An instance of a LocateableNode class for this node
         */
-       function getAddressPort ();
+       function determineUniversalNodeLocator ();
 
        /**
-        * "Getter for address:port array
+        * "Getter for an array of an instance of a LocateableNode class
         *
-        * @return      $addressPortArray       An array address:port combination for this node
+        * @return      $unlArray       An array of an instance of a LocateableNode class
         */
-       function getAddressPortArray ();
+       function getUniversalNodeLocatorArray ();
 
        /**
         * Updates/refreshes node data (e.g. state).
index c8070e383092e0775debe7b718baa696c68ec494..ba1875ad05c4d9683d8997a87e0cb4a5c7c694b7 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 584925243cdb5ce4d0c4c9ea6a222d78e1d55aef..b648e03dc86787afbce5da59a9698bd8ad9b4c9c 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
diff --git a/application/hub/interfaces/locator/.htaccess b/application/hub/interfaces/locator/.htaccess
new file mode 100644 (file)
index 0000000..3a42882
--- /dev/null
@@ -0,0 +1 @@
+Deny from all
diff --git a/application/hub/interfaces/locator/class_LocateableNode.php b/application/hub/interfaces/locator/class_LocateableNode.php
new file mode 100644 (file)
index 0000000..8be0226
--- /dev/null
@@ -0,0 +1,28 @@
+<?php
+/**
+ * An interface for node locators (UNL mostly)
+ *
+ * @author             Roland Haeder <webmaster@shipsimu.org>
+ * @version            0.0.0
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
+ * @license            GNU GPL 3.0 or any newer version
+ * @link               http://www.shipsimu.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 LocateableNode extends FrameworkInterface {
+}
+
+// [EOF]
+?>
index b46725f16c3d5547ada8aaa8fa3c770a9dfb94f0..9fd3f12efb225c37c588e564f636f9c99d76af33 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 35a1a27e178623852ae6cda325a6e0892c4391c2..e1b92c164807fcdb1fed7023e3399f662369bc93 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index e76ceb459a96b3bd2a4d6d0f822da765930bfb5c..95b3b1fdc0f3d680dd3ca570c8a4712878775eed 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index b87a91992cdb68536d79b565149f719e217eb5c8..08ce5c356588a43320787f8e1952fe599e6d665c 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 292209360af3c0346d37422f77dae5632f713f89..7f6b56c2ccef60dd2488e52316143557801390c1 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
@@ -27,11 +27,10 @@ interface Deliverable extends FrameworkInterface {
         * from given helper's template instance and pushing it on the 'undeclared'
         * stack.
         *
-        * @param       $helperInstance         An instance of a Helper class
-        * @param       $protocol                       Name of used protocol (TCP/UDP)
+        * @param       $helperInstance         An instance of a HubHelper class
         * @return      void
         */
-       function enqueueRawDataFromTemplate (Helper $helperInstance, $protocol);
+       function enqueueRawDataFromTemplate (HubHelper $helperInstance);
 
        /**
         * Checks whether a package has been enqueued for delivery.
index 55e081b5fcd459d9bad8a231932040967345c5cd..aaef2c387a96411199a1bdf3292be62a5afcca63 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 51d962fa52b547eac49ff371131477f71ceb33bf..d7e6d61f3b2a375afcaad3fa9891333e550be295 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index a1e51816c67e0cf1274d1bd37bd94b1327a181f7..8776131ed5fe191c83a0043f754cff55d3b1a254 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 57cc054471d9b2726a517010b5d71c37ac6fa40b..c09d17ce5b8c522e4850298ed2f41c30f68b7be3 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 79e8a08c41eb82efc8d139a8657e9423bafb90af..badd521df3e3410b3d6fed08738f36b7b7c68641 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 2c61358d104b14e02d94e738b8a13f09fbc6fbce..7ca78f23e3131b561ae3b42af680b534b7ce63ad 100644 (file)
@@ -5,7 +5,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 611fdcc1b9a8d080e5ff4d18bbe971a1596cf971..fe7bda7bcdf9d8a42ccaf504ab165cd168f5004e 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@ship-simu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.ship-simu.org
  *
index 39efebb4f39575fb64e6c2268f043d56d8d79381..9562dcf21de37948e4234959344be9e60b7baa5b 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 70b89f6d30ed9568e8c1eb139b43725a5a8b846e..dc1f1d67fd458a0856a06c57cce6d1274b157be8 100644 (file)
@@ -5,7 +5,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 126aaaf350179457ba66fde5b4ca4c5f275d0fd5..4df02b5bfd3e2a949f09165f73f4cd9b253faba0 100644 (file)
@@ -5,7 +5,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
diff --git a/application/hub/interfaces/protocol/class_ProtocolHandler.php b/application/hub/interfaces/protocol/class_ProtocolHandler.php
deleted file mode 100644 (file)
index d8e8188..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-<?php
-/**
- * An interface for protocol handlers
- *
- * @author             Roland Haeder <webmaster@shipsimu.org>
- * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
- * @license            GNU GPL 3.0 or any newer version
- * @link               http://www.shipsimu.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 ProtocolHandler extends FrameworkInterface {
-       /**
-        * Getter for port number to satify ProtocolHandler
-        *
-        * @return      $port   The port number
-        */
-       function getPort ();
-
-       /**
-        * Getter for protocol
-        *
-        * @return      $protocol       Used protocol
-        */
-       function getProtocol ();
-}
-
-// [EOF]
-?>
index 2a6c03196c1bec468d913e83c2bbd7c68ef97602..eab4a6a69a97bfbb3c7fa3df266c499276984028 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
@@ -23,7 +23,7 @@
  */
 interface Recipient extends FrameworkInterface {
        /**
-        * Tries to resolve given recipient into session ids or ip:port combination
+        * Tries to resolve given recipient into session ids or Universal Node Locator
         * depending on implementation (hint: Template Method Pattern)
         *
         * @param       $recipient              Recipient to resolve (e.g. could be a virtual recipient or direct session id)
diff --git a/application/hub/interfaces/resolver/.htaccess b/application/hub/interfaces/resolver/.htaccess
new file mode 100644 (file)
index 0000000..3a42882
--- /dev/null
@@ -0,0 +1 @@
+Deny from all
diff --git a/application/hub/interfaces/resolver/class_ProtocolResolver.php b/application/hub/interfaces/resolver/class_ProtocolResolver.php
new file mode 100644 (file)
index 0000000..84bc584
--- /dev/null
@@ -0,0 +1,36 @@
+OS<?php
+/**
+ * An interface for ProtocolResolvers
+ *
+ * @author             Roland Haeder <webmaster@shipsimu.org>
+ * @version            0.0.0
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
+ * @license            GNU GPL 3.0 or any newer version
+ * @link               http://www.shipsimu.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 ProtocolResolver extends FrameworkInterface {
+       /**
+        * Returns an command instance for a given NodeHelper instance or null if it
+        * was not found.
+        *
+        * @param       $nodeInstance   An instance of a NodeHelper class
+        * @return      $unlInstance    An instance of a LocateableNode class
+        */
+       function resolveUniversalResourceLocatorFromNodeHelper (NodeHelper $nodeInstance);
+}
+
+// [EOF]
+?>
index 7d697a0690dba5220918dc526dc8d7e92eb55874..a96833fc2fbae3ad7db342246a01d79863427d05 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 9db1ca9b44bb600693e4a33af846ded047af48b1..1f40a0ea1384b3a73e6e7d63dc5e075407a08b68 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index d66de7af609b455c5bdebbcd3086a757e710c60a..7292653507524fefb7273940a83218ad00183034 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 2c25a214b197d3353edd56d35d0c800bfcd47d84..fe03c22f1a18157f49aa108c8796cd2a29c039c8 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 19bba42a4fb617381ad734456f2c730d8989da79..e95634b5c318788067200b97ffc0d1c2709ed84a 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 2a323f6ea03e4a7c7637f9553c9b4188a627b9c2..aa79e77ae6b2b1711ca78f1db17fc07345e09d0d 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@ship-simu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.ship-simu.org
  *
index f8fb9bd7cdd19365d77c0e35596140713aaab664..2093a30cfb30a1d06f606713ad71b8c58ed70329 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index b1dafe9b7cc96ec220973429825adee7963f53ba..c1be593938f084ecc42eb31235b6e10b1e9519a4 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 5e11f72e8c319275c319ba2f6808b5081423ab86..ce3488e797becaad04741af282da2dd0b1e6e92c 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 7133b442e38a6191f39d9a094f905bddcf5494cd..0a3f2332caca9944c3a852e7b43211f194cd0fa6 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 98000f5c7944fbf7fc3acbc04834a6ef509fd267..4d8b6ec0bb2a1cbf029932ccc51bdc5d27c2945b 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
@@ -26,7 +26,7 @@ interface Tagable extends FrameworkInterface {
         * Chooses the right protocol from given package data
         *
         * @param       $packageData    Raw package data
-        * @return      $protocolName   Name of the choosen procotol
+        * @return      $protocolInstance       An instance of a ProtocolHandler class
         */
        function chooseProtocolFromPackageData (array $packageData);
 
index 257d2c53bc14ee3d1b39b9bab047dc26353f1981..1d9e978d1217320ddb1fd4396f83365cd5843ab1 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 6124fbaaf39a643602861e80ab3bd3de70c5b67a..fac2743a762890c9add701f3978901433ea372a1 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 96ba0dd55645a93261bac6c7fbe2b7d9866a4fbf..d61cdaeccbd817f8d4e4c91202b9fbf05fe20e88 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index fffcdab6e3ea175b40df769470b9815bcdd4164a..7f02641b4ce0e132606445ab71eacb9f94b71ac9 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 37f8ec73d8a7e5be382da60e2374e9711ce52903..972b2cd7f501e7b7d897bc5237a4b070ddb1c4e6 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 3f4b4a1128adac42cc4523760da18320ece1f5b3..92f08be51640723897dedcada627c4f9640a56c3 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 392b05e3cefde7e7753636a422be8cda19e3ae64..f2efac2330ca76bd065e85ece1dfd6b9c06aa88e 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index bfc92144ca010182bfc730f593a2d669beeb635f..e2149181edbccd10847d5f11a36423828bdeca61 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 200aa5b8bb6d71ebaed560068f9b75a10c1d60b6..6d6cc4c1cba87b8e379bb57b5094bed7d62a0c3d 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 9b8ba7a8d2fef423cb81ae6a8a2bad1556eb6e57..33a547495b77b9957606b1c00d1e9bc9a09a9ed8 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
@@ -71,20 +71,20 @@ interface NodeDhtWrapper extends DatabaseWrapper {
         * Registeres a node by given message data.
         *
         * @param       $messageData            An array of all message data
-        * @param       $handlerInstance        An instance of a Handleable class
+        * @param       $handlerInstance        An instance of a HandleableDataSet class
         * @return      void
         */
-       function registerNodeByMessageData (array $messageData, Handleable $handlerInstance);
+       function registerNodeByMessageData (array $messageData, HandleableDataSet $handlerInstance);
 
        /**
         * Updates an existing entry in node list
         *
         * @param       $messageData            An array of all message data
-        * @param       $handlerInstance        An instance of a Handleable class
+        * @param       $handlerInstance        An instance of a HandleableDataSet class
         * @param       $searchInstance         An instance of LocalSearchCriteria class
         * @return      void
         */
-       function updateNodeByMessageData (array $messageData, Handleable $handlerInstance, LocalSearchCriteria $searchInstance);
+       function updateNodeByMessageData (array $messageData, HandleableDataSet $handlerInstance, LocalSearchCriteria $searchInstance);
 
        /**
         * Determines whether the given node data is already inserted in the DHT
index 6763cad698c82c51d1fbe61cb169354fb4c86fc5..a33011c4c8ba1006cfce1d5e416e6a22eb88fe02 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 2e65190498c6ac89910278c17c0692b90a9104fa..29206eaf352291e0845bd57c36c3ec985434ba58 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 0bfd5ec63478d2c42b12306bf3c2505692f71eed..81bdc7ad728147c4954e8c8fa004f3be3fcc89e3 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0
- * @copyright  Copyright (c) 2007 - 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007 - 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  *
  * This program is free software: you can redistribute it and/or modify
index f575db81699c7983ce2d2f373528214562aeb7f4..f46f29370ef68a612afdd5be753200524f9e4452 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@ship-simu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.ship-simu.org
  *
index 9c9b78c8828dd08553c5a3b01a0b148ab7ae9a31..27032e71e0d4044d6a8df8d97aa4fa845db4bcb1 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@ship-simu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.ship-simu.org
  *
index 53e61a3846a9204f3149305757717a8fbf895451..9dcf4dc40a88a385ee56ea722b651554c61448e7 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@ship-simu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.ship-simu.org
  *
index 22bb43224f3cfbdc973fd5076f3a80d701c2d0a7..71bae7680e53302c979c6e3df942e94b6cedd3d9 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Core Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Core Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index c665c8e3bb0a605ac8beadb849ca1c1dc02fc8f9..86865221a13e746b7742f6a036edbeec9000c43f 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@ship-simu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.ship-simu.org
  *
index 2df8404ecb16fd3bf8cd09a242caa3f8569d2ad8..534d10dd85b6cd802ae2712e695fe34ef9fdd5fd 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@ship-simu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.ship-simu.org
  *
index ad83f7de251cfed72af6a9b0b9c7315a655c4111..58c9dc3eee63847a4802fa42dc9525350c1be535 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
@@ -108,6 +108,11 @@ class BaseHubSystem extends BaseFrameworkSystem {
         */
        private $assemblerInstance = NULL;
 
+       /**
+        * Name of used protocol
+        */
+       private $protocolName = 'invalid';
+
        /**
         * Protected constructor
         *
@@ -432,7 +437,7 @@ class BaseHubSystem extends BaseFrameworkSystem {
        /**
         * Setter for session id
         *
-        * @param       $sessionId              The new session id
+        * @param       $sessionId      The new session id
         * @return      void
         */
        protected final function setSessionId ($sessionId) {
@@ -442,12 +447,31 @@ class BaseHubSystem extends BaseFrameworkSystem {
        /**
         * Getter for session id
         *
-        * @return      $sessionId              Current session id
+        * @return      $sessionId      Current session id
         */
        public final function getSessionId () {
                return $this->getConfigInstance()->getConfigEntry('session_id');
        }
 
+       /**
+        * Getter for protocol name
+        *
+        * @return      $protocolName   Name of used protocol
+        */
+       public final function getProtocolName () {
+               return $this->protocolName;
+       }
+
+       /**
+        * Setter for protocol name
+        *
+        * @param       $protocolName   Name of used protocol
+        * @return      void
+        */
+       protected final function setProtocolName ($protocolName) {
+               $this->protocolName = $protocolName;
+       }
+
        /**
         * Constructs a callable method name from given socket error code. If the
         * method is not found, a generic one is used.
index fc8cfa24391a73153fed1d9c4214618372307feb..9a9223d5ddf46ac6a912db2a7ab91baf9775cc38 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index a3afdf6d525fa275a02a45819831955702b010e8..c1c326906c027b656945acfcc018be69ac07f0cc 100644 (file)
@@ -5,7 +5,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 660c0bd676e20c9b7b2feb7d5704708bd98f72bc..a0c09cb464b8614fe0fab1447bb6f1974b2f752f 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 37dc83686a2b08f088b86f2575e2264922deef9c..b12739479d9cd23559055c1c29a4c6b8a0e0ce9e 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@ship-simu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.ship-simu.org
  *
index 7ea767176be950899f206c5814c711c95c4a9529..b0ca7a6d3ae268bfbea67a45e0568fa8db2b8019 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index ce9a11a13bc3659eeeaf31f7e40594be9df5a41a..bdeed7552781f31d678801aca91557c9f1452c9e 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index f81af11b591f44d45496937d53d7577156d9e84d..69efc67dbf07f98b4d90108a7b9663ae31e2d6f1 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 5342bec91f6535e007b5bc71aaf4a8d49aef1704..c09b01be7941a305d4889c85fc27fb74098f341b 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@ship-simu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.ship-simu.org
  *
index 490875a36e995e5cb29f031c343ab2a8f00f32c5..d2deb72fc620d4b13e4644a13a5a6cc01367fde2 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 2a3cc48265b3efaf2bf2dea3e13ff47d54587923..281c51a752fd1716b57ce4cd7450b422f31627d9 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
@@ -162,12 +162,12 @@ class NodeDhtFacade extends BaseDht implements DistributableNode, Registerable {
         * - listen-port (TCP/UDP listen port for inbound connections)
         *
         * @param       $messageArray           An array with all minimum message data
-        * @param       $handlerInstance        An instance of a Handleable class
+        * @param       $handlerInstance        An instance of a HandleableDataSet class
         * @param       $forceUpdate            Optionally force update, don't register (default: register if not found)
         * @return      void
         * @throws      NodeSessionIdVerficationException       If the node was not found and update is forced
         */
-       public function registerNodeByMessageData (array $messageData, Handleable $handlerInstance, $forceUpdate = FALSE) {
+       public function registerNodeByMessageData (array $messageData, HandleableDataSet $handlerInstance, $forceUpdate = FALSE) {
                // Get a search criteria class
                $searchInstance = ObjectFactory::createObjectByConfiguredName('search_criteria_class');
 
@@ -223,13 +223,13 @@ class NodeDhtFacade extends BaseDht implements DistributableNode, Registerable {
         * object types except the node by given session id.
         *
         * @param       $messageData            An array with message data from a node_list request
-        * @param       $handlerInstance        An instance of a Handleable class
+        * @param       $handlerInstance        An instance of a HandleableDataSet class
         * @param       $excludeKey                     Array key which should be excluded
         * @param       $andKey                         Array of $separator-separated list of elements which all must match
         * @param       $separator                      Sepator char (1st parameter for explode() call)
         * @return      $nodeList                       An array with all found nodes
         */
-       public function queryLocalNodeListExceptByMessageData (array $messageData, Handleable $handlerInstance, $excludeKey, $andKey, $separator) {
+       public function queryLocalNodeListExceptByMessageData (array $messageData, HandleableDataSet $handlerInstance, $excludeKey, $andKey, $separator) {
                // Make sure both keys are there
                assert((isset($messageData[$excludeKey])) && (isset($messageData[$andKey])));
 
diff --git a/application/hub/main/discovery/class_ b/application/hub/main/discovery/class_
new file mode 100644 (file)
index 0000000..95ee1f0
--- /dev/null
@@ -0,0 +1,50 @@
+<?php
+/**
+ * A !!! discovery class
+ *
+ * @author             Roland Haeder <webmaster@shipsimu.org>
+ * @version            0.0.0
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Core Developer Team
+ * @license            GNU GPL 3.0 or any newer version
+ * @link               http://www.shipsimu.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 !!!Discovery extends BaseNodeDiscovery implements Discoverable,,,, Registerable {
+       /**
+        * Protected constructor
+        *
+        * @return      void
+        */
+       protected function __construct () {
+               // Call parent constructor
+               parent::__construct(__CLASS__);
+       }
+
+       /**
+        * Create an instance of this class
+        *
+        * @return      $discoveryInstance      An instance of this discovery class
+        */
+       public static final function create!!!Discovery () {
+               // Get an instance of this class
+               $discoveryInstance = new !!!Discovery();
+
+               // Return the prepared instance
+               return $discoveryInstance;
+       }
+}
+
+// [EOF]
+?>
index a608b7b07b16bbd6b84e0634e7b1a5fc46bbde26..9a8db0a27f39f2b9c7405d86d315d3789d7adabc 100644 (file)
@@ -1,10 +1,10 @@
 <?php
 /**
- * A PackageRecipient discovery class
+ * A general node discovery class
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Core Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Core Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
@@ -31,73 +31,6 @@ class BaseNodeDiscovery extends BaseDiscovery implements Discoverable {
        protected function __construct ($className) {
                // Call parent constructor
                parent::__construct($className);
-
-               /*
-                * Get recipients list instance and set it here for all discovery
-                * implementations.
-                */
-               $listInstance = RecipientListFactory::createRecipientListInstance();
-               $this->setListInstance($listInstance);
-       }
-
-       /**
-        * Determines the protoctol name
-        *
-        * @param       $packageData    Valid package data
-        * @return      $protocolName   Name of used protocol (TCP/UDP/etc.)
-        */
-       protected function determineProtocolByPackageData (array $packageData) {
-               // First we need a tags instance
-               $tagsInstance = PackageTagsFactory::createPackageTagsInstance();
-
-               /*
-                * We need to decide here which socket (TCP or UDP) should be used for
-                * the actual data transmission. In this process we will find out if
-                * the recipient of this package has already a known (registered) socket
-                * and if so we can re-use it. If there is no socket registered, we try
-                * to make a new connection (TCP or UDP) to the given IP:port.
-                */
-               $protocolName = $tagsInstance->chooseProtocolFromPackageData($packageData);
-
-               // Return it
-               return $protocolName;
-       }
-
-       /**
-        * "Getter" for recipient iterator
-        *
-        * @return$iteratorInstance An instance of a Iterateable object
-        */
-       public final function getIterator () {
-               // Get iterator from it
-               $iteratorInstance = $this->getListInstance()->getIterator();
-
-               // Return it
-               return $iteratorInstance;
-       }
-
-       /**
-        * Clears all recipients for e.g. another package to deliver. This method
-        * simply clears the inner list instance.
-        *
-        * @return      void
-        */
-       public final function clearRecipients () {
-               // Clear the list
-               $this->getListInstance()->clearList();
-       }
-
-       /**
-        * Checks whether the recipient list is empty
-        *
-        * @return      $isEmpty        Whether the recipient list is empty
-        */
-       public final function isRecipientListEmpty () {
-               // Check it ...
-               $isEmpty = ($this->getListInstance()->count() == 0);
-
-               // Return it
-               return $isEmpty;
        }
 }
 
diff --git a/application/hub/main/discovery/dht/.htaccess b/application/hub/main/discovery/dht/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
diff --git a/application/hub/main/discovery/dht/class_DhtRecipientDiscovery.php b/application/hub/main/discovery/dht/class_DhtRecipientDiscovery.php
deleted file mode 100644 (file)
index 35809b6..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-<?php
-/**
- * A DhtRecipient discovery class
- *
- * @author             Roland Haeder <webmaster@shipsimu.org>
- * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Core Developer Team
- * @license            GNU GPL 3.0 or any newer version
- * @link               http://www.shipsimu.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 DhtRecipientDiscovery extends BaseNodeDiscovery implements DiscoverableDhtRecipient, Registerable {
-       /**
-        * Protected constructor
-        *
-        * @return      void
-        */
-       protected function __construct () {
-               // Call parent constructor
-               parent::__construct(__CLASS__);
-       }
-
-       /**
-        * Create an instance of this class
-        *
-        * @return      $discoveryInstance      An instance of this discovery class
-        */
-       public static final function createDhtRecipientDiscovery () {
-               // Get an instance of this class
-               $discoveryInstance = new DhtRecipientDiscovery();
-
-               // Get a DHT instance
-               $dhtInstance = DhtObjectFactory::createDhtInstance('node');
-
-               // Set it here
-               $discoveryInstance->setDhtInstance($dhtInstance);
-
-               // Return the prepared instance
-               return $discoveryInstance;
-       }
-
-       /**
-        * Resolves one or more recipients for a DHT transfer by given package data.
-        *
-        * @param       $packageData    Valid package data array
-        * @return      $recipients             An indexed array with DHT recipients
-        */
-       public function resolveRecipientsByPackageData (array $packageData) {
-               // Use facade to get recipients back
-               $recipients = $this->getDhtInstance()->findRecipientsByPackageData($packageData);
-
-               // Return it
-               return $recipients;
-       }
-}
-
-// [EOF]
-?>
diff --git a/application/hub/main/discovery/node/.htaccess b/application/hub/main/discovery/node/.htaccess
new file mode 100644 (file)
index 0000000..3a42882
--- /dev/null
@@ -0,0 +1 @@
+Deny from all
diff --git a/application/hub/main/discovery/node/class_UniversalNodeLocatorDiscovery.php b/application/hub/main/discovery/node/class_UniversalNodeLocatorDiscovery.php
new file mode 100644 (file)
index 0000000..8011b3a
--- /dev/null
@@ -0,0 +1,68 @@
+<?php
+/**
+ * A UniversalNodeLocator discovery class
+ *
+ * @author             Roland Haeder <webmaster@shipsimu.org>
+ * @version            0.0.0
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Core Developer Team
+ * @license            GNU GPL 3.0 or any newer version
+ * @link               http://www.shipsimu.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 UniversalNodeLocatorDiscovery extends BaseNodeDiscovery implements DiscoverableUniversalNodeLocator, Registerable {
+       /**
+        * Protected constructor
+        *
+        * @return      void
+        */
+       protected function __construct () {
+               // Call parent constructor
+               parent::__construct(__CLASS__);
+       }
+
+       /**
+        * Create an instance of this class
+        *
+        * @return      $discoveryInstance      An instance of this discovery class
+        */
+       public static final function createUniversalNodeLocatorDiscovery () {
+               // Get an instance of this class
+               $discoveryInstance = new UniversalNodeLocatorDiscovery();
+
+               // Return the prepared instance
+               return $discoveryInstance;
+       }
+
+       /**
+        * "Discovers" an instance of a LocateableNode class for given NodeHelper class
+        *
+        * @param       $nodeInstance   An instance of a NodeHelper class
+        * @return      $unlInstance    An instance of a LocateableNode class
+        */
+       public function discoverUniversalNodeLocatorByNode (NodeHelper $nodeInstance) {
+               /*
+                * First get an instance from the configured hub communication protocol
+                * type (which is mostly TCP, so you get a TcpProtocolResolver here).
+                */
+               $resolverInstance = ProtocolResolverFactory::createResolverFromConfiguredProtocol();
+
+               // Then resolve the node instance into an UNL instance
+               $unlInstance = $resolverInstance->resolveUniversalResourceLocatorFromNodeHelper($nodeInstance);
+               die(__METHOD__ . ':unlInstance=' . print_r($unlInstance, TRUE));
+       }
+}
+
+// [EOF]
+?>
diff --git a/application/hub/main/discovery/package/.htaccess b/application/hub/main/discovery/package/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
diff --git a/application/hub/main/discovery/package/class_PackageRecipientDiscovery.php b/application/hub/main/discovery/package/class_PackageRecipientDiscovery.php
deleted file mode 100644 (file)
index 724ff60..0000000
+++ /dev/null
@@ -1,120 +0,0 @@
-<?php
-/**
- * A PackageRecipient discovery class
- *
- * @author             Roland Haeder <webmaster@shipsimu.org>
- * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Core Developer Team
- * @license            GNU GPL 3.0 or any newer version
- * @link               http://www.shipsimu.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 PackageRecipientDiscovery extends BaseNodeDiscovery implements DiscoverableNodeRecipient, Registerable {
-       /**
-        * Protected constructor
-        *
-        * @return      void
-        */
-       protected function __construct () {
-               // Call parent constructor
-               parent::__construct(__CLASS__);
-       }
-
-       /**
-        * Create an instance of this class
-        *
-        * @return      $discoveryInstance      An instance of this discovery class
-        */
-       public static final function createPackageRecipientDiscovery () {
-               // Get an instance of this class
-               $discoveryInstance = new PackageRecipientDiscovery();
-
-               // Return the prepared instance
-               return $discoveryInstance;
-       }
-
-       /**
-        * Tries to discover all recipients for given package data
-        *
-        * @param       $packageData    Raw package data array
-        * @return      void
-        */
-       public function discoverRecipients (array $packageData) {
-               // This must be available
-               //* DEBUG: */ print $this->__toString() . ': packageData=' . print_r($packageData, TRUE);
-               assert(isset($packageData[NetworkPackage::PACKAGE_DATA_RECIPIENT]));
-
-               // First try out the direct recipient (session id)
-               try {
-                       // Get instance (should not break)
-                       $recipientInstance = ObjectFactory::createObjectByConfiguredName('direct_recipient_class');
-
-                       // Try to solve it
-                       $recipientInstance->resolveRecipient($packageData[NetworkPackage::PACKAGE_DATA_RECIPIENT], $this->getListInstance(), $packageData);
-               } catch (FrameworkException $e) {
-                       // Didn't work, so try the non-generic, depending recipient field itself (this may fail)
-                       try {
-                               // Try to find the right class
-                               $recipientInstance = ObjectFactory::createObjectByConfiguredName(strtolower($packageData[NetworkPackage::PACKAGE_DATA_RECIPIENT]) . '_recipient_class');
-
-                               // And try to solve again
-                               $recipientInstance->resolveRecipient($packageData[NetworkPackage::PACKAGE_DATA_RECIPIENT], $this->getListInstance(), $packageData);
-                       } catch (FrameworkException $e) {
-                               // Could not find class, what ever failed
-                               $this->debugInstance($e->getMessage());
-                       }
-               }
-       }
-
-       /**
-        * Tries to discover all recipients by given decoded package data.
-        *
-        * @param       $decodedData    Raw raw package data array
-        * @return      void
-        * @todo        Add some validation of recipient field, e.g. ip:port is found
-        * @todo        The if() does only check for TCP, not UDP, e.g. try to get a $handlerInstance here
-        */
-       public function discoverRawRecipients (array $decodedData) {
-               // This must be available
-               assert(isset($decodedData[NetworkPackage::PACKAGE_DATA_RECIPIENT]));
-
-               // First clear all recipients
-               $this->clearRecipients();
-
-               // Explode 'recipient', first element is the IP/hostname
-               $recipient = explode(':', $decodedData[NetworkPackage::PACKAGE_DATA_RECIPIENT]);
-
-               // Is the 'recipient' field same as this peer's IP?
-               if ((($recipient[0] == HubTools::determineOwnExternalIp()) && ($recipient[1] == $this->getConfigInstance()->getConfigEntry('node_listen_port'))) || ($recipient[0] == $this->getConfigInstance()->getServerAddress())) {
-                       /*
-                        * Is same as own external IP + TCP/UDP listen port or internal IP, don't do anything here so other
-                        * classes found an empty recipient list for internal (own) handling
-                        * of the original content.
-                        */
-
-                       // Debug output (may flood)
-                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('RECIPIENT-DISCOVERY[' . __METHOD__ . ':' . __LINE__ . ']: Recipient ' . $recipient[0] . ' matches own ip (' .  HubTools::determineOwnExternalIp() . ' or ' . $this->getConfigInstance()->getServerAddress() . ')');
-               } else {
-                       // Debug output (may flood)
-                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('RECIPIENT-DISCOVERY[' . __METHOD__ . ':' . __LINE__ . ']: Recipient ' . $recipient[0] . ' is different than own external ip (' .  HubTools::determineOwnExternalIp() . ') nor internal ip (' . $this->getConfigInstance()->getServerAddress() . '), need to forward (not yet implemented)!');
-
-                       // This package is to be delivered to someone else, so add it
-                       $this->getListInstance()->addEntry('ip_port', $decodedData[NetworkPackage::PACKAGE_DATA_RECIPIENT]);
-               }
-       }
-}
-
-// [EOF]
-?>
diff --git a/application/hub/main/discovery/recipient/.htaccess b/application/hub/main/discovery/recipient/.htaccess
new file mode 100644 (file)
index 0000000..3a42882
--- /dev/null
@@ -0,0 +1 @@
+Deny from all
diff --git a/application/hub/main/discovery/recipient/class_ b/application/hub/main/discovery/recipient/class_
new file mode 100644 (file)
index 0000000..bd90342
--- /dev/null
@@ -0,0 +1,50 @@
+<?php
+/**
+ * A !!! recipient discovery class
+ *
+ * @author             Roland Haeder <webmaster@shipsimu.org>
+ * @version            0.0.0
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Core Developer Team
+ * @license            GNU GPL 3.0 or any newer version
+ * @link               http://www.shipsimu.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 !!!RecipientDiscovery extends BaseRecipientDiscovery implements Discoverable,,,Recipient, Registerable {
+       /**
+        * Protected constructor
+        *
+        * @return      void
+        */
+       protected function __construct () {
+               // Call parent constructor
+               parent::__construct(__CLASS__);
+       }
+
+       /**
+        * Create an instance of this class
+        *
+        * @return      $discoveryInstance      An instance of this discovery class
+        */
+       public static final function create!!!Discovery () {
+               // Get an instance of this class
+               $discoveryInstance = new !!!Discovery();
+
+               // Return the prepared instance
+               return $discoveryInstance;
+       }
+}
+
+// [EOF]
+?>
diff --git a/application/hub/main/discovery/recipient/class_BaseRecipientDiscovery.php b/application/hub/main/discovery/recipient/class_BaseRecipientDiscovery.php
new file mode 100644 (file)
index 0000000..a9741d9
--- /dev/null
@@ -0,0 +1,105 @@
+<?php
+/**
+ * A PackageRecipient discovery class
+ *
+ * @author             Roland Haeder <webmaster@shipsimu.org>
+ * @version            0.0.0
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Core Developer Team
+ * @license            GNU GPL 3.0 or any newer version
+ * @link               http://www.shipsimu.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 BaseRecipientDiscovery extends BaseRecipientDiscovery implements DiscoverableRecipient {
+       /**
+        * Protected constructor
+        *
+        * @param       $className      Real class name
+        * @return      void
+        */
+       protected function __construct ($className) {
+               // Call parent constructor
+               parent::__construct($className);
+
+               /*
+                * Get recipients list instance and set it here for all discovery
+                * implementations.
+                */
+               $listInstance = RecipientListFactory::createRecipientListInstance();
+               $this->setListInstance($listInstance);
+       }
+
+       /**
+        * Determines the protoctol name
+        *
+        * @param       $packageData            Valid package data
+        * @return      $protocolInstance       An instance of a ProtocolHandler class
+        */
+       protected function determineProtocolByPackageData (array $packageData) {
+               // First we need a tags instance
+               $tagsInstance = PackageTagsFactory::createPackageTagsInstance();
+
+               /*
+                * We need to decide here which socket (TCP or UDP) should be used for
+                * the actual data transmission. In this process we will find out if
+                * the recipient of this package has already a known (registered) socket
+                * and if so we can re-use it. If there is no socket registered, we try
+                * to make a new connection to the given Universal Node Locator.
+                */
+               $protocolInstance = $tagsInstance->chooseProtocolFromPackageData($packageData);
+
+               // Return it
+               return $protocolInstance;
+       }
+
+       /**
+        * "Getter" for recipient iterator
+        *
+        * @return$iteratorInstance An instance of a Iterateable object
+        */
+       public final function getIterator () {
+               // Get iterator from it
+               $iteratorInstance = $this->getListInstance()->getIterator();
+
+               // Return it
+               return $iteratorInstance;
+       }
+
+       /**
+        * Clears all recipients for e.g. another package to deliver. This method
+        * simply clears the inner list instance.
+        *
+        * @return      void
+        */
+       public final function clearRecipients () {
+               // Clear the list
+               $this->getListInstance()->clearList();
+       }
+
+       /**
+        * Checks whether the recipient list is empty
+        *
+        * @return      $isEmpty        Whether the recipient list is empty
+        */
+       public final function isRecipientListEmpty () {
+               // Check it ...
+               $isEmpty = ($this->getListInstance()->count() == 0);
+
+               // Return it
+               return $isEmpty;
+       }
+}
+
+// [EOF]
+?>
diff --git a/application/hub/main/discovery/recipient/dht/.htaccess b/application/hub/main/discovery/recipient/dht/.htaccess
new file mode 100644 (file)
index 0000000..3a42882
--- /dev/null
@@ -0,0 +1 @@
+Deny from all
diff --git a/application/hub/main/discovery/recipient/dht/class_DhtRecipientDiscovery.php b/application/hub/main/discovery/recipient/dht/class_DhtRecipientDiscovery.php
new file mode 100644 (file)
index 0000000..5fe1bee
--- /dev/null
@@ -0,0 +1,70 @@
+<?php
+/**
+ * A DhtRecipient discovery class
+ *
+ * @author             Roland Haeder <webmaster@shipsimu.org>
+ * @version            0.0.0
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Core Developer Team
+ * @license            GNU GPL 3.0 or any newer version
+ * @link               http://www.shipsimu.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 DhtRecipientDiscovery extends BaseRecipientDiscovery implements DiscoverableDhtRecipient, Registerable {
+       /**
+        * Protected constructor
+        *
+        * @return      void
+        */
+       protected function __construct () {
+               // Call parent constructor
+               parent::__construct(__CLASS__);
+       }
+
+       /**
+        * Create an instance of this class
+        *
+        * @return      $discoveryInstance      An instance of this discovery class
+        */
+       public static final function createDhtRecipientDiscovery () {
+               // Get an instance of this class
+               $discoveryInstance = new DhtRecipientDiscovery();
+
+               // Get a DHT instance
+               $dhtInstance = DhtObjectFactory::createDhtInstance('node');
+
+               // Set it here
+               $discoveryInstance->setDhtInstance($dhtInstance);
+
+               // Return the prepared instance
+               return $discoveryInstance;
+       }
+
+       /**
+        * Resolves one or more recipients for a DHT transfer by given package data.
+        *
+        * @param       $packageData    Valid package data array
+        * @return      $recipients             An indexed array with DHT recipients
+        */
+       public function resolveRecipientsByPackageData (array $packageData) {
+               // Use facade to get recipients back
+               $recipients = $this->getDhtInstance()->findRecipientsByPackageData($packageData);
+
+               // Return it
+               return $recipients;
+       }
+}
+
+// [EOF]
+?>
diff --git a/application/hub/main/discovery/recipient/package/.htaccess b/application/hub/main/discovery/recipient/package/.htaccess
new file mode 100644 (file)
index 0000000..3a42882
--- /dev/null
@@ -0,0 +1 @@
+Deny from all
diff --git a/application/hub/main/discovery/recipient/package/class_PackageRecipientDiscovery.php b/application/hub/main/discovery/recipient/package/class_PackageRecipientDiscovery.php
new file mode 100644 (file)
index 0000000..9fa8fe9
--- /dev/null
@@ -0,0 +1,121 @@
+<?php
+/**
+ * A PackageRecipient discovery class
+ *
+ * @author             Roland Haeder <webmaster@shipsimu.org>
+ * @version            0.0.0
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Core Developer Team
+ * @license            GNU GPL 3.0 or any newer version
+ * @link               http://www.shipsimu.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 PackageRecipientDiscovery extends BaseRecipientDiscovery implements DiscoverableNodeRecipient, Registerable {
+       /**
+        * Protected constructor
+        *
+        * @return      void
+        */
+       protected function __construct () {
+               // Call parent constructor
+               parent::__construct(__CLASS__);
+       }
+
+       /**
+        * Create an instance of this class
+        *
+        * @return      $discoveryInstance      An instance of this discovery class
+        */
+       public static final function createPackageRecipientDiscovery () {
+               // Get an instance of this class
+               $discoveryInstance = new PackageRecipientDiscovery();
+
+               // Return the prepared instance
+               return $discoveryInstance;
+       }
+
+       /**
+        * Tries to discover all recipients for given package data
+        *
+        * @param       $packageData    Raw package data array
+        * @return      void
+        */
+       public function discoverRecipients (array $packageData) {
+               // This must be available
+               //* DEBUG: */ print $this->__toString() . ': packageData=' . print_r($packageData, TRUE);
+               assert(isset($packageData[NetworkPackage::PACKAGE_DATA_RECIPIENT]));
+
+               // First try out the direct recipient (session id)
+               try {
+                       // Get instance (should not break)
+                       $recipientInstance = ObjectFactory::createObjectByConfiguredName('direct_recipient_class');
+
+                       // Try to solve it
+                       $recipientInstance->resolveRecipient($packageData[NetworkPackage::PACKAGE_DATA_RECIPIENT], $this->getListInstance(), $packageData);
+               } catch (FrameworkException $e) {
+                       // Didn't work, so try the non-generic, depending recipient field itself (this may fail)
+                       try {
+                               // Try to find the right class
+                               $recipientInstance = ObjectFactory::createObjectByConfiguredName(strtolower($packageData[NetworkPackage::PACKAGE_DATA_RECIPIENT]) . '_recipient_class');
+
+                               // And try to solve again
+                               $recipientInstance->resolveRecipient($packageData[NetworkPackage::PACKAGE_DATA_RECIPIENT], $this->getListInstance(), $packageData);
+                       } catch (FrameworkException $e) {
+                               // Could not find class, what ever failed
+                               $this->debugInstance($e->getMessage());
+                       }
+               }
+       }
+
+       /**
+        * Tries to discover all recipients by given decoded package data.
+        *
+        * @param       $decodedData    Raw raw package data array
+        * @return      void
+        * @todo        Add some validation of recipient field, e.g. an Universal Node Locator is found
+        * @todo        The if() does only check for TCP, not UDP, e.g. try to get a $handlerInstance here
+        */
+       public function discoverRawRecipients (array $decodedData) {
+               // This must be available
+               die(__METHOD__ . ': Unfinished' . PHP_EOL);
+               assert(isset($decodedData[NetworkPackage::PACKAGE_DATA_RECIPIENT]));
+
+               // First clear all recipients
+               $this->clearRecipients();
+
+               // Explode 'recipient', first element is the IP/hostname
+               $recipient = explode(':', $decodedData[NetworkPackage::PACKAGE_DATA_RECIPIENT]);
+
+               // Is the 'recipient' field same as this peer's IP?
+               if ((($recipient[0] == HubTools::determineOwnExternalIp()) && ($recipient[1] == $this->getConfigInstance()->getConfigEntry('node_listen_port'))) || ($recipient[0] == $this->getConfigInstance()->getServerAddress())) {
+                       /*
+                        * Is same as own external IP + TCP/UDP listen port or internal IP, don't do anything here so other
+                        * classes found an empty recipient list for internal (own) handling
+                        * of the original content.
+                        */
+
+                       // Debug output (may flood)
+                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('RECIPIENT-DISCOVERY[' . __METHOD__ . ':' . __LINE__ . ']: Recipient ' . $recipient[0] . ' matches own ip (' .  HubTools::determineOwnExternalIp() . ' or ' . $this->getConfigInstance()->getServerAddress() . ')');
+               } else {
+                       // Debug output (may flood)
+                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('RECIPIENT-DISCOVERY[' . __METHOD__ . ':' . __LINE__ . ']: Recipient ' . $recipient[0] . ' is different than own external ip (' .  HubTools::determineOwnExternalIp() . ') nor internal ip (' . $this->getConfigInstance()->getServerAddress() . '), need to forward (not yet implemented)!');
+
+                       // This package is to be delivered to someone else, so add it
+                       $this->getListInstance()->addEntry('unl', $decodedData[NetworkPackage::PACKAGE_DATA_RECIPIENT]);
+               }
+       }
+}
+
+// [EOF]
+?>
diff --git a/application/hub/main/discovery/recipient/socket/.htaccess b/application/hub/main/discovery/recipient/socket/.htaccess
new file mode 100644 (file)
index 0000000..3a42882
--- /dev/null
@@ -0,0 +1 @@
+Deny from all
diff --git a/application/hub/main/discovery/recipient/socket/class_PackageSocketDiscovery.php b/application/hub/main/discovery/recipient/socket/class_PackageSocketDiscovery.php
new file mode 100644 (file)
index 0000000..dcb95db
--- /dev/null
@@ -0,0 +1,182 @@
+<?php
+/**
+ * A socket discovery class
+ *
+ * @author             Roland Haeder <webmaster@shipsimu.org>
+ * @version            0.0.0
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Core Developer Team
+ * @license            GNU GPL 3.0 or any newer version
+ * @link               http://www.shipsimu.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 PackageSocketDiscovery extends BaseRecipientDiscovery implements DiscoverableSocket, Registerable {
+       /**
+        * Protected constructor
+        *
+        * @return      void
+        */
+       protected function __construct () {
+               // Call parent constructor
+               parent::__construct(__CLASS__);
+       }
+
+       /**
+        * Create an instance of this class
+        *
+        * @return      $discoveryInstance      An instance of this discovery class
+        */
+       public static final function createPackageSocketDiscovery () {
+               // Get an instance of this class
+               $discoveryInstance = new PackageSocketDiscovery();
+
+               // Output debug message
+               self::createDebugInstance(__CLASS__)->debugOutput('SOCKET-DISCOVERY[' . __METHOD__ . ':' . __LINE__ . ']: Initialized.');
+
+               // Return the prepared instance
+               return $discoveryInstance;
+       }
+
+       /**
+        * Tries to dicover the right listener instance
+        *
+        * @param       $protocolName           Protocol name
+        * @param       $packageData            Raw package data
+        * @return      $listenerInstance       An instance of a Listenable instance or null
+        */
+       public function discoverListenerInstance ($protocolName, array $packageData) {
+               // Debug message
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('SOCKET-DISCOVERY[' . __METHOD__ . ':' . __LINE__ . ']: protocolName=' . $protocolName . ' - ENTERED!');
+
+               /*
+                * Get the listener pool instance, we need to lookup the matching
+                * listener->poolInstance chain there.
+                */
+               $poolInstance = NodeObjectFactory::createNodeInstance()->getListenerPoolInstance();
+
+               // Init listener instance
+               $listenerInstance = NULL;
+
+               /*
+                * Now we need to choose again. It is whether we are speaking with a hub
+                * or with a client. So just handle it over to all listeners in this
+                * pool.
+                */
+               foreach ($poolInstance->getPoolEntriesInstance()->getArrayFromGroup($protocolName) as $listenerInstance) {
+                       // Debug output
+                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('SOCKET-DISCOVERY[' . __METHOD__ . ':' . __LINE__ . ']: protocolName=' . $protocolName . ',listenerInstance=' . $listenerInstance->__toString());
+
+                       // Does the listener want that package?
+                       if ($listenerInstance->ifListenerAcceptsPackageData($packageData)) {
+                               // This listener likes our package data, so abort here
+                               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('SOCKET-DISCOVERY[' . __METHOD__ . ':' . __LINE__ . ']: Listener is accepting package data.');
+                               break;
+                       } // END - if
+
+                       // Debug output
+                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('SOCKET-DISCOVERY[' . __METHOD__ . ':' . __LINE__ . ']: Listener is NOT accepting package data.');
+               } // END - foreach
+
+               // Return it
+               return $listenerInstance;
+       }
+
+       /**
+        * Tries to discover the right socket for given package data and returns a
+        * matching socket resource for that protocol.
+        *
+        * @param       $packageData            Raw package data array
+        * @param       $connectionType         Type of connection, can be 'incoming' or 'outgoing', *NEVER* 'server'!
+        * @return      $socketResource         A valid socket resource or FALSE if an error occured
+        * @throws      NoListGroupException    If the procol group is not found in peer list
+        * @throws      NullPointerException    If listenerInstance is NULL
+        */
+       public function discoverSocket (array $packageData, $connectionType) {
+               // Assert on type
+               assert($connectionType != BaseConnectionHelper::CONNECTION_TYPE_SERVER);
+
+               // Determine protocol name
+               $protocolName = $this->determineProtocolByPackageData($packageData);
+
+               // Is it the same?
+               assert(strtoupper($protocolName) == $packageData[NetworkPackage::PACKAGE_DATA_PROTOCOL]);
+
+               // Get the listener instance
+               $listenerInstance = $this->discoverListenerInstance($protocolName, $packageData);
+
+               // If there is no listener who wants to have that package, we simply drop it here
+               if (is_null($listenerInstance)) {
+                       // Abort with no resource
+                       throw new NullPointerException($this, self::EXCEPTION_IS_NULL_POINTER);
+               } // END - if
+
+               // Debug message
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('protocolName=' . $protocolName . ',packageData=' . print_r($packageData, TRUE));
+
+               /*
+                * Now we have the listener instance, we can determine the right
+                * resource to continue. The first step is to get the attached pool
+                * instance and pass over the whole package data to get the right
+                * socket.
+                */
+               $socketResource = $listenerInstance->getPoolInstance()->getSocketFromPackageData($packageData, $connectionType);
+
+               // Debug message
+               if (is_resource($socketResource)) {
+                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('socketResource[' . gettype($socketResource) . ']=' . $socketResource . ',error=' . socket_strerror(socket_last_error($socketResource)) . ',packageData=' . print_r($packageData, TRUE));
+               } else {
+                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('socketResource[' . gettype($socketResource) . ']=' . $socketResource . ',packageData=' . print_r($packageData, TRUE));
+               }
+
+               // Is it FALSE, the recipient isn't known to us and we have no connection to it
+               if (($socketResource === FALSE) || (!is_resource($socketResource)) || (socket_last_error($socketResource) > 0)) {
+                       // Try to create a new socket resource
+                       try {
+                               // Possibly noisy debug message
+                               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('SOCKET-DISCOVERY[' . __METHOD__ . ':' . __LINE__ . ']: Trying to establish a ' . strtoupper($protocolName) . ' connection to ' . $packageData[NetworkPackage::PACKAGE_DATA_RECIPIENT] . ' ...');
+
+                               // Get a socket resource from our factory (if succeeded)
+                               $socketResource = SocketFactory::createSocketFromPackageData($packageData, $protocolName);
+                       } catch (SocketConnectionException $e) {
+                               // The connection fails of being established, so log it away
+                               self::createDebugInstance(__CLASS__)->debugOutput('SOCKET-DISCOVERY[' . __METHOD__ . ':' . __LINE__ . ']: Caught ' . $e->__toString() . ',message=' . $e->getMessage());
+                       }
+               } // END - if
+
+               // Try to resolve the socket resource
+               try {
+                       // Get the helper instance from registry
+                       $helperInstance = Registry::getRegistry()->getInstance('connection');
+
+                       // Possibly noisy debug message
+                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('SOCKET-DISCOVERY[' . __METHOD__ . ':' . __LINE__ . ']: Going to resolve socket from peer state and given package data ...');
+
+                       // Resolve the peer's state (but ignore return value)
+                       PeerStateResolver::resolveStateByPackage($helperInstance, $packageData, $socketResource);
+               } catch (InvalidSocketException $e) {
+                       // This cannot be fixed, so log it away
+                       self::createDebugInstance(__CLASS__)->debugOutput('SOCKET-DISCOVERY[' . __METHOD__ . ':' . __LINE__ . ']: Cannot discover socket resource for recipient ' . $packageData[NetworkPackage::PACKAGE_DATA_RECIPIENT] . ': ' . $e->getMessage());
+
+                       // Make any failed attempts to 'FALSE'
+                       $socketResource = FALSE;
+               }
+
+               // And return it
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('SOCKET-DISCOVERY[' . __METHOD__ . ':' . __LINE__ . ']: socketResource=' . $socketResource . ',packageData=' . print_r($packageData, TRUE));
+               return $socketResource;
+       }
+}
+
+// [EOF]
+?>
diff --git a/application/hub/main/discovery/socket/.htaccess b/application/hub/main/discovery/socket/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
diff --git a/application/hub/main/discovery/socket/class_PackageSocketDiscovery.php b/application/hub/main/discovery/socket/class_PackageSocketDiscovery.php
deleted file mode 100644 (file)
index 125b68f..0000000
+++ /dev/null
@@ -1,182 +0,0 @@
-<?php
-/**
- * A socket discovery class
- *
- * @author             Roland Haeder <webmaster@shipsimu.org>
- * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Core Developer Team
- * @license            GNU GPL 3.0 or any newer version
- * @link               http://www.shipsimu.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 PackageSocketDiscovery extends BaseNodeDiscovery implements DiscoverableSocket, Registerable {
-       /**
-        * Protected constructor
-        *
-        * @return      void
-        */
-       protected function __construct () {
-               // Call parent constructor
-               parent::__construct(__CLASS__);
-       }
-
-       /**
-        * Create an instance of this class
-        *
-        * @return      $discoveryInstance      An instance of this discovery class
-        */
-       public static final function createPackageSocketDiscovery () {
-               // Get an instance of this class
-               $discoveryInstance = new PackageSocketDiscovery();
-
-               // Output debug message
-               self::createDebugInstance(__CLASS__)->debugOutput('SOCKET-DISCOVERY[' . __METHOD__ . ':' . __LINE__ . ']: Initialized.');
-
-               // Return the prepared instance
-               return $discoveryInstance;
-       }
-
-       /**
-        * Tries to dicover the right listener instance
-        *
-        * @param       $protocolName           Protocol name
-        * @param       $packageData            Raw package data
-        * @return      $listenerInstance       An instance of a Listenable instance or null
-        */
-       public function discoverListenerInstance ($protocolName, array $packageData) {
-               // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('SOCKET-DISCOVERY[' . __METHOD__ . ':' . __LINE__ . ']: protocolName=' . $protocolName . ' - ENTERED!');
-
-               /*
-                * Get the listener pool instance, we need to lookup the matching
-                * listener->poolInstance chain there.
-                */
-               $poolInstance = NodeObjectFactory::createNodeInstance()->getListenerPoolInstance();
-
-               // Init listener instance
-               $listenerInstance = NULL;
-
-               /*
-                * Now we need to choose again. It is whether we are speaking with a hub
-                * or with a client. So just handle it over to all listeners in this
-                * pool.
-                */
-               foreach ($poolInstance->getPoolEntriesInstance()->getArrayFromGroup($protocolName) as $listenerInstance) {
-                       // Debug output
-                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('SOCKET-DISCOVERY[' . __METHOD__ . ':' . __LINE__ . ']: protocolName=' . $protocolName . ',listenerInstance=' . $listenerInstance->__toString());
-
-                       // Does the listener want that package?
-                       if ($listenerInstance->ifListenerAcceptsPackageData($packageData)) {
-                               // This listener likes our package data, so abort here
-                               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('SOCKET-DISCOVERY[' . __METHOD__ . ':' . __LINE__ . ']: Listener is accepting package data.');
-                               break;
-                       } // END - if
-
-                       // Debug output
-                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('SOCKET-DISCOVERY[' . __METHOD__ . ':' . __LINE__ . ']: Listener is NOT accepting package data.');
-               } // END - foreach
-
-               // Return it
-               return $listenerInstance;
-       }
-
-       /**
-        * Tries to discover the right socket for given package data and returns a
-        * matching socket resource for that protocol.
-        *
-        * @param       $packageData            Raw package data array
-        * @param       $connectionType         Type of connection, can be 'incoming' or 'outgoing', *NEVER* 'server'!
-        * @return      $socketResource         A valid socket resource or FALSE if an error occured
-        * @throws      NoListGroupException    If the procol group is not found in peer list
-        * @throws      NullPointerException    If listenerInstance is NULL
-        */
-       public function discoverSocket (array $packageData, $connectionType) {
-               // Assert on type
-               assert($connectionType != BaseConnectionHelper::CONNECTION_TYPE_SERVER);
-
-               // Determine protocol name
-               $protocolName = $this->determineProtocolByPackageData($packageData);
-
-               // Is it the same?
-               assert(strtoupper($protocolName) == $packageData[NetworkPackage::PACKAGE_DATA_PROTOCOL]);
-
-               // Get the listener instance
-               $listenerInstance = $this->discoverListenerInstance($protocolName, $packageData);
-
-               // If there is no listener who wants to have that package, we simply drop it here
-               if (is_null($listenerInstance)) {
-                       // Abort with no resource
-                       throw new NullPointerException($this, self::EXCEPTION_IS_NULL_POINTER);
-               } // END - if
-
-               // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('protocolName=' . $protocolName . ',packageData=' . print_r($packageData, TRUE));
-
-               /*
-                * Now we have the listener instance, we can determine the right
-                * resource to continue. The first step is to get the attached pool
-                * instance and pass over the whole package data to get the right
-                * socket.
-                */
-               $socketResource = $listenerInstance->getPoolInstance()->getSocketFromPackageData($packageData, $connectionType);
-
-               // Debug message
-               if (is_resource($socketResource)) {
-                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('socketResource[' . gettype($socketResource) . ']=' . $socketResource . ',error=' . socket_strerror(socket_last_error($socketResource)) . ',packageData=' . print_r($packageData, TRUE));
-               } else {
-                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('socketResource[' . gettype($socketResource) . ']=' . $socketResource . ',packageData=' . print_r($packageData, TRUE));
-               }
-
-               // Is it FALSE, the recipient isn't known to us and we have no connection to it
-               if (($socketResource === FALSE) || (!is_resource($socketResource)) || (socket_last_error($socketResource) > 0)) {
-                       // Try to create a new socket resource
-                       try {
-                               // Possibly noisy debug message
-                               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('SOCKET-DISCOVERY[' . __METHOD__ . ':' . __LINE__ . ']: Trying to establish a ' . strtoupper($protocolName) . ' connection to ' . $packageData[NetworkPackage::PACKAGE_DATA_RECIPIENT] . ' ...');
-
-                               // Get a socket resource from our factory (if succeeded)
-                               $socketResource = SocketFactory::createSocketFromPackageData($packageData, $protocolName);
-                       } catch (SocketConnectionException $e) {
-                               // The connection fails of being established, so log it away
-                               self::createDebugInstance(__CLASS__)->debugOutput('SOCKET-DISCOVERY[' . __METHOD__ . ':' . __LINE__ . ']: Caught ' . $e->__toString() . ',message=' . $e->getMessage());
-                       }
-               } // END - if
-
-               // Try to resolve the socket resource
-               try {
-                       // Get the helper instance from registry
-                       $helperInstance = Registry::getRegistry()->getInstance('connection');
-
-                       // Possibly noisy debug message
-                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('SOCKET-DISCOVERY[' . __METHOD__ . ':' . __LINE__ . ']: Going to resolve socket from peer state and given package data ...');
-
-                       // Resolve the peer's state (but ignore return value)
-                       PeerStateResolver::resolveStateByPackage($helperInstance, $packageData, $socketResource);
-               } catch (InvalidSocketException $e) {
-                       // This cannot be fixed, so log it away
-                       self::createDebugInstance(__CLASS__)->debugOutput('SOCKET-DISCOVERY[' . __METHOD__ . ':' . __LINE__ . ']: Cannot discover socket resource for recipient ' . $packageData[NetworkPackage::PACKAGE_DATA_RECIPIENT] . ': ' . $e->getMessage());
-
-                       // Make any failed attempts to 'FALSE'
-                       $socketResource = FALSE;
-               }
-
-               // And return it
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('SOCKET-DISCOVERY[' . __METHOD__ . ':' . __LINE__ . ']: socketResource=' . $socketResource . ',packageData=' . print_r($packageData, TRUE));
-               return $socketResource;
-       }
-}
-
-// [EOF]
-?>
index 2a33c07ed24026c56f3ca3b1e4f5856a40a1886e..579c7293e4883f68f85ee289bbb9cb5626c1e3a4 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 868a1cf6daa341440b5c42c2ddc7ad24ae77f2d9..b3f756aab7b052fe6187c09e0b92ec2a59cd2c92 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 71a957b15d43ed698a6bbe36cb05448afe1cc450..ee3559981d693cb3708cc446ff01a093bf121f05 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@ship-simu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.ship-simu.org
  *
index 11f35a8bbf6428534c1113237713397aed2690db..2439257480cad660ee0e3f5f41805ce70cfd606d 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index b6ff858bb5965208097ff66715333360b3b29be2..1ceec26cba5808e9b0659f3f00cff3e675ff6da8 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 03401299a04d22fab4b842244f6d862331efaa41..79ad5e07da53aa16e2b89bd03ec7b17a3adfd7ed 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 4feb19d1543256ebe8dfd3dd95f479f988bbaa2e..2deec66b2256d98708ad064f7c6723a7df7453cb 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index f7e5832df862f3ba6c2c9fef13eaed034af3094a..6955bd0a4f1ef49d3e684b42825ee5c6e0efe835 100644 (file)
@@ -34,24 +34,27 @@ class ProtocolHandlerFactory extends ObjectFactory {
        }
 
        /**
-        * Returns a singleton protocol handler instance. If an instance is
-        * found in registry, it will be returned, else a new instance is created
-        * and stored in the same registry entry.
+        * Returns a singleton protocol handler instance from given HubHelper
+        * instance. If an instance is found in registry, it will be returned, else
+        * a new instance is created and stored in the same registry entry.
         *
-        * @param       $messageType            Protocol to create an object from
+        * @param       $helperInstance         An instance of a HubHelper class
         * @return      $handlerInstance        A protocol handler instance
         */
-       public static final function createProtocolHandlerInstance ($messageType) {
+       public static final function createProtocolHandlerFromRecipientHelper (HubHelper $helperInstance) {
+               // Get the protocol type from given helper instance
+               die(__METHOD__ . ':' . print_r($helperInstance, TRUE));
+
                // Do we have an instance in the registry?
-               if (Registry::getRegistry()->instanceExists($messageType . '_protocol_handler')) {
+               if (Registry::getRegistry()->instanceExists($protocolType . '_protocol_handler')) {
                        // Then use this instance
-                       $handlerInstance = Registry::getRegistry()->getInstance($messageType . '_protocol_handler');
+                       $handlerInstance = Registry::getRegistry()->getInstance($protocolType . '_protocol_handler');
                } else {
                        // Now prepare the tags instance
-                       $handlerInstance = self::createObjectByConfiguredName($messageType . '_protocol_handler_class');
+                       $handlerInstance = self::createObjectByConfiguredName($protocolType . '_protocol_handler_class');
 
                        // Set the instance in registry for further use
-                       Registry::getRegistry()->addInstance($messageType . '_protocol_handler', $handlerInstance);
+                       Registry::getRegistry()->addInstance($protocolType . '_protocol_handler', $handlerInstance);
                }
 
                // Return the instance
index ea2bd7631854b5907ca6e7411240fab3b309b410..02d95a6757c3a94e0cffaf2ff4f94c63441543f9 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 966822bc2ef3c72d5e1c5dd2b20ec95182a1d09a..64386e741cd982602323dcd74b0cf143e877ae94 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@ship-simu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.ship-simu.org
  *
index a588924971cf45a1f482ed844297cc8e0c940dce..c1d9b73ebf7d33f51f9332af8efe5b8d07bf2449 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 8fbaa246bcb50c7862e252c0228e4b3575e6c3a2..6c4817f6b31272eceec756d3baade22d23437c95 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 71811d6733faa5d94947cdd96f4a74499bb47b1e..e89b30341c02fcea481e6f84ba3256a849a611d5 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index d936f9e56b5fc6eec2ce577bb18dc6b8a0c1ae6a..ea82b64beec43c206432881c2b149aea2d86679e 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index b6c01765609ccdc6e0231b15793c549622183101..ac28c5052ba5dcd094d313e100b33dbd09df988e 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
diff --git a/application/hub/main/factories/resolver/.htaccess b/application/hub/main/factories/resolver/.htaccess
new file mode 100644 (file)
index 0000000..3a42882
--- /dev/null
@@ -0,0 +1 @@
+Deny from all
diff --git a/application/hub/main/factories/resolver/class_ProtocolResolverFactory.php b/application/hub/main/factories/resolver/class_ProtocolResolverFactory.php
new file mode 100644 (file)
index 0000000..92d9ea1
--- /dev/null
@@ -0,0 +1,62 @@
+<?php
+/**
+ * A factory class for ProtocolResolver
+ *
+ * @author             Roland Haeder <webmaster@ship-simu.org>
+ * @version            0.0.0
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 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 ProtocolResolverFactory extends ObjectFactory {
+       /**
+        * Protected constructor
+        *
+        * @return      void
+        */
+       protected function __construct () {
+               // Call parent constructor
+               parent::__construct(__CLASS__);
+       }
+
+       /**
+        * Returns a singleton (registry-based) ProtocolResolver instance
+        *
+        * @return      $resolverInstance       An instance of a ProtocolResolver class
+        */
+       public static final function createResolverFromConfiguredProtocol () {
+               // Get the configured protocol
+               $protocolName = FrameworkConfiguration::getSelfInstance()->getConfigEntry('hub_communication_protocol_type');
+
+               // If there is no handler?
+               if (Registry::getRegistry()->instanceExists($protocolName . '_protocol_resolver')) {
+                       // Get handler from registry
+                       $resolverInstance = Registry::getRegistry()->getInstance($protocolName . '_protocol_resolver');
+               } else {
+                       // Get the handler instance
+                       $resolverInstance = self::createObjectByConfiguredName($protocolName . '_protocol_resolver_class');
+
+                       // Add it to the registry
+                       Registry::getRegistry()->addInstance($protocolName . '_protocol_resolver', $resolverInstance);
+               }
+
+               // Return the instance
+               return $resolverInstance;
+       }
+}
+
+// [EOF]
+?>
index c92d3bc32bd834805621b8620af356fc96c73c95..839de1a69303be6edfa69952124eb6a880b0551f 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@ship-simu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.ship-simu.org
  *
index c319eefeab703ecfc536af537d0ffa6b091c836f..9a1973d083cfdb498a82104a06b34b5cf5cee4bf 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Core Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Core Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  * @todo               Find an interface for hub helper
@@ -37,15 +37,15 @@ class SocketFactory extends ObjectFactory {
         * Creates a valid socket resource from given packae data and protocol
         *
         * @param       $packageData            Raw package data
-        * @param       $protocolName           Protocol name (TCP/UDP)
+        * @param       $protocolInstance       An instance of a ProtocolHandler class
         * @return      $socketResource         Socket resource
         */
-       public static function createSocketFromPackageData (array $packageData, $protocolName) {
+       public static function createSocketFromPackageData (array $packageData, ProtocolHandler $protocolInstance) {
                // Get an instance
                $factoryInstance = new SocketFactory();
 
                // Construct registry key
-               $registryKey = 'socket_' . $protocolName . '_' . $packageData[NetworkPackage::PACKAGE_DATA_RECIPIENT];
+               $registryKey = 'socket_' . $protocolInstance->getProtocolName() . '_' . $packageData[NetworkPackage::PACKAGE_DATA_RECIPIENT];
 
                // Debug message
                //*NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('SOCKET-FACTORY[' . __METHOD__ . ':' . __LINE__ . ']: Trying to find a socket with registryKey=' . $registryKey);
@@ -62,7 +62,7 @@ class SocketFactory extends ObjectFactory {
                        //*NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('SOCKET-FACTORY[' . __METHOD__ . ':' . __LINE__ . ']: Using socket ' . $socketResource . '(' . gettype($socketResource) . ') from registry.');
                } else {
                        // Construct configuration entry for object factory and get it
-                       $className = FrameworkConfiguration::getSelfInstance()->getConfigEntry($protocolName . '_connection_helper_class');
+                       $className = FrameworkConfiguration::getSelfInstance()->getConfigEntry($protocolInstance->getProtocolName() . '_connection_helper_class');
 
                        // Debug message
                        //*NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('SOCKET-FACTORY[' . __METHOD__ . ':' . __LINE__ . ']: Going to use class ' . $className . ' for creating a socket resource ...');
index 06ae52ce39eff3aef4699aa991d64c93b258f3a3..a89d9cae8cc2e32ed697481e16b27c5dc48b49ad 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 42b6056296989cbe82a11452b8c2f09dca52189d..7e947c00fd8ee28693905486e8fce3625ce94ed0 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@ship-simu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.ship-simu.org
  *
index 4685dc84f052728345609db51e5ebea9e565d37e..ed9e027e9cd89463015022bf5a924d8f443d7ae1 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index deeadfb7d48a345bfdab0ed635aa6c752a5f214f..7ce80192547ad3e93f9708bdcfaf445f35bdf2c8 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index af03fa071187d7ae6d509d087d43ff39c1cfa634..82ab0a466bee373e9b96330f1f4a86d7af62ba8d 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 3db2305655e7ddb0f75a11954acd0cf44f927ef8..6393a395671170104def5f2708292a87d761a69b 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 3cf893fd64ec9c9288f23840b6c3a39041f6c41d..003a921eb738bae508e053db9c3bfcddff69832c 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@ship-simu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.ship-simu.org
  *
index b98cc31d873ccd8e68accf714a92ef3e453d8d48..d41e1fe20d7887107aaa6a5206f62b6e3ca12236 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index cee02f27eff37df56086f6db052349f41edcaf8d..96ee9c9538d632d54e12ef3cf4ffdbf6f16e859e 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 9b9c40be5a60f41e2a39c0a0a8ffecb530a74889..9fde3e7106a2790079f92d646d60e92c9d159daf 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@ship-simu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.ship-simu.org
  *
index ea3bd006353170b5001fd907a91310355d630ccd..353ee6867b447a23d2536c07fe06981b2cda90ae 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 7541fae1f7e679992ccb67df5187c31d5987164c..341d40472e564952bfd716cf56084f982330ab78 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index eca905df1165d1f15b99135ffee2063106a3f1d3..c1db6fadab82e3d1231d5a7fad89b160fd552233 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@ship-simu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.ship-simu.org
  *
index 4064df324b6eabeaa1f851b8402cce5fa038125d..bf2e596eba0108f7c45bdffcafaa552824be0b49 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index ed012e232e93dc33b349760643e956d5fb6591d5..619d09d9e300a18c30a81131d44abc3baad8174a 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 26c55436e580098aa5782dfbeefb1f203d67b281..c2f05b3530097f5108a27c3f3a0cad1a83fbb5ab 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index f5b0d318315d43eaee82dd142c66d7c99d630af9..ea26e97e7623e690c36d59382ae27d7beadfe58f 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@ship-simu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.ship-simu.org
  *
index 61067437cb19419652a3e47f22bef329cf6bdaee..dacd419e6a33c4d11f0aeef9887d4d80a8ec2dc5 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index d7e7de8dcaaa3b4b86c9b4aac54cc944fb26167a..9d8eb00ed6ca3d82633021cdd976992de5bcd12d 100644 (file)
@@ -6,7 +6,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 851a42e1055d333c0f13a0a6ae7e43824d587364..8f2ac6b4f31bcfe09d61b216b30425189effe652 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index f5a31459cb4b11f6e475f26a6b25cd7ba7b566c5..c8b88ca9ab9ab64c4ef46807d70918fb8ca377ab 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index a1041d9f47907f0bd5803d6180bf888dc74c13cf..4e7cb5ed1fb57c0f6aafe629bc005600d53f2aeb 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 4141c85ffebb8ceed327b7ad009b8790434cf9d0..0c35c72a6b335389be272728052678d6cf2114d5 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 5a0cba4c24567eb4b1f82274aab628e6a482e1bf..6b3cb8f6f2d4eef7906f6722278523de02bd2a64 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index ec130aeba650b1dab5977d795813895b73db3111..beb2edd1488396ed0397ae608c6550d8d7c72d4c 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 40e56c801bf21368fc16a7d7329074f3481b17ea..4e049196ccf2dc1a5327a8e12ca1d66d9193f895 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 3f08a7b6d73dab8305b39b1913c0a1df27967e4c..7e7ac2340d472dc2c9efa7a2e60d0e33f9565d3c 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index a6728b69397e563df90312878998a974c52bc4ae..631ba93848770ef279ad026c584d9ec2d4f4a601 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 84d8b6a79c47a36661a25e94e44ed6876b131efc..e5d11f7cc4e5f055e415467ea36ed87ad008073e 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index af4f1d8839b7543fca522f4aebbf42253c88ae0c..0191c392b8636b18b40d14dc9ff5b57aa46e5a9e 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@ship-simu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.ship-simu.org
  *
index fc25defa710c6999f1971cc2853868358c249b7f..28e8fca3f4addd25ce6ae31b21a89c616a22460a 100644 (file)
@@ -15,7 +15,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index b0e254270fc21b0773b573c0ff4e2c05de871153..bddc7d4bdef999a66c71c5fb7a8ffd8c3f38b6f5 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 0821f01386b88d8c69d62745d70e9898169ed76a..91fa097bbf811724f7697a211686fe4d2e53a36b 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 4c7717cd3826575533f89a7254b21a1c38d5bdf2..a8245372702ef546ed4186bc9703253687653a3a 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index c12a3bf7cd9fd866c1693316de6e4615e7ba0f3f..9f7e288b691a338528f7c74f34abc842b68970c0 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
@@ -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 BaseHandler extends BaseHubSystem implements Handleable {
+class BaseHandler extends BaseHubSystem implements HandleableDataSet {
        /**
         * Handler name
         */
index 684dc08011e9236cb37cb918245b8c602b79ab13..1c8111bcf16b0bd916805a255a5112b5b1f5a152 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 59bc4de0b61f1aa1ca091bae9c3bd6cb76ddd889..0fd0d7bded5be4631a844652adeb995724bb5937 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index cf4fa42c9f6c86844dafa2c2b1d5a945d3b8ee20..10be0846615a4106647382f00739a0c53dd4833d 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index bcd471d6d8135ce7a945b870140bb208a6c7d7e0..641c7ee303c023eaf6510f5c9081e5f65b9c8c6e 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index d36ac50cc8aa0b64fef47dea74b30db9de55a5eb..074cc3e03c6925e9b85dc4ffeda8d64ac20c40e2 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@ship-simu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.ship-simu.org
  *
index fad63f03ee6780e233fc84c4a5a75d7aff559622..f852722e753eca5cea02cbce310e859346ee7cf9 100644 (file)
@@ -5,7 +5,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index e6344ca18c42ee015bf0154c8d905f4f9c8a9b85..23225957365fea8b157c598f208ec16584b64f47 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 81d6aad3e0964256cab92f861357d69d2e374228..8c7d5841eeaa52566f9a84850f3fe1d2a15531c1 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 76e3f902aef3133bddb0799a1c4ec1c5bdaad766..efd0f64b41e362ae25b78b4618d9a49083d46fc4 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 6bb894438ef3e625f4906ffeb7b9c06e4978fd1d..1098d473b78782212fc57310da0227219019ad81 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
@@ -140,16 +140,16 @@ class BaseRawDataHandler extends BaseHandler {
        }
 
        /**
-        * Checks whether the 'recipient' field matches our own address:port
-        * combination.
+        * Checks whether the 'recipient' field matches our own an universal node
+        * locator.
         *
         * @param       $packageData    Raw package data
         * @return      $matches                Whether it matches
         * @todo        This method will be moved to a better place
         */
-       protected function ifRecipientMatchesOwnAddress (array $packageData) {
+       protected function ifRecipientMatchesOwnUniversalNodeLocator (array $packageData) {
                // Construct own address first
-               $ownAddress = NodeObjectFactory::createNodeInstance()->getAddressPort();
+               $ownAddress = NodeObjectFactory::createNodeInstance()->determineUniversalNodeLocator();
 
                // Does it match?
                $matches = ($ownAddress === $packageData[NetworkPackage::PACKAGE_DATA_RECIPIENT]);
index 9324cf1fcdbf5688b9ea1c9208718368b3ed5d18..d954717600dc1623abe9a3d252bcab115c01cbda 100644 (file)
@@ -138,7 +138,7 @@ socket_close($mainSocket);
  *
  * @author             Roland Haeder <webmaster@ship-simu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.ship-simu.org
  *
index ea089fdf35f33ad2fdd9f6b21161aafe9b471700..bb6fe494d0e7b498aa153d4d50eb977cf5449e9a 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index ad9a5cda57e267b2c1fa9ea153496e96ac2d97ee..9bb47a18287745252b65755e6d14f82b14def96e 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
@@ -49,8 +49,8 @@ class UdpRawDataHandler extends BaseRawDataHandler implements Networkable {
        }
 
        /**
-        * Processes raw data from given resource. This is mostly useful for TCP
-        * package handling and is implemented in the TcpListener class
+        * Processes raw data from given resource. This is mostly useful for UDP
+        * package handling and is implemented in the UdpListener class
         *
         * @param       $socketArray    A valid socket resource array
         * @return      void
index f849e4d86e794dbaf2b80409b6ef83866d50eab8..c8a87bc0b6466763c2831b7ca2c6ce15fde60e16 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index d3888ea4559f45494dc3bd58875b1691fcd86a2f..f2df8d58c3f532d3acb4cbf2a5e9d7bbfccd673c 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@ship-simu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Core Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Core Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.ship-simu.org
  * @todo               Find an interface for hub helper
@@ -33,7 +33,7 @@ class !!!???Helper extends BaseHubSystemHelper implements Helpable!!! {
                parent::__construct(__CLASS__);
 
                // Set recipient type
-               $this->setRecipientType(NetworkPackage::NETWORK_TARGET_!!!);
+               $this->setRecipientType(NetworkPackage::NETWORK_TARGET_```);
 
                // Set package tags
                $this->setPackageTags(array('???'));
@@ -78,7 +78,7 @@ class !!!???Helper extends BaseHubSystemHelper implements Helpable!!! {
                $packageInstance = NetworkPackageFactory::createNetworkPackageInstance();
 
                // Next, feed the content in. The network package class is a pipe-through class.
-               $packageInstance->enqueueRawDataFromTemplate($this, NetworkPackage::PROTOCOL_TCP);
+               $packageInstance->enqueueRawDataFromTemplate($this);
        }
 }
 
index de901600c4dc647406de6a4566078c574785f83c..60d5d7a20b6582c638f686c6822e379ebe211f85 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
@@ -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 BaseHubSystemHelper extends BaseHubSystem implements Helper {
+class BaseHubSystemHelper extends BaseHubSystem implements HubHelper {
        /**
         * Recipient type
         */
index 10696dc8cfd5cc05ebec8b5fff1fe3597042eca5..7dcb01a5f4ca4033937bfa95b2f46f7c933412c0 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@ship-simu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Core Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Core Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.ship-simu.org
  * @todo               Find an interface for hub helper
@@ -33,7 +33,7 @@ class ???ConnectionHelper extends BaseConnectionHelper implements ConnectionHelp
                parent::__construct(__CLASS__);
 
                // Set protocol
-               $this->setProtocol('!!!');
+               $this->setProtocolName('!!!');
        }
 
        /**
index eede0f8f3a9800eb0104794bd47849be2254d15c..6f2eeb2df4800f754c9d28205c88b670293d0d50 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
@@ -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 BaseConnectionHelper extends BaseHubSystemHelper implements Registerable, ProtocolHandler {
+class BaseConnectionHelper extends BaseHubSystemHelper implements Registerable {
        // Exception codes
        const EXCEPTION_UNSUPPORTED_ERROR_HANDLER = 0x9100;
 
@@ -40,11 +40,6 @@ class BaseConnectionHelper extends BaseHubSystemHelper implements Registerable,
         */
        const CONNECTION_TYPE_SERVER   = 'server';
 
-       /**
-        * Protocol used
-        */
-       private $protocol = 'invalid';
-
        /**
         * Port number used
         */
@@ -147,25 +142,6 @@ class BaseConnectionHelper extends BaseHubSystemHelper implements Registerable,
                $this->port = $port;
        }
 
-       /**
-        * Getter for protocol
-        *
-        * @return      $protocol       Used protocol
-        */
-       public final function getProtocol () {
-               return $this->protocol;
-       }
-
-       /**
-        * Setter for protocol
-        *
-        * @param       $protocol       Used protocol
-        * @return      void
-        */
-       protected final function setProtocol ($protocol) {
-               $this->protocol = $protocol;
-       }
-
        /**
         * Getter for IP address
         *
@@ -413,7 +389,7 @@ class BaseConnectionHelper extends BaseHubSystemHelper implements Registerable,
                assert(strlen($rawData) > 0);
 
                // Calculate buffer size
-               $bufferSize = $this->getConfigInstance()->getConfigEntry($this->getProtocol() . '_buffer_length');
+               $bufferSize = $this->getConfigInstance()->getConfigEntry($this->getProtocolName() . '_buffer_length');
 
                // Encode the raw data with our output-stream
                $encodedData = $this->getOutputStreamInstance()->streamData($rawData);
index 4c7a6ab4ee3e6e6c69f4314038d1434f8515a19b..9cbd20fcd53b3d9459a3711b3ebfb6cb15fea7f5 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Core Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Core Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  * @todo               Find an interface for hub helper
@@ -33,7 +33,7 @@ class TcpConnectionHelper extends BaseConnectionHelper implements ConnectionHelp
                parent::__construct(__CLASS__);
 
                // Set protocol
-               $this->setProtocol('tcp');
+               $this->setProtocolName('tcp');
        }
 
        /**
index 9b238379318d3047546ad60e4c257383be5779a0..d863f6a6cf18509b43eaa16c44abada1fc8f691e 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Core Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Core Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  * @todo               Find an interface for hub helper
@@ -33,7 +33,7 @@ class UdpConnectionHelper extends BaseConnectionHelper implements ConnectionHelp
                parent::__construct(__CLASS__);
 
                // Set protocol
-               $this->setProtocol('udp');
+               $this->setProtocolName('udp');
        }
 
        /**
index bc5fcafccdd0fe1c4dedbac5f9009f6f689fcf06..41838a244a7ef27a969ef541856bbca4fff18947 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Core Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Core Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  * @todo               Find an interface for hub helper
@@ -98,7 +98,7 @@ class DhtBootstrapHelper extends BaseHubSystemHelper implements HelpableDht {
                $packageInstance = NetworkPackageFactory::createNetworkPackageInstance();
 
                // Next, feed the content in. The network package class is a pipe-through class.
-               $packageInstance->enqueueRawDataFromTemplate($this, NetworkPackage::PROTOCOL_TCP);
+               $packageInstance->enqueueRawDataFromTemplate($this);
 
                // Debug message
                /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('HELPER[' . __METHOD__ . ':' . __LINE__ . ']: EXIT!');
index 0e00a83f43faf9d59a1f9bf2cd1324db82e93ccd..b0351f60a97bce91df3d7282fc4ac4688e26c037 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Core Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Core Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  * @todo               Find an interface for hub helper
@@ -91,7 +91,7 @@ class DhtPublishEntryHelper extends BaseHubSystemHelper implements HelpableDht {
                $packageInstance = NetworkPackageFactory::createNetworkPackageInstance();
 
                // Next, feed the content in. The network package class is a pipe-through class.
-               $packageInstance->enqueueRawDataFromTemplate($this, NetworkPackage::PROTOCOL_TCP);
+               $packageInstance->enqueueRawDataFromTemplate($this);
        }
 }
 
index d5e2002d948229f5b1ad66da22a6685181e937d4..10e5d099eb7b2a5d5812b58e9fc8c475a15279c4 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@ship-simu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.ship-simu.org
  *
index d3a98a9a01eaa72e827d6a09591d2c82333388f4..73080ac9dbc8bc9cb38edeb8e019cd39afdfc660 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index c9af05f3a5cd550d6e0fc1d74991415c41d255f7..15b66a4a9e0310e5628a49bbb20a95b143b147de 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index d76523988269a1d40388c3c15a798631df731397..0edef644e879387078a006b1ff97e976ddce13ff 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  * @todo               Find an interface for hub helper
@@ -96,7 +96,7 @@ class NodeAnnouncementHelper extends BaseNodeHelper implements HelpableNode {
                $packageInstance = NetworkPackageFactory::createNetworkPackageInstance();
 
                // Next, feed the content in. The network package class is a pipe-through class.
-               $packageInstance->enqueueRawDataFromTemplate($this, NetworkPackage::PROTOCOL_TCP);
+               $packageInstance->enqueueRawDataFromTemplate($this);
        }
 }
 
index 7c15681b5f15b7a4f8430c90d2893820c919be58..c1b65451a1d8fffd68f787110d08e5d7cc2d4695 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Core Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Core Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  * @todo               Find an interface for hub helper
@@ -96,7 +96,7 @@ class NodeAnnouncementMessageAnswerHelper extends BaseHubAnswerHelper implements
                $packageInstance = NetworkPackageFactory::createNetworkPackageInstance();
 
                // Next, feed the content in. The network package class is a pipe-through class.
-               $packageInstance->enqueueRawDataFromTemplate($this, NetworkPackage::PROTOCOL_TCP);
+               $packageInstance->enqueueRawDataFromTemplate($this);
        }
 }
 
index b07c80fbdd3184436c804e0cfc2473d03c031fed..4c9e7762c036c4524f24cf514d17ff70f645cc27 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index eebebd4ca9def4560bff5857f7f65c1ff9f4cef5..7b6966f04d6891da4271e31520200814f942e9e0 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Core Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Core Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  * @todo               Find an interface for hub helper
@@ -96,7 +96,7 @@ class NodeDhtBootstrapMessageAnswerHelper extends BaseHubAnswerHelper implements
                $packageInstance = NetworkPackageFactory::createNetworkPackageInstance();
 
                // Next, feed the content in. The network package class is a pipe-through class.
-               $packageInstance->enqueueRawDataFromTemplate($this, NetworkPackage::PROTOCOL_TCP);
+               $packageInstance->enqueueRawDataFromTemplate($this);
        }
 }
 
index aa653358a01b38bd70c327a4d938ff1fc6ddf311..18fbcad0a3bd8a15cf286b5cb8c89199f4b637d3 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Core Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Core Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  * @todo               Find an interface for hub helper
@@ -102,7 +102,7 @@ class NodeRequestNodeListMessageAnswerHelper extends BaseHubAnswerHelper impleme
                $packageInstance = NetworkPackageFactory::createNetworkPackageInstance();
 
                // Next, feed the content in. The network package class is a pipe-through class.
-               $packageInstance->enqueueRawDataFromTemplate($this, NetworkPackage::PROTOCOL_TCP);
+               $packageInstance->enqueueRawDataFromTemplate($this);
        }
 }
 
index 5e5e493eb6718afebf397372937f452bf4fbefed..7ba8c47541878805ce459d01296b6d1c8cedafac 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@ship-simu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Core Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Core Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.ship-simu.org
  * @todo               Find an interface for hub helper
@@ -75,7 +75,7 @@ class Node???Helper extends BaseNodeHelper implements HelpableNode {
                $packageInstance = NetworkPackageFactory::createNetworkPackageInstance();
 
                // Next, feed the content in. The network package class is a pipe-through class.
-               $packageInstance->enqueueRawDataFromTemplate($this, NetworkPackage::PROTOCOL_|||);
+               $packageInstance->enqueueRawDataFromTemplate($this);
        }
 }
 
index c93e6bc4434cb3f26c285f40f4e175c0dd948b3d..6eb146e1abd4f65fe4aa12536c0bd47aa2f4f53a 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 97c7c551a62225507219ee82d52842dbc23f0f0d..a952cd4552c271d71f398d48da295b0d9cb98301 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Core Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Core Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  * @todo               Find an interface for hub helper
@@ -92,7 +92,7 @@ class NodeSelfConnectHelper extends BaseNodeHelper implements HelpableNode {
                $packageInstance = NetworkPackageFactory::createNetworkPackageInstance();
 
                // Next, feed the content in. The network package class is a pipe-through class.
-               $packageInstance->enqueueRawDataFromTemplate($this, NetworkPackage::PROTOCOL_TCP);
+               $packageInstance->enqueueRawDataFromTemplate($this);
        }
 }
 
index 4429e58cb50c34ad7c0575577f75af02b2ac3702..c7f15c47336fadd68e1fdeba1e46b7090fc7b434 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Core Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Core Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  * @todo               Find an interface for hub helper
@@ -92,7 +92,7 @@ class NodeRequestNodeListHelper extends BaseNodeHelper implements HelpableNode {
                $packageInstance = NetworkPackageFactory::createNetworkPackageInstance();
 
                // Next, feed the content in. The network package class is a pipe-through class.
-               $packageInstance->enqueueRawDataFromTemplate($this, NetworkPackage::PROTOCOL_TCP);
+               $packageInstance->enqueueRawDataFromTemplate($this);
        }
 }
 
index caccf429d8839550342cf8f72b6c91c8e2f54e67..3e82dbf0b79631fb3c5f63645f9640b22aa8d595 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 24b96b80ca2b09af8bf42a11fd728df80d897637..607baadd9a01e9dea5d1c9cff025c0002e946380 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 2ec9cc223cf0fe0df3b88a023db6197dc090e16b..23344d41f4ad4aa186c040453bac36f6670f9837 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  * @todo               This current implementation is not recommended, use a
index 4ff42d2bac3ea6c885e594c868b1d0aa730e9d9a..f10d5d4ad8ef882951de4f1cc268442685256705 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index a7c6748904ea1d8adddff74b00534c25c70e3185..27a0eb550df76bce742d532e0bd72891e61ddb75 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@ship-simu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.ship-simu.org
  *
index 5fcdd99e54e3ebae23cccf57ee26c22ea8ca6d20..bef1dc844cd9a3cf0875cd194cfeae81d63bb21a 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  * @todo               This current implementation is not recommended, use a
index b8a35b78002f2558d988752cf96630472ed0cbf1..a538edd794ecfb7d0089a6402ed824280a2df3e3 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  * @todo               This current implementation is not recommended, use a
index 9ee2371f5a801e0354bb9f95f5bbbfdd0eefad4d..5035027798134e6d04657303236aebf5b737a095 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@ship-simu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.ship-simu.org
  *
index 3eae4fedf792c8a88c6a9ddecefbd068995af045..9f5bf0700d75be67797dbb6770b71865c1ebd8d0 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 57719ca80639c9a008c8a728dfa50354f2037742..b11f10d860d6e13201bf5f3da12eb605f507f1eb 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  * @todo               This current implementation is not recommended, use a
index cf356fc1455be0cd502a43cef29d8b939d7502b4..15a335ae633768a971436a501e3b808bccaeaa31 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index da51bb399b78e8b14bde82d15d48c1b68d721c2a..4e7b1528d3bd9d6e8f3706bc1b9be9585092238a 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@ship-simu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.ship-simu.org
  *
index 2ee21895d569d7f40a04749153130e9e5e84b3dd..1007fa88d7ed3dc7cab954b33d1220544f762fdb 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
@@ -33,11 +33,6 @@ class BaseListener extends BaseHubSystem implements Visitable {
        const EXCEPTION_FINAL_CHUNK_VERIFICATION         = 0xa07;
        const EXCEPTION_INVALID_DATA_CHECKSUM            = 0xa08;
 
-       /**
-        * Used protocol (Default: invalid, which is indeed invalid...)
-        */
-       private $protocol = 'invalid';
-
        /**
         * Address (IP mostly) we shall listen on
         */
@@ -160,25 +155,6 @@ class BaseListener extends BaseHubSystem implements Visitable {
                $this->setListenPort($this->getConfigInstance()->getConfigEntry($configEntry));
        }
 
-       /**
-        * Setter for protocol
-        *
-        * @param       $protocol       Used protocol
-        * @return      void
-        */
-       protected final function setProtocol ($protocol) {
-               $this->protocol = (string) $protocol;
-       }
-
-       /**
-        * Getter for protocol
-        *
-        * @return      $protocol       Used protocol
-        */
-       public final function getProtocol () {
-               return $this->protocol;
-       }
-
        /**
         * Setter for blocking-mode
         *
@@ -272,7 +248,7 @@ class BaseListener extends BaseHubSystem implements Visitable {
         */
        public function accept (Visitor $visitorInstance) {
                // Debug message
-               //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(strtoupper($this->getProtocol()) . '-LISTENER[' . __METHOD__ . ':' . __LINE__ . ']: ' . $visitorInstance->__toString() . ' has visited ' . $this->__toString() . ' - START');
+               //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(strtoupper($this->getProtocolName()) . '-LISTENER[' . __METHOD__ . ':' . __LINE__ . ']: ' . $visitorInstance->__toString() . ' has visited ' . $this->__toString() . ' - START');
 
                // Visit this listener
                $visitorInstance->visitListener($this);
@@ -283,7 +259,7 @@ class BaseListener extends BaseHubSystem implements Visitable {
                } // END - if
 
                // Debug message
-               //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(strtoupper($this->getProtocol()) . '-LISTENER[' . __METHOD__ . ':' . __LINE__ . ']: ' . $visitorInstance->__toString() . ' has visited ' . $this->__toString() . ' - FINISHED');
+               //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(strtoupper($this->getProtocolName()) . '-LISTENER[' . __METHOD__ . ':' . __LINE__ . ']: ' . $visitorInstance->__toString() . ' has visited ' . $this->__toString() . ' - FINISHED');
        }
 
        /**
index 758ae306df739d3ea731c08ec241c72f97cd9a1e..87292e4de815b4a8639c79b3331b7be3ecf7c1c0 100644 (file)
@@ -1,10 +1,10 @@
 <?php
 /**
- * A decorator for the TcpListener to communicate to hubs
+ * A general decorator for listeners to communicate to hubs
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
@@ -65,15 +65,6 @@ class BaseListenerDecorator extends BaseDecorator implements Visitable {
                return $this->getListenerInstance()->getPort();
        }
 
-       /**
-        * Getter for protocol
-        *
-        * @return      $protocol       The used protocol
-        */
-       public final function getProtocol () {
-               return $this->getListenerInstance()->getProtocol();
-       }
-
        /**
         * Accepts the visitor to process the visit "request"
         *
index 9324cf1fcdbf5688b9ea1c9208718368b3ed5d18..d954717600dc1623abe9a3d252bcab115c01cbda 100644 (file)
@@ -138,7 +138,7 @@ socket_close($mainSocket);
  *
  * @author             Roland Haeder <webmaster@ship-simu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.ship-simu.org
  *
index 473db762f57bf0ee09ed8e2a8ee5f3a47ba20a43..560801e1160b8750ed6b13e350a974224e3ab426 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
@@ -32,7 +32,7 @@ class TcpListener extends BaseListener implements Listenable {
                parent::__construct(__CLASS__);
 
                // Set the protocol to TCP
-               $this->setProtocol('tcp');
+               $this->setProtocolName('tcp');
        }
 
        /**
@@ -286,7 +286,7 @@ class TcpListener extends BaseListener implements Listenable {
                        $packageData = array(
                                NetworkPackage::PACKAGE_DATA_SENDER    => $peerName . ':0',
                                NetworkPackage::PACKAGE_DATA_RECIPIENT => $this->getSessionId(),
-                               NetworkPackage::PACKAGE_DATA_PROTOCOL  => $this->getProtocol(),
+                               NetworkPackage::PACKAGE_DATA_PROTOCOL  => $this->getProtocolName(),
                                NetworkPackage::PACKAGE_DATA_STATUS    => NetworkPackage::PACKAGE_STATUS_FAKED
                        );
 
index c0af385a90175f8fdb5a13bafa4ea42d8b29a5f9..87f19300f6506e3ba803fbb1958d337f18b5a916 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
@@ -31,8 +31,9 @@ class ClientTcpListenerDecorator extends BaseListenerDecorator implements Listen
                // Call parent constructor
                parent::__construct(__CLASS__);
 
-               // Set listener type
+               // Set listener type and protocol name
                $this->setListenerType('peer');
+               $this->setProtocolName('tcp');
        }
 
        /**
index 9b1d072a897945bc8f2ffa920ec0aa8a2aab102e..71022812292d6a39a307afe139924ad1346c6f4a 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
@@ -31,8 +31,9 @@ class HubTcpListenerDecorator extends BaseListenerDecorator implements Listenabl
                // Call parent constructor
                parent::__construct(__CLASS__);
 
-               // Set listener type
+               // Set listener type and protocol name
                $this->setListenerType('hub');
+               $this->setProtocolName('tcp');
        }
 
        /**
index 39be600bd95681ae26f9f2b43dffd0d002d4a34e..fa4a2c36b6835df8a627fd47173352df69c306a0 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@ship-simu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.ship-simu.org
  *
index 3e27edafd77e9b3c338974fefd553e6a52e866d7..ee686590f08bbb8e45c75a19087c795fc547c867 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
@@ -32,7 +32,7 @@ class UdpListener extends BaseListener implements Listenable {
                parent::__construct(__CLASS__);
 
                // Set the protocol to UDP
-               $this->setProtocol('udp');
+               $this->setProtocolName('udp');
        }
 
        /**
index f894ce35333ae71ba8ebe001f69bc00e8256b12f..a3c6fb12faa60da8d34e1cd267f392401dc3aa84 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
@@ -31,8 +31,9 @@ class ClientUdpListenerDecorator extends BaseListenerDecorator implements Listen
                // Call parent constructor
                parent::__construct(__CLASS__);
 
-               // Set listener type
+               // Set listener type and protocol name
                $this->setListenerType('peer');
+               $this->setProtocolName('udp');
        }
 
        /**
index 70a8a7a2a40c82f21c8aca9f1938ca908bbde215..45ee6e2b76982ee2f57fa1f59b4b0a571cc6bc4b 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
@@ -31,8 +31,9 @@ class HubUdpListenerDecorator extends BaseListenerDecorator implements Listenabl
                // Call parent constructor
                parent::__construct(__CLASS__);
 
-               // Set listener type
+               // Set listener type and protocol name
                $this->setListenerType('hub');
+               $this->setProtocolName('udp');
        }
 
        /**
index 3fd177aa7d49304efb221c6359303ec02ab5647c..ea43cd44e698e41ce012ce4e9ec78ca0dddac2a2 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@ship-simu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.ship-simu.org
  *
index a2f0950109bcd6b045b72b089d72855f9ffa7b4f..db8699b7d0568e142de50da83ef47f5a63860031 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 7da5329f9a31da4660d6bb0f6d9fa3b4317f6a49..484709320b828a88d711b9fa6092590b0079966b 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 02b5baf9059694826eb84258098246d57953681f..ac4e2f1b7cb0a50095595236f8ecd30b903e7e25 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 39dcc9044d5669c33d91e9566c1c0f47c0c5ba52..ccfeec154f7832bb6f60e383df086671297bb70d 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 53323b4c030cc1dc19e88459b9dab3c0ced6489c..c3b1805a68ec113c1041388045b3157e486438fd 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
@@ -42,8 +42,8 @@ class RecipientList extends BaseList implements Listable, Registerable {
                $listInstance = new RecipientList();
 
                // Add groups:
-               // 1.) ip:port combinations
-               $listInstance->addGroup('ip_port');
+               // 1.) Universal Node Locators
+               $listInstance->addGroup('unl');
 
                // 2.) Session ids
                $listInstance->addGroup('session_id');
@@ -68,7 +68,7 @@ class RecipientList extends BaseList implements Listable, Registerable {
         */
        public function clearList () {
                // Clear both groups
-               $this->clearGroups(array('ip_port', 'session_id'));
+               $this->clearGroups(array('unl', 'session_id'));
        }
 }
 
index f2dfa3d07fe24d7b894876cf661f6faf388caa36..f87681b8cc4c236b24559e7a0b6acd1220e9bcdd 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index bc69c1d81be2cab9195d0f18a27a58a7cc6f046b..935c3c708ef8c94ebf5c4820a460b1d4fbac495a 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
@@ -58,18 +58,21 @@ class HubBootNode extends BaseHubNode implements NodeHelper, Registerable {
         * @todo        add some more special bootstrap things for this boot node
         */
        public function doBootstrapping () {
+               // @TODO Unfinished
+               die(__METHOD__ . ':' . print_r($this, TRUE));
+
                // Now check if the IP address matches one of the bootstrap nodes
                if ($this->ifAddressMatchesBootstrapNodes($this->getConfigInstance()->detectServerAddress())) {
                        // Get our port from configuration
                        $ourPort = $this->getConfigInstance()->getConfigEntry('node_listen_port');
 
                        // Extract port
-                       $bootPort = substr($this->getBootIpPort(), -strlen($ourPort), strlen($ourPort));
+                       $bootPort = substr($this->getBootUniversalNodeLocator(), -strlen($ourPort), strlen($ourPort));
 
                        // Is the port the same?
                        if ($bootPort == $ourPort) {
                                // It is the same!
-                               self::createDebugInstance(__CLASS__)->debugOutput('BOOTSTRAP: IP/port matches bootstrap node ' . $this->getBootIpPort() . '.');
+                               self::createDebugInstance(__CLASS__)->debugOutput('BOOTSTRAP: IP/port matches bootstrap node ' . $this->getBootUniversalNodeLocator() . '.');
 
                                // Now, does the mode match
                                if ($this->getRequestInstance()->getRequestElement('mode') == self::NODE_TYPE_BOOT) {
index cc4ea5e9ac83c1ce0d68739baceb233eafe0a1dd..e38510bebbbd39efa2844c51d7ded748cacca8fa 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@ship-simu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.ship-simu.org
  *
index 0094562c3a71f1829dcd07a582ec765ec8aa346e..ce3637cc12f46ad561125fff901ae54f72ea71b3 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
@@ -37,9 +37,9 @@ class BaseHubNode extends BaseHubSystem implements Updateable, AddableCriteria {
        const OBJECT_LIST_SEPARATOR = ',';
 
        /**
-        * IP/port number of bootstrap node
+        * Universal node locator of bootstrap node
         */
-       private $bootIpPort = '';
+       private $bootUnlInstance = '';
 
        /**
         * Whether this node is anncounced (keep on FALSE!)
@@ -111,7 +111,7 @@ class BaseHubNode extends BaseHubSystem implements Updateable, AddableCriteria {
                $rngInstance = ObjectFactory::createObjectByConfiguredName('rng_class');
 
                // Generate a pseudo-random string
-               $randomString = $rngInstance->randomString($length) . ':' . $this->getBootIpPort() . ':' . $this->getRequestInstance()->getRequestElement('mode');
+               $randomString = $rngInstance->randomString($length) . ':' . $this->getBootUniversalNodeLocator() . ':' . $this->getRequestInstance()->getRequestElement('mode');
 
                // Add UUID for even more entropy for the hasher
                $randomString .= $this->getCryptoInstance()->createUuid();
@@ -147,10 +147,10 @@ class BaseHubNode extends BaseHubSystem implements Updateable, AddableCriteria {
        /**
         * Getter for boot IP/port combination
         *
-        * @return      $bootIpPort             The IP/port combination of the boot node
+        * @return      $bootUnlInstance                The IP/port combination of the boot node
         */
-       protected final function getBootIpPort () {
-               return $this->bootIpPort;
+       protected final function getBootUniversalNodeLocator () {
+               return $this->bootUnlInstance;
        }
 
        /**
@@ -164,24 +164,24 @@ class BaseHubNode extends BaseHubSystem implements Updateable, AddableCriteria {
                $isFound = FALSE;
 
                // Run through all configured IPs
-               foreach (explode(BaseHubSystem::BOOTSTRAP_NODES_SEPARATOR, $this->getConfigInstance()->getConfigEntry('hub_bootstrap_nodes')) as $ipPort) {
-                       // Split it up in IP/port
-                       $ipPortArray = explode(':', $ipPort);
+               foreach (explode(BaseHubSystem::BOOTSTRAP_NODES_SEPARATOR, $this->getConfigInstance()->getConfigEntry('hub_bootstrap_nodes')) as $unlArray) {
+                       // @TODO Unfinished
+                       die(__METHOD__ . ':' . print_r($unlArray, TRUE));
 
                        // Does it match?
-                       if ($ipPortArray[0] == $remoteAddr) {
+                       if ($unlArray[0] == $remoteAddr) {
                                // Found it!
                                $isFound = TRUE;
 
-                               // Remember the port number
-                               $this->bootIpPort = $ipPort;
+                               // Remember the UNL array
+                               $this->bootUnlInstance = $unlArray;
 
                                // Output message
-                               self::createDebugInstance(__CLASS__)->debugOutput('BOOTSTRAP: ' . __FUNCTION__ . '[' . __METHOD__ . ':' . __LINE__ . ']: IP matches remote address ' . $ipPort . '.');
+                               self::createDebugInstance(__CLASS__)->debugOutput('BOOTSTRAP: ' . __FUNCTION__ . '[' . __METHOD__ . ':' . __LINE__ . ']: IP matches remote address ' . $unlArray->__toString() . '.');
 
                                // Stop further searching
                                break;
-                       } elseif ($ipPortArray[0] == $this->getConfigInstance()->getConfigEntry('node_listen_addr')) {
+                       } elseif ($unlArray[0] == $this->getConfigInstance()->getConfigEntry('node_listen_addr')) {
                                /*
                                 * IP matches listen address. At this point we really don't care
                                 * if we can really listen on that address
@@ -189,10 +189,10 @@ class BaseHubNode extends BaseHubSystem implements Updateable, AddableCriteria {
                                $isFound = TRUE;
 
                                // Remember the port number
-                               $this->bootIpPort = $ipPort;
+                               $this->bootUnlInstance = $unlArray;
 
                                // Output message
-                               self::createDebugInstance(__CLASS__)->debugOutput('BOOTSTRAP: ' . __FUNCTION__ . '[' . __METHOD__ . ':' . __LINE__ . ']: IP matches listen address ' . $ipPort . '.');
+                               self::createDebugInstance(__CLASS__)->debugOutput('BOOTSTRAP: ' . __FUNCTION__ . '[' . __METHOD__ . ':' . __LINE__ . ']: IP matches listen address ' . $unlArray->__toString() . '.');
 
                                // Stop further searching
                                break;
@@ -216,7 +216,7 @@ class BaseHubNode extends BaseHubSystem implements Updateable, AddableCriteria {
                // Output all lines
                self::createDebugInstance(__CLASS__)->debugOutput(' ');
                self::createDebugInstance(__CLASS__)->debugOutput($app->getAppName() . ' v' . $app->getAppVersion() . ' - ' . $this->getRequestInstance()->getRequestElement('mode') . ' mode active');
-               self::createDebugInstance(__CLASS__)->debugOutput('Copyright (c) 2007 - 2008 Roland Haeder, 2009 - 2012 Hub Developer Team');
+               self::createDebugInstance(__CLASS__)->debugOutput('Copyright (c) 2007 - 2008 Roland Haeder, 2009 - 2014 Hub Developer Team');
                self::createDebugInstance(__CLASS__)->debugOutput(' ');
                self::createDebugInstance(__CLASS__)->debugOutput('This program comes with ABSOLUTELY NO WARRANTY; for details see docs/COPYING.');
                self::createDebugInstance(__CLASS__)->debugOutput('This is free software, and you are welcome to redistribute it under certain');
@@ -684,29 +684,41 @@ class BaseHubNode extends BaseHubSystem implements Updateable, AddableCriteria {
        }
 
        /**
-        * "Getter" for address:port combination
+        * Determines an instance of a LocateableNode class
         *
-        * @return      $addressPort    A address:port combination for this node
+        * @return      $unlInstance    An instance of a LocateableNode class for this node
         */
-       public final function getAddressPort () {
-               // Get IP and port
-               $addressPort = $this->getConfigInstance()->detectServerAddress() . ':' . $this->getConfigInstance()->getConfigEntry('node_listen_port');
+       public function determineUniversalNodeLocator () {
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('NODE[' . __METHOD__ . ':' . __LINE__ . ']: CALLED!');
+               // Determine UNL based on this node:
+               // 1) Get discovery class
+               $discoveryInstance = ObjectFactory::createObjectByConfiguredName('unl_discovery_class');
 
-               // Return it
-               return $addressPort;
+               // 2) "Determine it
+               $unlInstance = $discoveryInstance->discoverUniversalNodeLocatorByNode($this);
+
+               // 3) Return it
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('NODE[' . __METHOD__ . ':' . __LINE__ . ']: unlInstance= ' . $unlInstance->__toString() . ' - EXIT!');
+               return $unlInstance;
        }
 
        /**
-        * "Getter" for address:port array
+        * "Getter" for an array of an instance of a LocateableNode class
         *
-        * @return      $addressPortArray       An array of a address:port combination for this node
+        * @return      $unlArray       An array from an instance of a LocateableNode class for this node
         */
-       public final function getAddressPortArray () {
-               // Get IP and port
-               $addressPortArray = explode(':', $this->getAddressPort());
+       public final function getUniversalNodeLocatorArray () {
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('NODE[' . __METHOD__ . ':' . __LINE__ . ']: CALLED!');
+
+               // Get the Universal Node Locator (UNL) instance
+               $unlInstance = $this->determineUniversalNodeLocator();
+
+               // @TODO Unfinished
+               die(__METHOD__ . ':unlInstance[' . gettype($unlInstance) . ']=' . print_r($unlInstance, TRUE));
 
                // Return it
-               return $addressPortArray;
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('NODE[' . __METHOD__ . ':' . __LINE__ . ']: EXIT!');
+               return $unlArray;
        }
 
        /**
index 98683ceeb298c9381e7a7a3e4bec29399cff8ad6..e35f739fce25c902e8b4b680ab796c886ca3d2d2 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 576d54a8cdbe314d17d2f329fc0b0dc373c4731c..91f05aa2d342d72a859c4a19bc7c4d4fe86b9026 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index cfbedc659b3031270706b97f0b4eddb43e7560fd..456505c2f913154ff1872d6cde01682d552c9181 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 855cf57f0a145d7cc32cddf6894fe796fc2b1988..3eecefaee0b42cc3499f4dc884f2926d4c0a1320 100644 (file)
@@ -5,7 +5,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 7d396a866993c2e7f3d9daf195ae6d0330f17d7a..a7832b99d29c58279804db7a355ccf7a90ddfd38 100644 (file)
@@ -17,7 +17,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  * @todo               Needs to add functionality for handling the object's type
@@ -616,7 +616,7 @@ class NetworkPackage extends BaseHubSystem implements Deliverable, Receivable, R
 
                // Is it the same?
                //$isSignatureValid = 
-               exit(__METHOD__.': signature='.$signature.chr(10).',decodedArray='.print_r($decodedArray, TRUE));
+               exit(__METHOD__ . ': signature=' . $signature . chr(10) . ',decodedArray=' . print_r($decodedArray, TRUE));
        }
 
        /**
@@ -624,11 +624,13 @@ class NetworkPackage extends BaseHubSystem implements Deliverable, Receivable, R
         * from given helper's template instance and pushing it on the 'undeclared'
         * stack.
         *
-        * @param       $helperInstance         An instance of a Helper class
-        * @param       $protocol                       Name of used protocol (TCP/UDP)
+        * @param       $helperInstance         An instance of a HubHelper class
         * @return      void
         */
-       public function enqueueRawDataFromTemplate (Helper $helperInstance, $protocolName) {
+       public function enqueueRawDataFromTemplate (HubHelper $helperInstance) {
+               // Get protocol instance for recipient
+               $protocolInstance = ProtocolHandlerFactory::createProtocolHandlerFromRecipientHelper($helperInstance);
+
                // Get the raw content ...
                $content = $helperInstance->getTemplateInstance()->getRawTemplateData();
                //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('content(' . strlen($content) . ')=' . $content);
@@ -658,7 +660,7 @@ class NetworkPackage extends BaseHubSystem implements Deliverable, Receivable, R
                $this->getStackInstance()->pushNamed(self::STACKER_NAME_UNDECLARED, array(
                        self::PACKAGE_DATA_SENDER    => $this->getSessionId(),
                        self::PACKAGE_DATA_RECIPIENT => $helperInstance->getRecipientType(),
-                       self::PACKAGE_DATA_PROTOCOL  => $protocolName,
+                       self::PACKAGE_DATA_PROTOCOL  => $protocolInstance->getProtocolName(),
                        self::PACKAGE_DATA_CONTENT   => $packageContent,
                        self::PACKAGE_DATA_STATUS    => self::PACKAGE_STATUS_NEW,
                        self::PACKAGE_DATA_SIGNATURE => $this->generatePackageSignature($packageContent, $this->getSessionId())
index 1828c6516d4585fb301621f7caef45c8c0215de0..7e2943f50e7f2bca8de998bdc8c3a24d151e8d34 100644 (file)
@@ -13,7 +13,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index a13ee34987d23e4ac883ff734d79d553096ec67d..507d12cb5f36574efb7e850adcf513414e989048 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@ship-simu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.ship-simu.org
  *
index 67a3ed9e50253bca9a53105d5027590a7c29911c..9090a8be640f65461b3e7e5fe1ba99c8d47781c3 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
@@ -77,6 +77,11 @@ class BasePool extends BaseHubSystem implements Visitable {
         * @return      void
         */
        protected final function addInstance ($group, $poolName, Visitable $visitableInstance) {
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('POOL[' . __METHOD__ . ':' . __LINE__ . ']: group=' . $group . ',poolName=' . $poolName . ',visitableInstance=' . $visitableInstance->__toString() . ' - CALLED!');
+
+               // Make sure the group is not 'invalid'
+               assert($group != 'invalid');
+
                // Is the pool group there?
                if (!$this->getPoolEntriesInstance()->isGroupSet($group)) {
                        // Create the missing pool group
index ead076ddaba5e02dc9ad03fd0402187f26dd1859..b7a23ed038aac7d848ece652dc82498921dfcc14 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
@@ -57,7 +57,7 @@ class DefaultListenerPool extends BasePool implements PoolableListener {
         */
        public function addListener (Listenable $listenerInstance) {
                // Add this listener instance to the instance list
-               parent::addInstance($listenerInstance->getProtocol(), 'listener', $listenerInstance);
+               parent::addInstance($listenerInstance->getProtocolName(), 'listener', $listenerInstance);
 
                // Debug message
                self::createDebugInstance(__CLASS__)->debugOutput(
index de65ec4b2524a95a2d3650d2a09240c67caa0ea6..5c5fdbcbcd839e32176e6466036942f9647d3b38 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
@@ -221,13 +221,13 @@ class DefaultPeerPool extends BasePool implements PoolablePeer {
                $socketResource = FALSE;
 
                // Temporary resolve recipient field
-               $recipientIpArray = explode(':', HubTools::resolveSessionId($packageData[NetworkPackage::PACKAGE_DATA_RECIPIENT]));
+               $unlArray = explode(':', HubTools::resolveSessionId($packageData[NetworkPackage::PACKAGE_DATA_RECIPIENT]));
 
-               // Make sure it is a valid ip:port array (2 elements)
-               assert(count($recipientIpArray) == 2);
+               // Make sure it is a valid Universal Node Locator array (3 elements)
+               assert(count($unlArray) == 3);
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('POOL[' . __METHOD__ . ':' . __LINE__ . ']: Checking ' . count($this->getAllSockets()) . ' socket(s),recipientIpArray[0]=' . $recipientIpArray[0] . ',recipientIpArray[1]=' . $recipientIpArray[1] . ' ...');
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('POOL[' . __METHOD__ . ':' . __LINE__ . ']: Checking ' . count($this->getAllSockets()) . ' socket(s),unlArray[0]=' . $unlArray[0] . ',unlArray[1]=' . $unlArray[1] . ' ...');
 
                // Default is all sockets
                $sockets = $this->getAllSockets();
@@ -258,7 +258,7 @@ class DefaultPeerPool extends BasePool implements PoolablePeer {
 
                        // Get
                        // If the "peer" IP and recipient is same, use it
-                       if ($peerIp == $recipientIpArray[0]) {
+                       if ($peerIp == $unlArray[0]) {
                                // IPs match, so take the socket and quit this loop
                                $socketResource = $socketArray[self::SOCKET_ARRAY_RESOURCE];
 
index 79fc50c4509b32f58cab77e789f793572f35cc3f..12337e7fdb18be0f78700ad17dee8365767d5226 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@ship-simu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.ship-simu.org
  *
index 5e37579213f5753ca875f7c2d257c60100b08e97..a60634a899d7d3b157d811a6c6e002f4378769bb 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index af69bd73c3434fec780b5dc1dc2d7776a737809d..8d9566da8547dca881da818ccfe20bb999e808f7 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 1e3ecad7ba16afd0696d5b2136757a3e5bfa809e..c267d6352e694bf1068f56b173a7ebd447731983 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index a18f6e6e8cf9514a12326f4648f6ffaf214184f1..3d9449c3534eafbfb5f801c5654f43f937f9d989 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@ship-simu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.ship-simu.org
  *
@@ -46,7 +46,7 @@ class ???Recipient extends BaseRecipient implements Recipient {
        }
 
        /**
-        * Tries to resolve given recipient into session ids or ip:port combination
+        * Tries to resolve given recipient into session ids or Universal Node Locator
         * depending on implementation (hint: Template Method Pattern)
         *
         * @param       $recipient              Recipient to resolve (e.g. could be a virtual recipient or direct session id)
index 471751ea6d91c1f7f2a6398161591c1d4cd3fe84..0407e4fd8dfb01077ec52112c50c92d959b6458c 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index d3da3800b434630525e623cf351e4a6770743e57..40a4efd283f7e747c3866393450f8906772c4172 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
@@ -46,7 +46,7 @@ class DhtRecipient extends BaseRecipient implements Recipient {
        }
 
        /**
-        * Tries to resolve given recipient into session ids or ip:port combination
+        * Tries to resolve given recipient into session ids or Universal Node Locator
         * depending on implementation (hint: Template Method Pattern). This
         * implementation will add more than one recipient to the list as a DHT is
         * distributed and the package might go to more than one recipient.
@@ -73,15 +73,17 @@ class DhtRecipient extends BaseRecipient implements Recipient {
                // Now "walk" through all elements and add them to the list
                foreach ($recipients as $recipient) {
                        // These array elements must exist for this loop:
+                       // @TODO Unfinished
+                       die(__METHOD__ . ':recipient=' . print_r($recipient, TRUE));
                        assert(!empty($recipient[NodeDistributedHashTableDatabaseWrapper::DB_COLUMN_EXTERNAL_IP]));
                        assert(!empty($recipient[NodeDistributedHashTableDatabaseWrapper::DB_COLUMN_LISTEN_PORT]));
 
                        // Put ip and port both together
-                       $ipPort = $recipient[NodeDistributedHashTableDatabaseWrapper::DB_COLUMN_EXTERNAL_IP] . ':' . $recipient[NodeDistributedHashTableDatabaseWrapper::DB_COLUMN_LISTEN_PORT];
+                       $unl = $recipient[NodeDistributedHashTableDatabaseWrapper::DB_COLUMN_EXTERNAL_IP] . ':' . $recipient[NodeDistributedHashTableDatabaseWrapper::DB_COLUMN_LISTEN_PORT];
 
                        // Add it to the list
-                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('DHT-RECIPIENT[' . __METHOD__ . ':' . __LINE__ . ']: Calling listInstance->addEntry(' . $ipPort . ') ...');
-                       $listInstance->addEntry('ip_port', $ipPort);
+                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('DHT-RECIPIENT[' . __METHOD__ . ':' . __LINE__ . ']: Calling listInstance->addEntry(' . $unl . ') ...');
+                       $listInstance->addEntry('unl', $unl);
                } // END - foreach
 
                // Debug message
index a34ac747162791798dd2c9909bb535285355da99..0ed776e902bd700c4c44c076e2f2bb2344211cb9 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
@@ -46,7 +46,7 @@ class DirectRecipient extends BaseRecipient implements Recipient {
        }
 
        /**
-        * Tries to resolve given recipient into session ids or ip:port combination
+        * Tries to resolve given recipient into session ids or Universal Node Locator
         * depending on implementation (hint: Template Method Pattern)
         *
         * @param       $recipient              Recipient to resolve (e.g. could be a virtual recipient or direct session id)
@@ -68,10 +68,10 @@ class DirectRecipient extends BaseRecipient implements Recipient {
                // Try it on all
                foreach ($recipients as $recipient) {
                        // Try to sole a single recipient
-                       $ipPort = HubTools::resolveSessionId($recipient);
+                       $unlArray = HubTools::resolveSessionId($recipient);
 
                        // Add it as recipient
-                       $listInstance->addEntry('ip_port', $ipPort);
+                       $listInstance->addEntry('unl', $unlArray);
                } // END - foreach
        }
 }
index efedc12835962b062bc174fddc34e531f738d76b..85d29eab85b3a1e13598497075d278db4a7d0361 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
@@ -46,7 +46,7 @@ class SelfRecipient extends BaseRecipient implements Recipient {
        }
 
        /**
-        * Tries to resolve given recipient into session ids or ip:port combination
+        * Tries to resolve given recipient into session ids or Universal Node Locator
         * depending on implementation (hint: Template Method Pattern)
         *
         * @param       $recipient              Recipient to resolve (e.g. could be a virtual recipient or direct session id)
@@ -58,6 +58,8 @@ class SelfRecipient extends BaseRecipient implements Recipient {
        public function resolveRecipient ($recipient, Listable $listInstance, array $packageData) {
                // Make sure the recipient is valid
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('SELF-RECIPIENT: recipient=' . $recipient);
+               // @TODO Unfinished
+               die(__METHOD__ . 'recipient=:' . print_r($recipient, TRUE));
                assert($recipient == NetworkPackage::NETWORK_TARGET_SELF);
 
                // Determine own port
@@ -69,7 +71,7 @@ class SelfRecipient extends BaseRecipient implements Recipient {
                // Is it not empty?
                if (!empty($ip)) {
                        // Add it to the list
-                       $listInstance->addEntry('ip_port', $ip . ':' . $port);
+                       $listInstance->addEntry('unl', $ip . ':' . $port);
                } // END - if
        }
 }
index 593ef5206355b38d4d7082cb4932d23d31caa7db..33d45ffeab06fa4d066d00bbcf374f795159e9c1 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
@@ -46,7 +46,7 @@ class UpperRecipient extends BaseRecipient implements Recipient {
        }
 
        /**
-        * Tries to resolve given recipient into session ids or ip:port combination
+        * Tries to resolve given recipient into session ids or Universal Node Locator
         * depending on implementation (hint: Template Method Pattern)
         *
         * @param       $recipient              Recipient to resolve (e.g. could be a virtual recipient or direct session id)
@@ -61,7 +61,7 @@ class UpperRecipient extends BaseRecipient implements Recipient {
                assert($recipient == NetworkPackage::NETWORK_TARGET_UPPER);
 
                // Get all bootstrap nodes
-               foreach (explode(BaseHubSystem::BOOTSTRAP_NODES_SEPARATOR, $this->getConfigInstance()->getConfigEntry('hub_bootstrap_nodes')) as $ipPort) {
+               foreach (explode(BaseHubSystem::BOOTSTRAP_NODES_SEPARATOR, $this->getConfigInstance()->getConfigEntry('hub_bootstrap_nodes')) as $unlArray) {
                        // Is maximum reached?
                        if ($listInstance->count() == $this->getConfigInstance()->getConfigEntry('package_recipient_max_count')) {
                                // Debug message
@@ -72,10 +72,10 @@ class UpperRecipient extends BaseRecipient implements Recipient {
                        } // END - if
 
                        // Debug message
-                       /* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('RECIPIENT-RESOLVER: Adding node ' . $ipPort . ' as recipient.');
+                       /* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('RECIPIENT-RESOLVER: Adding node ' . print_r($unlArray, TRUE) . ' as recipient.');
 
                        // Add the entry
-                       $listInstance->addEntry('ip_port', $ipPort);
+                       $listInstance->addEntry('unl', $unlArray);
                } // END - foreach
        }
 }
index 92d66a03b4a69f7f16639ad116caeffe77b5a25b..fb7745fc41b03b4c0199e4eae803132b382add36 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
@@ -67,7 +67,7 @@ class ConnectionRegistry extends BaseRegistry implements Register, RegisterableC
                // Get protocol and port number and add both together
                $key = sprintf("%s:%s:%s",
                        $connectionInstance->__toString(),
-                       $connectionInstance->getProtocol(),
+                       $connectionInstance->getProtocolName(),
                        $connectionInstance->getPort()
                );
 
@@ -83,7 +83,7 @@ class ConnectionRegistry extends BaseRegistry implements Register, RegisterableC
         */
        private function getRegistryKeyFromProtocol (ConnectionHelper $connectionInstance) {
                // Get the key
-               $key = $connectionInstance->getProtocol();
+               $key = $connectionInstance->getProtocolName();
 
                // Return resulting key
                return $key;
index 558d3be55c9f0d4a2390cdf9d2af82f1388b411c..980687afd62c2edc5ae88642e0be1d4b40a123fa 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Core Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Core Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 96ea11e9d926810667cfec922bdcc677b8b96feb..4237e482c9560d7024128ef57efc59ae399e4c6a 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
@@ -81,9 +81,9 @@ class SocketRegistry extends BaseRegistry implements Register, RegisterableSocke
                }
 
                // Get protocol and port number and add both together
-               $key = sprintf("%s:%s:%s:%s",
+               $key = sprintf('%s:%s:%s:%s',
                        $protocolInstance->__toString(),
-                       $protocolInstance->getProtocol(),
+                       $protocolInstance->getProtocolName(),
                        $address,
                        $protocolInstance->getPort()
                );
@@ -100,7 +100,7 @@ class SocketRegistry extends BaseRegistry implements Register, RegisterableSocke
         */
        private function getRegistryKeyFromProtocol (ProtocolHandler $protocolInstance) {
                // Get the key
-               $key = $protocolInstance->getProtocol();
+               $key = $protocolInstance->getProtocolName();
 
                // Return resulting key
                return $key;
@@ -114,7 +114,7 @@ class SocketRegistry extends BaseRegistry implements Register, RegisterableSocke
         */
        private function isProtocolRegistered (ProtocolHandler $protocolInstance) {
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('SOCKET-REGISTRY[' . __METHOD__ . ':' . __LINE__ . ']:protocol=' . $protocolInstance->getProtocol() . ' - ENTERED!');
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('SOCKET-REGISTRY[' . __METHOD__ . ':' . __LINE__ . ']:protocol=' . $protocolInstance->getProtocolName() . ' - ENTERED!');
 
                // Get the key
                $key = $this->getRegistryKeyFromProtocol($protocolInstance);
@@ -123,7 +123,7 @@ class SocketRegistry extends BaseRegistry implements Register, RegisterableSocke
                $isRegistered = $this->instanceExists($key);
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('SOCKET-REGISTRY[' . __METHOD__ . ':' . __LINE__ . ']:protocol=' . $protocolInstance->getProtocol() . ',isRegistered=' . intval($isRegistered) . ' - EXIT!');
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('SOCKET-REGISTRY[' . __METHOD__ . ':' . __LINE__ . ']:protocol=' . $protocolInstance->getProtocolName() . ',isRegistered=' . intval($isRegistered) . ' - EXIT!');
 
                // Return result
                return $isRegistered;
@@ -139,7 +139,7 @@ class SocketRegistry extends BaseRegistry implements Register, RegisterableSocke
         */
        public function isSocketRegistered (ProtocolHandler $protocolInstance, $socketResource) {
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('SOCKET-REGISTRY[' . __METHOD__ . ':' . __LINE__ . ']:protocol=' . $protocolInstance->getProtocol() . ',socketResource[' . gettype($socketResource) . ']=' . $socketResource . ' - ENTERED!');
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('SOCKET-REGISTRY[' . __METHOD__ . ':' . __LINE__ . ']:protocol=' . $protocolInstance->getProtocolName() . ',socketResource[' . gettype($socketResource) . ']=' . $socketResource . ' - ENTERED!');
 
                // Default is not registered
                $isRegistered = FALSE;
@@ -150,7 +150,7 @@ class SocketRegistry extends BaseRegistry implements Register, RegisterableSocke
                        $key = $this->getRegistryKeyFromProtocol($protocolInstance);
 
                        // Debug message
-                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('SOCKET-REGISTRY[' . __METHOD__ . ':' . __LINE__ . ']: protocol=' . $protocolInstance->getProtocol() . ',socketResource[' . gettype($socketResource) . ']=' . $socketResource . ',key=' . $key . ' - Trying to get instance ...');
+                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('SOCKET-REGISTRY[' . __METHOD__ . ':' . __LINE__ . ']: protocol=' . $protocolInstance->getProtocolName() . ',socketResource[' . gettype($socketResource) . ']=' . $socketResource . ',key=' . $key . ' - Trying to get instance ...');
 
                        // Get the registry
                        $registryInstance = $this->getInstance($key);
@@ -159,7 +159,7 @@ class SocketRegistry extends BaseRegistry implements Register, RegisterableSocke
                        $socketKey = $this->getSubRegistryKey($protocolInstance);
 
                        // Debug message
-                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('SOCKET-REGISTRY[' . __METHOD__ . ':' . __LINE__ . ']: protocol=' . $protocolInstance->getProtocol() . ',socketResource[' . gettype($socketResource) . ']=' . $socketResource . ',key=' . $key . ',socketKey=' . $socketKey . ' - Checking existence ...');
+                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('SOCKET-REGISTRY[' . __METHOD__ . ':' . __LINE__ . ']: protocol=' . $protocolInstance->getProtocolName() . ',socketResource[' . gettype($socketResource) . ']=' . $socketResource . ',key=' . $key . ',socketKey=' . $socketKey . ' - Checking existence ...');
 
                        // Is it there?
                        if ($registryInstance->instanceExists($socketKey)) {
@@ -178,7 +178,7 @@ class SocketRegistry extends BaseRegistry implements Register, RegisterableSocke
                } // END - if
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('SOCKET-REGISTRY[' . __METHOD__ . ':' . __LINE__ . ']:protocol=' . $protocolInstance->getProtocol() . ',socketResource[' . gettype($socketResource) . ']=' . $socketResource . ',isRegistered=' . intval($isRegistered) . ' - EXIT!');
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('SOCKET-REGISTRY[' . __METHOD__ . ':' . __LINE__ . ']:protocol=' . $protocolInstance->getProtocolName() . ',socketResource[' . gettype($socketResource) . ']=' . $socketResource . ',isRegistered=' . intval($isRegistered) . ' - EXIT!');
 
                // Return the result
                return $isRegistered;
@@ -195,7 +195,7 @@ class SocketRegistry extends BaseRegistry implements Register, RegisterableSocke
         */
        public function registerSocket (ProtocolHandler $protocolInstance, $socketResource, array $packageData = array()) {
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('SOCKET-REGISTRY[' . __METHOD__ . ':' . __LINE__ . ']:protocol=' . $protocolInstance->getProtocol() . ',socketResource[' . gettype($socketResource) . ']=' . $socketResource . ' - ENTERED!');
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('SOCKET-REGISTRY[' . __METHOD__ . ':' . __LINE__ . ']:protocol=' . $protocolInstance->getProtocolName() . ',socketResource[' . gettype($socketResource) . ']=' . $socketResource . ' - ENTERED!');
 
                // Is the socket already registered?
                if ($this->isSocketRegistered($protocolInstance, $socketResource)) {
@@ -235,7 +235,7 @@ class SocketRegistry extends BaseRegistry implements Register, RegisterableSocke
         */
        public function getRegisteredSocketResource (ProtocolHandler $protocolInstance) {
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('SOCKET-REGISTRY[' . __METHOD__ . ':' . __LINE__ . ']:protocol=' . $protocolInstance->getProtocol() . ' - ENTERED!');
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('SOCKET-REGISTRY[' . __METHOD__ . ':' . __LINE__ . ']:protocol=' . $protocolInstance->getProtocolName() . ' - ENTERED!');
 
                // The socket must be registered before we can return it
                if (!$this->isProtocolRegistered($protocolInstance)) {
@@ -256,7 +256,7 @@ class SocketRegistry extends BaseRegistry implements Register, RegisterableSocke
                $socketResource = $registryInstance->getInstance($socketKey)->getSocketResource();
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('SOCKET-REGISTRY[' . __METHOD__ . ':' . __LINE__ . ']:protocol=' . $protocolInstance->getProtocol() . ',socketResource[' . gettype($socketResource) . ']=' . $socketResource . ' - EXIT!');
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('SOCKET-REGISTRY[' . __METHOD__ . ':' . __LINE__ . ']:protocol=' . $protocolInstance->getProtocolName() . ',socketResource[' . gettype($socketResource) . ']=' . $socketResource . ' - EXIT!');
 
                // Return the resource
                return $socketResource;
index d2457d1e66cc16a08fda179626c35bc23b827b27..d998270310818af78ae2f429f89b35b3010c1199 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 3114ec072775573598d0acfdc88cb2bc785a7b10..e4a8ef16a8a5311971c2791b50dc99b1dd212a51 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index a8483d99a7f4c0bfde98ef3731235812c80b31d6..4638b96e02a9fb16f15bcbdcf661bb9996409e42 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Core Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Core Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
diff --git a/application/hub/main/resolver/protocol/.htaccess b/application/hub/main/resolver/protocol/.htaccess
new file mode 100644 (file)
index 0000000..3a42882
--- /dev/null
@@ -0,0 +1 @@
+Deny from all
diff --git a/application/hub/main/resolver/protocol/class_ b/application/hub/main/resolver/protocol/class_
new file mode 100644 (file)
index 0000000..8246fbc
--- /dev/null
@@ -0,0 +1,62 @@
+<?php
+/**
+ * A !!! protocol resolver class
+ *
+ * @author             Roland Haeder <webmaster@shipsimu.org>
+ * @version            0.0.0
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
+ * @license            GNU GPL 3.0 or any newer version
+ * @link               http://www.shipsimu.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 !!!ProtocolResolver extends BaseProtocolResolver implements ProtocolResolver, Registerable {
+       /**
+        * Protected constructor
+        *
+        * @return      void
+        */
+       protected function __construct () {
+               // Call parent constructor
+               parent::__construct(__CLASS__);
+       }
+
+       /**
+        * Creates an instance of a !!! command resolver with a given default command
+        *
+        * @return      $resolverInstance       The prepared command resolver instance
+        */
+       public static final function create!!!ProtocolResolver () {
+               // Create the new instance
+               $resolverInstance = new !!!ProtocolResolver();
+
+               // Return the prepared instance
+               return $resolverInstance;
+       }
+
+       /**
+        * Returns an command instance for a given request class or null if
+        * it was not found
+        *
+        * @param       $nodeInstance   An instance of a NodeHelper class
+        * @return      $unlInstance    An instance of a LocateableNode class
+        * @todo        0% done
+        */
+       public function resolveUniversalResourceLocatorFromNodeHelper (NodeHelper $nodeInstance) {
+               $this->partialStub('Please implement this method.');
+       }
+}
+
+// [EOF]
+?>
diff --git a/application/hub/main/resolver/protocol/class_BaseProtocolResolver.php b/application/hub/main/resolver/protocol/class_BaseProtocolResolver.php
new file mode 100644 (file)
index 0000000..7db2800
--- /dev/null
@@ -0,0 +1,38 @@
+<?php
+/**
+ * A generic protocol resolver class
+ *
+ * @author             Roland Haeder <webmaster@shipsimu.org>
+ * @version            0.0.0
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
+ * @license            GNU GPL 3.0 or any newer version
+ * @link               http://www.shipsimu.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 BaseProtocolResolver extends BaseHubSystem {
+       /**
+        * Protected constructor
+        *
+        * @param       $className      Name of the class
+        * @return      void
+        */
+       protected function __construct ($className) {
+               // Call parent constructor
+               parent::__construct($className);
+       }
+}
+
+// [EOF]
+?>
diff --git a/application/hub/main/resolver/protocol/tcp/.htaccess b/application/hub/main/resolver/protocol/tcp/.htaccess
new file mode 100644 (file)
index 0000000..3a42882
--- /dev/null
@@ -0,0 +1 @@
+Deny from all
diff --git a/application/hub/main/resolver/protocol/tcp/class_TcpProtocolResolver.php b/application/hub/main/resolver/protocol/tcp/class_TcpProtocolResolver.php
new file mode 100644 (file)
index 0000000..41a1f6d
--- /dev/null
@@ -0,0 +1,65 @@
+<?php
+/**
+ * A TCP protocol resolver class
+ *
+ * @author             Roland Haeder <webmaster@shipsimu.org>
+ * @version            0.0.0
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
+ * @license            GNU GPL 3.0 or any newer version
+ * @link               http://www.shipsimu.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 TcpProtocolResolver extends BaseProtocolResolver implements ProtocolResolver, Registerable {
+       /**
+        * Protected constructor
+        *
+        * @return      void
+        */
+       protected function __construct () {
+               // Call parent constructor
+               parent::__construct(__CLASS__);
+
+               // Set protocol type
+               $this->setProtocolName('tcp');
+       }
+
+       /**
+        * Creates an instance of a Tcp command resolver with a given default command
+        *
+        * @return      $resolverInstance       The prepared command resolver instance
+        */
+       public static final function createTcpProtocolResolver () {
+               // Create the new instance
+               $resolverInstance = new TcpProtocolResolver();
+
+               // Return the prepared instance
+               return $resolverInstance;
+       }
+
+       /**
+        * Returns an command instance for a given NodeHelper instance or null if it
+        * was not found.
+        *
+        * @param       $nodeInstance   An instance of a NodeHelper class
+        * @return      $unlInstance    An instance of a LocateableNode class
+        * @todo        0% done
+        */
+       public function resolveUniversalResourceLocatorFromNodeHelper (NodeHelper $nodeInstance) {
+               $this->partialStub('Please implement this method.');
+       }
+}
+
+// [EOF]
+?>
index 06b9963168675e6be4286cc3356e3eab08626f32..5d4e15146c1c25379a8c85b49a72d1e1a328f789 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 484edf07503e0bef5109c7ec1faacda99009706b..9b85b1fcccadf2568689e62ff7490a70d64c8fb2 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 6b8ba17d6f7fceb6f60488a87ba89c063c04fbcc..195c65bddbde4a87baf1a4b0524dadf4eea1815c 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@ship-simu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.ship-simu.org
  *
index d56b387ebb91fb63d46152f1fb1200276f5efdbe..665bfb24312ca0851d62a80da059ede31c329674 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@ship-simu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.ship-simu.org
  *
index 2441753bd8115bbf873de44e56aed5df0f0bcff7..dac1d2aab1d23365e6b6cf5799a62b30eb528e9a 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@ship-simu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.ship-simu.org
  *
index 5c5b6ee8e21bfb5a56d5c4600fab3faa6ea9b231..0a9c498ea660c6758e10305c1a6ff089cf887468 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index f34b5e4609618dd0b59fc0910b835ca5f45dc6e1..7269884155675f09024422bba20edc50b7a2c49c 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 118beed4eaa8f9d57a291efa10410c83821c6ce4..95bcbb83fed9aeb901423930f62a12ac3219ad1a 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index ec77631f0c64191c4ca852d3974b6e1f97ca667c..5b1814594a3b565105a4a83f92c4d48c866637cb 100644 (file)
@@ -73,32 +73,16 @@ class CrawlerUploadedListUrlSource extends BaseUrlSource implements UrlSource, R
        }
 
        /**
-        * Creates an instance of this class
-        *
-        * @return      $sourceInstance         An instance of a Source class
-        */
-       public final static function createCrawlerUploadedListUrlSource () {
-               // Get new instance
-               $sourceInstance = new CrawlerUploadedListUrlSource();
-
-               // Init source
-               $sourceInstance->initSource('crawler', 'uploaded_list');
-
-               // Return the prepared instance
-               return $sourceInstance;
-       }
-
-       /**
-        * Checks whether a CSV file is found
+        * Checks whether a CSV file is found in configured path
         *
         * @return      $isFound        Whether a CSV file is found
         */
        private function isCsvFileFound () {
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('CRAWLER-SOURCE [' . __METHOD__ . ':' . __LINE__ . ']: CALLED!');
 
-               // Is the instance valid?
+               // Is it valid?
                if (!$this->getDirectoryInstance()->getDirectoryIteratorInstance()->valid()) {
-                       // Then rewind it
+                       // Rewind to start
                        $this->getDirectoryInstance()->getDirectoryIteratorInstance()->rewind();
                } // END - if
 
@@ -106,9 +90,13 @@ class CrawlerUploadedListUrlSource extends BaseUrlSource implements UrlSource, R
                /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('CRAWLER-SOURCE [' . __METHOD__ . ':' . __LINE__ . ']: this->csvFileImported=' . print_r($this->csvFileImported, TRUE));
                $directoryEntry = $this->getDirectoryInstance()->readDirectoryExcept(array_merge(array('.htaccess', '.', '..'), $this->csvFileImported));
 
-               // The read entry has not to be empty and extension must be '.csv'
+               // Debug message
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('SOURCE[' . __METHOD__ . ':' . __LINE__ . '] directoryEntry(' . strlen($directoryEntry) . ')=' . $directoryEntry);
+
+               // Is it empty or wrong file extension?
                if ((empty($directoryEntry)) || (substr($directoryEntry, -4, 4) != '.csv')) {
                        // Skip further processing
+                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('SOURCE[' . __METHOD__ . ':' . __LINE__ . '] directoryEntry(' . strlen($directoryEntry) . ')=' . $directoryEntry . ' - SKIPPED!');
                        return FALSE;
                } // END - if
 
@@ -120,6 +108,22 @@ class CrawlerUploadedListUrlSource extends BaseUrlSource implements UrlSource, R
                return TRUE;
        }
 
+       /**
+        * Creates an instance of this class
+        *
+        * @return      $sourceInstance         An instance of a Source class
+        */
+       public final static function createCrawlerUploadedListUrlSource () {
+               // Get new instance
+               $sourceInstance = new CrawlerUploadedListUrlSource();
+
+               // Init source
+               $sourceInstance->initSource('crawler', 'uploaded_list');
+
+               // Return the prepared instance
+               return $sourceInstance;
+       }
+
        /**
         * Initializes the import of the CSV file which is being processed by other task
         *
@@ -165,10 +169,17 @@ class CrawlerUploadedListUrlSource extends BaseUrlSource implements UrlSource, R
        public function processStack () {
                // Does the stack have some entries left?
                if (!$this->isUrlStackEmpty()) {
-                       // Handle next entry
+                       /*
+                        * Handle next entry. This method will be called very often, so need
+                        * to process more than one entry at a time.
+                        */
                        $this->processNextEntry();
                } elseif ($this->isCsvFileFound()) {
-                       // A CSV file has been found and can maybe be imported.
+                       /*
+                        * A file containing an URL list is found. Please note the format is
+                        * CSV-like as you may wish to provide meta data such as crawl
+                        * depth, handling of 3rd-party URLs and such.
+                        */
                        $this->importCsvFile();
                }
 
index 7ec108cd3088a08cfd9ce0514989a75a4c8dad70..f9ca32e2bd5d026733ef7aa1ff8c64309cb7d892 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@ship-simu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.ship-simu.org
  *
index 39f7de4ffd6d54ca0ff1e07454173c82479f7d9f..5336e8506de12406cf33e1ce698a27846a6e38cf 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index e6a30e1dbca2d18f026042985a94db2a641e1ee4..ff8e9e7cd9c18c4db248d794be08d4c25267e804 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index d0c89c0ca26fb26204cd4c687142aa9341fbeaf4..f24da293a15e01405a50304cac71d2d47f24f6ae 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index cac3289c0a9bd57884c1c00682b837dffbd8ad61..d81e7853378cc9ca3a47af619518e98385ac35b4 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index a3121e8cb4123d81738d9cc712524e21907e2d80..a6e46e54490f01f95d4b4d13d4171885db8d682e 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index c6d6b8b89f98b3a39687bf32854d434e459941b6..e70e4832ed1bde693227913c26b135800bd02905 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 2ad6200ce1e19f0a7530cc65bf4e669d6091e322..c7f5b70fcb324b5dcda021417e3e5f13ccc9d04d 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index d7fe2cacee9c003af592032e8174ef9fd95551dc..c9263b93ad35fa6559a946c5cefed661bbbc31bd 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 0ea1c57f3bedfe39d3788f894a5e0b48eb85116d..91e9fb0fb9ce65e662ce6955c41c12b3464dbc02 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@ship-simu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.ship-simu.org
  *
index 78b10f3cf47b4571918a464ee4b3a0af657c0c08..47782e3050be3d1e50df4782246986d3518bbd12 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  * @todo               Create generic DHT interface
index a4eb1acabaf0a6c1eef33edbdda42bd79716f1dc..9faa6109b3a5bd4fe58c910f6d0277b715466931 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index a7f0b951a071e3a42d4bce1b2c75463aa3e5d1d2..6a77a1ecc3c057d7944bb5549a01fff61ebfa15a 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 985f2b0884b9cd70364b67bfaa7c3fd9a4249a53..f081074b3f17fb3b42cbb561a66195016a68bf38 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index a28bdafb6ace17ecd0a7379aa1fca2d0b1b038f9..f8c64b418d0e287bdb0ef848f5fe3be318bfeb96 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index cb8bb08287239c906b29873034e9f28649564989..2805c437a7e8ad13274ef73e0cfd118e3971bee2 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 4a4161db313b635fc80424b3669a2fd670ed1228..7fc2c55bd6bf7fb1713907785f8e717db0665e0c 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@ship-simu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.ship-simu.org
  *
index 90e8fbd3a7a749f7af19ecd63b0549b657791989..e60b87c99c19e1d09d07cbd6df865b099d3321e4 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 3ae0c21b56835104c0b7aed68522dfb694081bd4..df88b8ede06f8aa2b38b5b8ffc9732a8f7b4e970 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 65a4f3e3066417066d8e26950f245ab1d922c378..aee5957580740bebe137801752ada2489dd9f00b 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index f9941b8d16491ccb248a7483d5fc08943c8581ba..b114920e0c7052dff3cea3abd3dd44cb1c66e9a7 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 997e813d6c66cba65c21907c5f577f55dd7ee18c..dde14d41168087937648b323dee66e7d7c590b56 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@ship-simu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.ship-simu.org
  *
index 9f2717f4c087fa4941e815bcf33b8067f5942a5b..a8aca10cbecd2d9557e2efd8064616a6fdd8ecc2 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index ceb5e9a56173922726cc88f0af520036c9834cd8..f87e781f48d4ea76787f43b061c30031aa1ad91b 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 1b21dbb0c92b759945e13fcd87ac0e7fb7b8af1d..e3cad7484418bcc7ccccc94ee9942a81990ba7c5 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index e74d4a8ac945bee9c0a281cf1da47f81575126a9..d69269e4b31ee6077847e6e8d52ae626d0c12eeb 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 2e24883ff6aef150749d27c50e2295179efa2465..304545fe1b43239eed301722809f3ac40b72b66f 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 9266e618030597794c984be37033d9dd2d53d471..4ed429528af9af54bb5c07b82ae79a2cb8ca6502 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 300242f2f217ed7e6cef5d4aec39fff819ef75f7..2e2e3924d63239fe74f61e6f0fb23aaa9a5117c8 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 3e221df26d3d06eb120568639ab7670905b52ba2..4e07902b4a881bc5301d6b539262dcd80ab59b7a 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 726cca7389f322e2768a93063f2d08bc2aa6aabb..cc2f4abc80dbcdbafc510798702353293ae44d9e 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 29e5df2d1395fe4780e4b747c3eb335bc25e822a..d04835a0ca0b4749b494d4dd56a4e5a748aab516 100644 (file)
@@ -5,7 +5,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Core Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Core Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  * @todo               Find an interface for hub helper
@@ -26,6 +26,7 @@
 class ConnectionStatisticsHelper extends BaseHubSystem {
        /**
         * Statistics array
+        * @TODO Add more protocols to use
         */
        private static $connectionStatistics = array(
                // Statistics for TCP connections
@@ -59,14 +60,14 @@ class ConnectionStatisticsHelper extends BaseHubSystem {
        public static function isConnectRetryExhausted (ConnectionHelper $helperInstance) {
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('CONNECTION-STATISTICS[' . __METHOD__ . ':' . __LINE__ . ']: helperInstance=' . $helperInstance->__toString() . ' - ENTERED!');
                // Construct config entry
-               $configEntry = $helperInstance->getProtocol() . '_connect_retry_max';
+               $configEntry = $helperInstance->getProtocolName() . '_connect_retry_max';
 
                // Check it out
                $isExhausted = (
                        (
-                               isset(self::$connectionStatistics[$helperInstance->getProtocol()][$helperInstance->__toString()]['retry_count'])
+                               isset(self::$connectionStatistics[$helperInstance->getProtocolName()][$helperInstance->__toString()]['retry_count'])
                        ) && (
-                               self::$connectionStatistics[$helperInstance->getProtocol()][$helperInstance->__toString()]['retry_count'] >= $helperInstance->getConfigInstance()->getConfigEntry($configEntry)
+                               self::$connectionStatistics[$helperInstance->getProtocolName()][$helperInstance->__toString()]['retry_count'] >= $helperInstance->getConfigInstance()->getConfigEntry($configEntry)
                        )
                );
 
@@ -84,19 +85,19 @@ class ConnectionStatisticsHelper extends BaseHubSystem {
        public static function increaseConnectRetry (ConnectionHelper $helperInstance) {
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('CONNECTION-STATISTICS[' . __METHOD__ . ':' . __LINE__ . ']: helperInstance=' . $helperInstance->__toString() . ' - ENTERED!');
                // Is the counter there
-               if (!isset(self::$connectionStatistics[$helperInstance->getProtocol()][$helperInstance->__toString()]['retry_count'])) {
+               if (!isset(self::$connectionStatistics[$helperInstance->getProtocolName()][$helperInstance->__toString()]['retry_count'])) {
                        // First attempt
                        //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('CONNECTION-STATISTICS[' . __METHOD__ . ':' . __LINE__ . ']: helperInstance=' . $helperInstance->__toString() . ' - FIRST!');
-                       self::$connectionStatistics[$helperInstance->getProtocol()][$helperInstance->__toString()]['retry_count'] = 1;
+                       self::$connectionStatistics[$helperInstance->getProtocolName()][$helperInstance->__toString()]['retry_count'] = 1;
                } else {
                        // Next attempt
                        //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('CONNECTION-STATISTICS[' . __METHOD__ . ':' . __LINE__ . ']: helperInstance=' . $helperInstance->__toString() . ' - INCREMENT!');
-                       self::$connectionStatistics[$helperInstance->getProtocol()][$helperInstance->__toString()]['retry_count']++;
+                       self::$connectionStatistics[$helperInstance->getProtocolName()][$helperInstance->__toString()]['retry_count']++;
                }
 
                // Create/update 'last_update' for purging
                // @TODO last_update is not being used at the moment
-               self::$connectionStatistics[$helperInstance->getProtocol()][$helperInstance->__toString()]['last_update'] = time();
+               self::$connectionStatistics[$helperInstance->getProtocolName()][$helperInstance->__toString()]['last_update'] = time();
        }
 }
 
index 415a0831b3b8fb3ec5acf5cee2926d8d5d4a7abf..ac0c00dc9a6f4b63072e1d1b6b8fa58c96dd3ba5 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@ship-simu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.ship-simu.org
  *
index 7bd746e754a0600f7161c953d897157d118c0f63..4726d7a6e59e5ed4acd91ba33bb4a3c44040df61 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 7fe9930859437b0e8d5822159b350c83d3853b6a..71934123dcc316a8aab5f0b2bbd6f680c86e05e3 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
@@ -26,9 +26,9 @@ class PackageTags extends BaseTags implements Tagable {
        const EXCEPTION_INVALID_TAG = 0x160;
 
        /**
-        * Last found protocol
+        * Last found protocol instance
         */
-       private $lastProtocol = 'invalid';
+       private $lastProtocol = NULL;
 
        /**
         * Last found recipient type
@@ -135,7 +135,7 @@ class PackageTags extends BaseTags implements Tagable {
                        } // END - if
 
                        // Now save the last discovered protocol/recipient type
-                       $this->lastProtocol      = $entry[XmlObjectRegistryTemplateEngine::OBJECT_TYPE_DATA_PROTOCOL];
+                       $this->lastProtocol      = ProtocolHandlerFactory::createProtocolHandlerFromArray($entry);
                        $this->lastRecipientType = $entry[XmlObjectRegistryTemplateEngine::OBJECT_TYPE_DATA_RECIPIENT_TYPE];
                } // END - foreach
        }
@@ -144,7 +144,7 @@ class PackageTags extends BaseTags implements Tagable {
         * Chooses the right protocol from given package data
         *
         * @param       $packageData    Raw package data
-        * @return      $protocolName   Name of the choosen procotol
+        * @return      $lastProtocol   An instance of the last used ProtocolHandler class
         */
        public function chooseProtocolFromPackageData (array $packageData) {
                // Extract the tags
@@ -153,11 +153,8 @@ class PackageTags extends BaseTags implements Tagable {
                // Now we need to verify every single tag
                $this->verifyAllTags();
 
-               // Use the last found protocol for transmission
-               $protocolName = $this->lastProtocol;
-
-               // Return it
-               return $protocolName;
+               // Return the last (and only) found protocol (e.g. 'tcp' is very usual)
+               return $this->lastProtocol;
        }
 
        /**
index 462ea82fc938d50cc4833bb2f19e0fb9fb134b74..e9d12c8920989b0191a24edddadd31d709a3a506 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@ship-simu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.ship-simu.org
  *
index ac7a6707f7711cd8126e36de41b38ea24224c837..c72f7d354a596e3df425783a82b48aa1bd232359 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@ship-simu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.ship-simu.org
  *
index c915f8e994933369f5c84028f83246e28c9bc995..b9b4e0d8aa8238643b84dfafcd4d9831185f020e 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index a4c5b40a0f8a653307b8a40ef3ef54ccee8920e0..7f9ef8675f04900ce8312d6eb2b87ddd2beb728e 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 820a0d9ac5c34613aba8db0b6398ea50ba6a3edb..da1a84a49097493c2e7fc01d106228c834833aab 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 49a9d2d845f415d7f7b7a5bcb85b676de239221e..2af36715572230d030b8d87ea194673601f0cd89 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 386439a196632b3bc0617acbf5b57d309fbf61f4..73689b36350435c3256dcc0b1709edc29e7e68f8 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 1ab05fd3d6a1f89739639e65949e8c21a3102baf..e3e403f4311163775a6d9b3df71e9d749ae41d67 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 3c79af08e6f7dcaba33bf8866f7b6f77c8db59d4..32740d3d427148a470206c8c10cc8a81843a2d92 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@ship-simu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.ship-simu.org
  *
index 491b56093709099ad7dbc211389a049bad9c0660..d07737de9c6d4e77eb29a12d0549424394af489f 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 73dedd4d400f0a1b0df6e0579d46a9a2afd02afa..8f4cfaa0d2f63b5fdf0bf04f90937d05fb0f28d2 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 7daf578413f0332ade27407072c14cafc440ea4a..4a5e39919e2532f2623040462c60361f8536f17a 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 6b1cd617403831c6c6c583d3f9e1ed623ac50d5b..1687332a40563cc9de75d97f6287282ee69fc536 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index cfa8b4753e2bba66a3f5c0ea3b229f403c9ec032..9dcfeb2db41a42b9bfc39751d5f5d5bbf60946ea 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index d4486239513e67f8b0aba30dce6b953177c7a1c9..c308ad9433dfb56e89f1424d3c0b795c39908b46 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 55576e718edc52094d0650aa1c3614c421d1b031..2a6491c88bbfe10755e2ac601952ab2aee35b58f 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 1fba9629cb5ea1a4ff8c0a8d1ce01a5aed9c280e..ff763a7365c3c1ce293ac1255a041c5d7e56d296 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index fd793f6623e2332cdeb93764563460a4d5c52d9b..579149520ffecc41a868b160dda556c31ab5fd4f 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 74133b6a01ab2e04f44741899465b64d25109a9a..1fc72785e30aa956ddb9d9cd4f9f4cb606f79cb2 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index f04e8be2829cf4945b7cf1018fe6303426fffc43..5e10563b498dc5e81e56d046b47187f440496aa1 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 819d07909c55f75fe04179bc0a7b1763925db108..51b88327f378402cb72d454ff7bf57b51b1d4880 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 5d75382d96d2d17213ece7039406653f44f77169..0ca17982afb6a8c5b29132e3432f1329cfb42d2d 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Core Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Core Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  * @todo               This template engine does not make use of setTemplateType()
index c54dc98346cefd67e2b1f43a759c72ffc8443b4c..d4f0dc738feb5291a01b3d09437e84388d45e16f 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Core Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Core Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  * @todo               This template engine does not make use of setTemplateType()
index 40957e9287cd92b3a9dcfae913b5e9c3908dfd33..d0890388e2c5ee7a99f59a6a614b5efc790dd3e8 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@ship-simu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Core Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Core Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.ship-simu.org
  * @todo               This template engine does not make use of setTemplateType()
index c0dc7640a602d05b8755cc4fec2ae27d953451c2..8c1f95598dd8ea2c6e84fe671303fd7d8668e1b4 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Core Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Core Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  * @todo               This template engine does not make use of setTemplateType()
index 93a6731c7af1cce997cb51e3b3f6aa339a244ab9..aaeaa6e653ec9807fee2e79fb3fde95382e33e9e 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Core Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Core Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  * @todo               This template engine does not make use of setTemplateType()
index 850644020d2e4126878744ec92306ac8d15f76f6..f2aa8dcab033d0177412847b3fed7d4269630348 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Core Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Core Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  * @todo               This template engine does not make use of setTemplateType()
index 6abb3f32e988f5278b32cdf955d9a3107c9b1adc..9bacd4add760ce43781d29854788d6da0c6fe610 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@ship-simu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Core Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Core Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.ship-simu.org
  * @todo               This template engine does not make use of setTemplateType()
index 8d2c54de53f2a064553848775ff4cd00f84e344d..0180385c7cab0a45920cdbeab30acf2ce2837599 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Core Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Core Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  * @todo               This template engine does not make use of setTemplateType()
index b971ee658756294241b234c59677ac5790e960c4..17f2be09fafd05b09d746d215fb885e2a21e50db 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Core Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Core Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  * @todo               This template engine does not make use of setTemplateType()
index 35a856e0175ae5db3f7e239c2b6cda09eb929ee5..151a5988744f0da1781e8a8f4eca450ce29741b1 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Core Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Core Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  * @todo               This template engine does not make use of setTemplateType()
index 568bb9440d88a8a60a320a2b7df151f521b5a012..126b5f77f17eff78a97d6e4b86fdbf71975aa98c 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Core Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Core Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  * @todo               This template engine does not make use of setTemplateType()
index 3c9795027582b3855d984217a85e7f2ff6082b1d..66ef63bdbff05c49628fc441650b58a6ff8182f9 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Core Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Core Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  * @todo               This template engine does not make use of setTemplateType()
index fb98fa8f661751b90b53b796354675ad7d036e67..305aab162c154de491c6399d3fdada3ed8ab594b 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Core Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Core Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  * @todo               This template engine does not make use of setTemplateType()
index 04dd6c623f4d4e9585e52f9a2cec15d097b0b6cf..1ada53e004e9b4168db19f1054039e5f90f264fc 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Core Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Core Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  * @todo               This template engine does not make use of setTemplateType()
index d59db66541245e3eee2abeebcde2674c6a514a4c..c2c6197e58e866e46e0250b2f466884b2aca7330 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
@@ -86,118 +86,99 @@ class HubTools extends BaseHubSystem {
        }
 
        /**
-        * Resolves a session id into an ip:port combination. The opposite method
-        * is resolveSessionIdByIpPort()
+        * Resolves a session id into an instance of a LocateableNode class. The opposite method
+        * is resolveSessionIdByUniversalNodeLocator()
         *
         * @param       $sessionId                      A valid session id
-        * @return      $recipientIpPort        Recipient as ip:port combination
+        * @return      $recipientUniversalNodeLocator  Recipient as Universal Node Locator
         */
-       protected function resolveIpPortBySessionId ($sessionId) {
+       protected function resolveUniversalNodeLocatorBySessionId ($sessionId) {
                // Init variable
-               $recipientIpPort = 'invalid:invalid';
+               die(__METHOD__ . ': Unfinished' . PHP_EOL);
+               $recipientUniversalNodeLocator = 'invalid://invalid:invalid';
 
-               // And ask it for ip:port by given session id
+               // And ask it for Universal Node Locator by given session id
                $recipient = $this->getDhtInstance()->findNodeLocalBySessionId($sessionId);
 
                // Is the recipient valid?
                if ((isset($recipient[NodeDistributedHashTableDatabaseWrapper::DB_COLUMN_EXTERNAL_IP])) && (isset($recipient[NodeDistributedHashTableDatabaseWrapper::DB_COLUMN_LISTEN_PORT]))) {
                        // Then use this
-                       $recipientIpPort = $recipient[NodeDistributedHashTableDatabaseWrapper::DB_COLUMN_EXTERNAL_IP] . ':' . $recipient[NodeDistributedHashTableDatabaseWrapper::DB_COLUMN_LISTEN_PORT];
+                       $recipientUniversalNodeLocator = $recipient[NodeDistributedHashTableDatabaseWrapper::DB_COLUMN_EXTERNAL_IP] . ':' . $recipient[NodeDistributedHashTableDatabaseWrapper::DB_COLUMN_LISTEN_PORT];
                } else {
                        // Get the instance, this might throw a NPE
                        $nodeInstance = NodeObjectFactory::createNodeInstance();
 
                        // Is the session id the same?
                        if ($nodeInstance->getSessionId() == $sessionId) {
-                               // Then get the ip:port from it, assume TCP by default
-                               $recipientIpPort = self::determineOwnExternalIp() . ':' . $nodeInstance->getConfigInstance()->getConfigEntry('node_listen_port');
+                               // Then get an instance of a LocateableNode class from it, assume TCP by default
+                               $recipientUniversalNodeLocator = self::determineOwnExternalIp() . ':' . $nodeInstance->getConfigInstance()->getConfigEntry('node_listen_port');
                        } // END - if
                }
 
                // Return result
-               return $recipientIpPort;
+               return $recipientUniversalNodeLocator;
        }
 
        /**
-        * Resolves a ip:port combination into a session id. The "opposite" method
-        * is resolveIpPortBySessionId().
+        * Resolves a Universal Node Locator into a session id. The "opposite" method
+        * is resolveUniversalNodeLocatorBySessionId().
         *
-        * @param       $ipPort         Ip:port combination
-        * @return      $sessionId      Valid session id
+        * @param       $unlInstance    Universal Node Locator
+        * @return      $sessionId              Valid session id
         */
-       public static function resolveSessionIdByIpPort ($ipPort) {
+       public static function resolveSessionIdByUniversalNodeLocator (LocateableNode $unlInstance) {
                // Get an own instance
                $selfInstance = self::getSelfInstance();
 
-               // And ask it for session id by given ip:port
-               $recipient = $selfInstance->getDhtInstance()->findNodeByIpPort($ipPort);
-               die(__METHOD__.':recipient=<pre>'.print_r($recipient, TRUE).'</pre>' . PHP_EOL);
+               // And ask it for session id by given Universal Node Locator
+               $recipient = $selfInstance->getDhtInstance()->findNodeByUniversalNodeLocator($unlInstance);
+               die(__METHOD__.':recipient='.print_r($recipient, TRUE));
 
                // Return result
                return $sessionId;
        }
 
        /**
-        * Resolves given session id into an ip:port combination, if ip:port is set, it won't be translated
+        * Resolves given session id into an instance of a LocateableNode class, if Universal Node Locator is set, it won't be translated
         *
-        * @param       $sessionId      Session id or ip:port combination
-        * @return      $recipient      Recipient as ip:port combination
-        * @throws      InvalidSessionIdException       If the provided session id is invalid (and no ip:port combination)
+        * @param       $address        Session id or Universal Node Locator
+        * @return      $recipient      Recipient as Universal Node Locator
+        * @throws      InvalidSessionIdException       If the provided session id is invalid (and no Universal Node Locator)
         * @throws      NoValidHostnameException        If the provided hostname cannot be resolved into an IP address
         */
-       public static function resolveSessionId ($sessionId) {
+       public static function resolveSessionId ($address) {
                // Get an own instance
                $selfInstance = self::getSelfInstance();
 
-               // Default is direct ip:port
-               $recipient = $sessionId;
+               // Default is direct Universal Node Locator
+               $recipient = $address;
 
-               // Does it match a direct ip:port? (hint: see www.regexlib.com for the regular expression)
-               if (preg_match('/((25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9])\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[0-9])):([0-9]{3,5})/', $sessionId)) {
-                       // Direct ip:port found
-                       self::createDebugInstance(__CLASS__)->debugOutput('HUB-TOOLS[' . __METHOD__ . ':' . __LINE__ . ']: Direct ip:port ' . $sessionId . ' detected.');
-               } elseif (isset($selfInstance->sessionIdCache[$sessionId])) {
+               // Does it match a direct Universal Node Locator? (hint: see www.regexlib.com for the regular expression)
+               if (preg_match('/([a-z0-9]{3,10})\/\/:([a-z0-9\.]{5,})/', $address)) {
+                       // @TODO ((25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9])\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[0-9])):([0-9]{3,5})
+                       // Direct Universal Node Locator found
+                       self::createDebugInstance(__CLASS__)->debugOutput('HUB-TOOLS[' . __METHOD__ . ':' . __LINE__ . ']: Direct Universal Node Locator ' . $address . ' detected.');
+               } elseif (isset($selfInstance->sessionIdCache[$address])) {
                        // Debug message
                        self::createDebugInstance(__CLASS__)->debugOutput('HUB-TOOLS[' . __METHOD__ . ':' . __LINE__ . ']: Using entry from sessionIdCache[] array.');
 
                        // Found in cache!
-                       $recipient = $selfInstance->sessionIdCache[$sessionId];
+                       $recipient = $selfInstance->sessionIdCache[$address];
 
                        // Debug message
-                       self::createDebugInstance(__CLASS__)->debugOutput('HUB-TOOLS[' . __METHOD__ . ':' . __LINE__ . ']: sessionIdCache[' . $sessionId . ']=' . $recipient);
-               } elseif (preg_match('/([a-zA-Z0-9]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,6}:([0-9]{3,5})/', $sessionId)) {
-                       // Hostname:port found
-                       self::createDebugInstance(__CLASS__)->debugOutput('HUB-TOOLS[' . __METHOD__ . ':' . __LINE__ . ']: hostname:port ' . $sessionId . ' detected.');
-
-                       // Hostname:port found
-                       $hostnameArray = explode(':', $sessionId);
-
-                       /*
-                        * Try to resolve it and add port again
-                        * @TODO Please try to encapsulate this PHP call into an own class
-                        */
-                       $recipient = gethostbyname($hostnameArray[0]) . ':' . $hostnameArray[1];
-
-                       // Is it valid?
-                       if ($recipient == $sessionId) {
-                               // Resolving hostname->IP failed!
-                               throw new NoValidHostnameException($hostnameArray, self::EXCEPTION_HOSTNAME_NOT_FOUND);
-                       } // END - if
-
-                       // Debug message
-                       self::createDebugInstance(__CLASS__)->debugOutput('HUB-TOOLS[' . __METHOD__ . ':' . __LINE__ . ']: hostname:port ' . $sessionId . ' resolved to ' . $recipient);
-               } elseif (preg_match('/([a-f0-9]{' . $selfInstance->getSessionIdLength() . '})/', $sessionId)) {
+                       self::createDebugInstance(__CLASS__)->debugOutput('HUB-TOOLS[' . __METHOD__ . ':' . __LINE__ . ']: sessionIdCache[' . $address . ']=' . $recipient);
+               } elseif (preg_match('/([a-f0-9]{' . $selfInstance->getSessionIdLength() . '})/', $address)) {
                        // Debug message
                        self::createDebugInstance(__CLASS__)->debugOutput('HUB-TOOLS[' . __METHOD__ . ':' . __LINE__ . ']: Using internal session id resolver.');
 
-                       // Resolve session id into a ip:port combination
-                       $recipient = $selfInstance->resolveIpPortBySessionId($sessionId);
+                       // Resolve session id into an instance of a LocateableNode class
+                       $recipient = $selfInstance->resolveUniversalNodeLocatorBySessionId($address);
 
                        // Debug message
-                       self::createDebugInstance(__CLASS__)->debugOutput('HUB-TOOLS[' . __METHOD__ . ':' . __LINE__ . ']: Session id ' . $sessionId . ' resolved to ' . $recipient);
+                       self::createDebugInstance(__CLASS__)->debugOutput('HUB-TOOLS[' . __METHOD__ . ':' . __LINE__ . ']: Session id ' . $address . ' resolved to ' . $recipient);
                } else {
-                       // Invalid session id
-                       throw new InvalidSessionIdException($sessionId, self::EXCEPTION_SESSION_ID_IS_INVALID);
+                       // Invalid session id/UNL
+                       throw new InvalidSessionIdException($address, self::EXCEPTION_SESSION_ID_IS_INVALID);
                }
 
                // Return it
index 362266063f2b43703f008ebf7d05e473679599ba..e5d4ce5e77727a5ce7b2ffd8e81d15234c227025 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@ship-simu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.ship-simu.org
  *
index e0e89d4f09f9d6fdba2dd87bf2d0846b958c8d30..4bbf1e54a3379f3fd79b59f7f873e715a9b2cc3a 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 727a992e0681f37c253d2626da68d56675c1b4e6..92c188f1b4ca517617685033c74b4847864a7ef3 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@ship-simu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.ship-simu.org
  *
index dfe1bafc7fd6dfa9687a4391ccb21b6557138ea1..4b0943b256a05d2d805216f912b881c1f497738c 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@ship-simu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.ship-simu.org
  *
index 209bd6d6e12eee63795c1d2e2eaadbfdb27aaf92..2d2c18e10af0cde7142591b4627ac1ac21480190 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 3f00ece55f8a263dfc77e15a637b9141f1f82b73..5f921372c3e7455ad36d87cb1931545fbe958aa6 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@ship-simu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub; Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub; Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.ship-simu.org
  *
index fbc41f585e7d50f95b456caa8d523ecbad38fcf1..b1f1931b1ac84dd9eec08d50607f4f5fb7bbbe69 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 1fee9c6c5da869776df57e080608c610babf5c97..ee09eb39b5a16c17705cedb2bf91576bd0c7d8a8 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index fbcd19c49bc9c955ba31323a8e17239d3e4bccfc..31ce73535d8241c38ad3f3be175abd0a4cf766f8 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index fbc1ddad4e8076999655d77343c5587270f94108..5aa70f3d48b4589d96bbecf6dd871bf8ab5e60c8 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 1eef929e16841b195b5c01fbeab40ae8b0266ca2..bcabb7ce957fbbd802c23caaf386595a8f390e05 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 7e5921d74b3cbdbd8a0f46f39a5c0c15d1ebc3e5..928eb3310072f37ab4ca31be2ed3871cd3c77b31 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
@@ -136,6 +136,8 @@ class NodeDistributedHashTableDatabaseWrapper extends BaseDatabaseWrapper implem
         * @return      $dataSetInstance        An instance of a StoreableCriteria class
         */
        private function prepareLocalDataSetInstance () {
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('DHT-WRAPPER[' . __METHOD__ . ':' . __LINE__ . ']: CALLED!');
+
                // Get node/request instances
                $nodeInstance = NodeObjectFactory::createNodeInstance();
                $requestInstance = ApplicationHelper::getSelfInstance()->getRequestInstance();
@@ -146,11 +148,11 @@ class NodeDistributedHashTableDatabaseWrapper extends BaseDatabaseWrapper implem
                // Set the primary key
                $dataSetInstance->setUniqueKey(self::DB_COLUMN_NODE_ID);
 
-               // Get ip:port combination and "explode" it
-               $ipPort = $nodeInstance->getAddressPortArray();
+               // Get Universal Node Locator and "explode" it
+               $unl = $nodeInstance->getUniversalNodeLocatorArray();
 
                // Make sure both is valid
-               assert(($ipPort[0] !== 'invalid') && ($ipPort[1] !== 'invalid'));
+               assert(($unl[0] !== 'invalid') && ($unl[1] !== 'invalid') && ($unl[2] !== 'invalid'));
 
                // Get an array of all accepted object types
                $objectList = $nodeInstance->getListFromAcceptedObjectTypes();
@@ -160,8 +162,8 @@ class NodeDistributedHashTableDatabaseWrapper extends BaseDatabaseWrapper implem
 
                // Add public node data
                $dataSetInstance->addCriteria(self::DB_COLUMN_NODE_MODE       , $requestInstance->getRequestElement('mode'));
-               $dataSetInstance->addCriteria(self::DB_COLUMN_EXTERNAL_IP     , $ipPort[0]);
-               $dataSetInstance->addCriteria(self::DB_COLUMN_LISTEN_PORT     , $ipPort[1]);
+               $dataSetInstance->addCriteria(self::DB_COLUMN_EXTERNAL_IP     , $unl[0]);
+               $dataSetInstance->addCriteria(self::DB_COLUMN_LISTEN_PORT     , $unl[1]);
                $dataSetInstance->addCriteria(self::DB_COLUMN_NODE_ID         , $nodeInstance->getNodeId());
                $dataSetInstance->addCriteria(self::DB_COLUMN_SESSION_ID      , $nodeInstance->getSessionId());
                $dataSetInstance->addCriteria(self::DB_COLUMN_PRIVATE_KEY_HASH, $nodeInstance->getPrivateKeyHash());
@@ -169,6 +171,7 @@ class NodeDistributedHashTableDatabaseWrapper extends BaseDatabaseWrapper implem
                $dataSetInstance->addCriteria(self::DB_COLUMN_ACCEPT_BOOTSTRAP, $this->translateBooleanToYesNo($nodeInstance->isAcceptingDhtBootstrap()));
 
                // Return it
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('DHT-WRAPPER[' . __METHOD__ . ':' . __LINE__ . ']: EXIT!');
                return $dataSetInstance;
        }
 
@@ -187,18 +190,18 @@ class NodeDistributedHashTableDatabaseWrapper extends BaseDatabaseWrapper implem
                // Get node instance
                $nodeInstance = NodeObjectFactory::createNodeInstance();
 
-               // Get ip:port combination and "explode" it
-               $ipPort = $nodeInstance->getAddressPortArray();
+               // Get Universal Node Locator and "explode" it
+               $unl = $nodeInstance->getUniversalNodeLocatorArray();
 
                /*
                 * Make sure both is not 'invalid' which means that the resolver
                 * didn't work.
                 */
-               assert(($ipPort[0] !== 'invalid') && ($ipPort[1] !== 'invalid'));
+               assert(($unl[0] !== 'invalid') && ($unl[1] !== 'invalid') && ($unl[2] !== 'invalid'));
 
-               // Add ip:port/node id as criteria
-               $searchInstance->addCriteria(self::DB_COLUMN_EXTERNAL_IP, $ipPort[0]);
-               $searchInstance->addCriteria(self::DB_COLUMN_LISTEN_PORT, $ipPort[1]);
+               // Add Universal Node Locator/node id as criteria
+               $searchInstance->addCriteria(self::DB_COLUMN_EXTERNAL_IP, $unl[0]);
+               $searchInstance->addCriteria(self::DB_COLUMN_LISTEN_PORT, $unl[1]);
                $searchInstance->addCriteria(self::DB_COLUMN_NODE_ID    , $nodeInstance->getNodeId());
                $searchInstance->addCriteria(self::DB_COLUMN_SESSION_ID , $nodeInstance->getSessionId());
                $searchInstance->setLimit(1);
@@ -297,10 +300,10 @@ class NodeDistributedHashTableDatabaseWrapper extends BaseDatabaseWrapper implem
         * Registeres a node by given message data.
         *
         * @param       $messageData            An array of all message data
-        * @param       $handlerInstance        An instance of a Handleable class
+        * @param       $handlerInstance        An instance of a HandleableDataSet class
         * @return      void
         */
-       public function registerNodeByMessageData (array $messageData, Handleable $handlerInstance) {
+       public function registerNodeByMessageData (array $messageData, HandleableDataSet $handlerInstance) {
                /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('DHT-WRAPPER[' . __METHOD__ . ':' . __LINE__ . ']: handlerInstance=' . $handlerInstance->__toString() . ' - CALLED!');
 
                // Get a data set instance
@@ -325,11 +328,11 @@ class NodeDistributedHashTableDatabaseWrapper extends BaseDatabaseWrapper implem
         * Updates an existing entry in node list
         *
         * @param       $messageData            An array of all message data
-        * @param       $handlerInstance        An instance of a Handleable class
+        * @param       $handlerInstance        An instance of a HandleableDataSet class
         * @param       $searchInstance         An instance of LocalSearchCriteria class
         * @return      void
         */
-       public function updateNodeByMessageData (array $messageData, Handleable $handlerInstance, LocalSearchCriteria $searchInstance) {
+       public function updateNodeByMessageData (array $messageData, HandleableDataSet $handlerInstance, LocalSearchCriteria $searchInstance) {
                /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('DHT-WRAPPER[' . __METHOD__ . ':' . __LINE__ . ']: CALLED!');
 
                // Get a data set instance
index 79a5c701a8527e35de66f7783aa74082386742bf..7445a87ce0f6a2cc74974a9a9e37d06c98bb9f20 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 1c740fdb0a0ebd7730ff90e9f7677fbb634dd3aa..63ef594b458b57b1ff537da8d930602173d37357 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
@@ -188,7 +188,7 @@ class PeerStateLookupDatabaseWrapper extends BaseDatabaseWrapper implements Look
                $senderData = explode(':', HubTools::resolveSessionId($packageData[NetworkPackage::PACKAGE_DATA_SENDER]));
 
                // Just make sure that 'invalid:invalid' is not being processed
-               assert(($senderData[0] != 'invalid') && ($senderData[1] != 'invalid'));
+               assert(($senderData[0] != 'invalid') && ($senderData[1] != 'invalid') && ($senderData[2] != 'invalid'));
 
                // Add ip address and port
                $dataSetInstance->addCriteria(self::DB_COLUMN_PEER_IP  , $senderData[0]);
index 136a8a8993d84add6e694f75ebbf438ae3d4dd2a..a5b83f22fbf1f280a534d0825d54b7bc5d02672e 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
index 329bedd5a94590958e094855f39100a219a6f53e..ef84ef3071ebe716f8392f9741e9f3f88c363624 100644 (file)
@@ -4,7 +4,7 @@
 
 @author                Roland Haeder <webmaster@ship-simu.org>
 @version       0.0.0
-@copyright     Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+@copyright     Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
 @license       GNU GPL 3.0 or any newer version
 @link          http://www.ship-simu.org
 
index 0243619748b0beaee261d09c912ff3b31af4ba92..944ee01ab7a75112ea88232a2eaffb9aa0ea297d 100644 (file)
@@ -5,7 +5,7 @@ Please use config.php/config-local.php files at application/hub/ instead.
 
 @author                Roland Haeder <webmaster@ship-simu.org>
 @version       0.0.0
-@copyright     Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+@copyright     Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
 @license       GNU GPL 3.0 or any newer version
 @link          http://www.ship-simu.org
 
index cf57528d62e83115d0990467a4f0f4dee371aaf4..8421fe80128a4336e91868a43ff01e2eae4aeeea 100644 (file)
@@ -5,7 +5,7 @@ be used to indicate that this node does not want to receive announcements.
 
 @author                Roland Haeder <webmaster@ship-simu.org>
 @version       0.0.0
-@copyright     Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+@copyright     Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
 @license       GNU GPL 3.0 or any newer version
 @link          http://www.ship-simu.org
 
index e4b40d099724d606aa8cc4112e3a0f622a433f37..a4fa6f2c4e79b1253bd481199cb22c8f3f6bc5d4 100644 (file)
@@ -6,7 +6,7 @@ DHT bootstrap requests.
 
 @author                Roland Haeder <webmaster@ship-simu.org>
 @version       0.0.0
-@copyright     Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+@copyright     Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
 @license       GNU GPL 3.0 or any newer version
 @link          http://www.ship-simu.org
 
index c9407b0ae6878b2df9b4b3605a64dd4b74075ade..f795ce423ca02c4cc987816faac9c53e6641fe8a 100644 (file)
@@ -4,7 +4,7 @@ An XML template for answering node-list requests
 
 @author                Roland Haeder <webmaster@ship-simu.org>
 @version       0.0.0
-@copyright     Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+@copyright     Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
 @license       GNU GPL 3.0 or any newer version
 @link          http://www.ship-simu.org
 
index 5342f2914c347bc7332b8b28be9d8d4e7e55ecf3..75d26009a0322c7cdf94e17a42250168fcfd3e45 100644 (file)
@@ -4,7 +4,7 @@ A XML template for the producer to produce test units
 
 @author                Roland Haeder <webmaster@ship-simu.org>
 @version       0.0.0
-@copyright     Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+@copyright     Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
 @license       GNU GPL 3.0 or any newer version
 @link          http://www.ship-simu.org
 
index 7268d6dfcb40fdd1f0ddbb926986d418f5886c01..ee9460fd3f6c1ff1c873144d5cf14cff13373697 100644 (file)
@@ -4,7 +4,7 @@ A XML template for the producer to produce work units
 
 @author                Roland Haeder <webmaster@ship-simu.org>
 @version       0.0.0
-@copyright     Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+@copyright     Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
 @license       GNU GPL 3.0 or any newer version
 @link          http://www.ship-simu.org
 
index e3ca8e6b90b807dccb24e5db8170c0d84f3799b7..70482d8d81b9dc05258213220c7f3d12c672d13c 100644 (file)
@@ -4,7 +4,7 @@ An XML for DHT bootstrapping
 
 @author                Roland Haeder <webmaster@ship-simu.org>
 @version       0.0.0
-@copyright     Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+@copyright     Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
 @license       GNU GPL 3.0 or any newer version
 @link          http://www.ship-simu.org
 
index 0d2ad9ef2133f937da9bff869c2a3a320d3bf4d3..f40eea3dee9cab2802cdb2750cd154a40d5f6c18 100644 (file)
@@ -4,7 +4,7 @@ An XML for DHTs publishing their entries
 
 @author                Roland Haeder <webmaster@ship-simu.org>
 @version       0.0.0
-@copyright     Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+@copyright     Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
 @license       GNU GPL 3.0 or any newer version
 @link          http://www.ship-simu.org
 
index f957d1e88694de0608be8c446261523caeff8b29..b8c8db0a935753ec3766ae99c786816896b496eb 100644 (file)
@@ -4,7 +4,7 @@ All valid node status.
 
 @author                Roland Haeder <webmaster@ship-simu.org>
 @version       0.0.0
-@copyright     Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+@copyright     Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
 @license       GNU GPL 3.0 or any newer version
 @link          http://www.ship-simu.org
 
index a83a1838019afc4e9ea7df946b508eb3dff45c7a..d2765903c1785db1f50b2d38df8435c675f04f22 100644 (file)
@@ -5,7 +5,7 @@ here.
 
 @author                Roland Haeder <webmaster@ship-simu.org>
 @version       0.0.0
-@copyright     Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+@copyright     Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
 @license       GNU GPL 3.0 or any newer version
 @link          http://www.ship-simu.org
 
@@ -56,8 +56,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>
                        //-->
                        <object-max-spread>1</object-max-spread>
                        <!--
-                       The protocol we should use for transmission. Valid values can be
-                       'tcp' or 'udp', without the quotes.
+                       The protocol we should use for transmission. Valid is 'unl' without
+                       the quotes.
                        //-->
                        <object-protocol>tcp</object-protocol>
                        <!--
@@ -74,49 +74,49 @@ along with this program. If not, see <http://www.gnu.org/licenses/>
                        <object-name>self_connect</object-name>
                        <object-recipient-limitation>self</object-recipient-limitation>
                        <object-max-spread>self</object-max-spread>
-                       <object-protocol>tcp</object-protocol>
+                       <object-protocol>unl</object-protocol>
                        <object-recipient-type>hub</object-recipient-type>
                </object-list-entry>
                <object-list-entry>
                        <object-name>announcement_answer</object-name>
                        <object-recipient-limitation>direct</object-recipient-limitation>
                        <object-max-spread>1</object-max-spread>
-                       <object-protocol>tcp</object-protocol>
+                       <object-protocol>unl</object-protocol>
                        <object-recipient-type>hub</object-recipient-type>
                </object-list-entry>
                <object-list-entry>
                        <object-name>request_node_list</object-name>
                        <object-recipient-limitation>upper</object-recipient-limitation>
                        <object-max-spread>1</object-max-spread>
-                       <object-protocol>tcp</object-protocol>
+                       <object-protocol>unl</object-protocol>
                        <object-recipient-type>hub</object-recipient-type>
                </object-list-entry>
                <object-list-entry>
                        <object-name>request_node_list_answer</object-name>
                        <object-recipient-limitation>direct</object-recipient-limitation>
                        <object-max-spread>1</object-max-spread>
-                       <object-protocol>tcp</object-protocol>
+                       <object-protocol>unl</object-protocol>
                        <object-recipient-type>hub</object-recipient-type>
                </object-list-entry>
                <object-list-entry>
                        <object-name>dht_bootstrap</object-name>
                        <object-recipient-limitation>all</object-recipient-limitation>
                        <object-max-spread>3</object-max-spread>
-                       <object-protocol>tcp</object-protocol>
+                       <object-protocol>unl</object-protocol>
                        <object-recipient-type>all</object-recipient-type>
                </object-list-entry>
                <object-list-entry>
                        <object-name>dht_bootstrap_answer</object-name>
                        <object-recipient-limitation>direct</object-recipient-limitation>
                        <object-max-spread>1</object-max-spread>
-                       <object-protocol>tcp</object-protocol>
+                       <object-protocol>unl</object-protocol>
                        <object-recipient-type>hub</object-recipient-type>
                </object-list-entry>
                <object-list-entry>
                        <object-name>dht_publish_entry</object-name>
                        <object-recipient-limitation>all</object-recipient-limitation>
                        <object-max-spread>4</object-max-spread>
-                       <object-protocol>tcp</object-protocol>
+                       <object-protocol>unl</object-protocol>
                        <object-recipient-type>hub</object-recipient-type>
                </object-list-entry>
        </object-list>
index b778d99f7217fe3acd2c36ff7e06706d05ffc46a..7d71b8223fc8c62c39b8322d13ac5583697faa1e 100644 (file)
@@ -5,7 +5,7 @@ transmitted.
 
 @author                Roland Haeder <webmaster@ship-simu.org>
 @version       0.0.0
-@copyright     Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+@copyright     Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
 @license       GNU GPL 3.0 or any newer version
 @link          http://www.ship-simu.org
 
index 6e2a70ff4bb60e11b4915b9433bb0496767e4de4..236ef9e8b931441eb630ff6ed7f924495fa3b1d2 100644 (file)
@@ -4,7 +4,7 @@ A descriptor XML file for self-connect attempts
 
 @author                Roland Haeder <webmaster@ship-simu.org>
 @version       0.0.0
-@copyright     Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Hub Developer Team
+@copyright     Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
 @license       GNU GPL 3.0 or any newer version
 @link          http://www.ship-simu.org
 
index 7f50305198824161c6ac9ff68dd394583e2721c2..ebd9cba1dde5e71fe9d8797d27013e7c699d3106 100644 (file)
--- a/index.php
+++ b/index.php
@@ -9,7 +9,7 @@
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Core Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Core Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *