From c7d254626c3b47a4e1c6006332c77a9e0ee5fc37 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Fri, 19 May 2017 17:00:43 +0200 Subject: [PATCH] Next wave: - imported HelpableTemplate - imported Requestable - imported ProtocolResolverFactory, (Base)ProtocolResolver - imported LocateableNode - added namespace - updated core framework MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- .../hub/classes/discovery/class_BaseNodeDiscovery.php | 2 ++ .../discovery/node/class_UniversalNodeLocatorDiscovery.php | 1 + .../factories/resolver/class_ProtocolResolverFactory.php | 2 +- application/hub/classes/nodes/class_BaseHubNode.php | 1 + application/hub/classes/resolver/protocol/class_ | 2 ++ .../resolver/protocol/class_BaseProtocolResolver.php | 6 ++---- .../resolver/protocol/tcp/class_TcpProtocolResolver.php | 2 ++ application/hub/classes/tools/class_HubTools.php | 5 ++--- application/hub/config.php | 4 ++-- core | 2 +- 10 files changed, 16 insertions(+), 11 deletions(-) diff --git a/application/hub/classes/discovery/class_BaseNodeDiscovery.php b/application/hub/classes/discovery/class_BaseNodeDiscovery.php index 8623bdbab..c429b1b09 100644 --- a/application/hub/classes/discovery/class_BaseNodeDiscovery.php +++ b/application/hub/classes/discovery/class_BaseNodeDiscovery.php @@ -6,6 +6,8 @@ namespace Hub\Discovery\Node; use CoreFramework\Discovery\BaseDiscovery; use CoreFramework\Discovery\Discoverable; use CoreFramework\Generic\UnsupportedOperationException; +use CoreFramework\Helper\Template\HelpableTemplate; +use CoreFramework\Request\Requestable; /** * A general node discovery class diff --git a/application/hub/classes/discovery/node/class_UniversalNodeLocatorDiscovery.php b/application/hub/classes/discovery/node/class_UniversalNodeLocatorDiscovery.php index 73f162d6f..105a66f99 100644 --- a/application/hub/classes/discovery/node/class_UniversalNodeLocatorDiscovery.php +++ b/application/hub/classes/discovery/node/class_UniversalNodeLocatorDiscovery.php @@ -4,6 +4,7 @@ namespace Hub\Discovery\Locator; // Import application-specific stuff use Hub\Discovery\Node\BaseNodeDiscovery; +use Hub\Factory\Resolver\Protocol\ProtocolResolverFactory; use Hub\Helper\Node\NodeHelper; // Import framework stuff diff --git a/application/hub/classes/factories/resolver/class_ProtocolResolverFactory.php b/application/hub/classes/factories/resolver/class_ProtocolResolverFactory.php index 9ff8107ae..9034f83a3 100644 --- a/application/hub/classes/factories/resolver/class_ProtocolResolverFactory.php +++ b/application/hub/classes/factories/resolver/class_ProtocolResolverFactory.php @@ -1,6 +1,6 @@ . */ -class BaseProtocolResolver extends BaseHubSystem { +abstract class BaseProtocolResolver extends BaseHubSystem implements ProtocolResolver { /** * Protected constructor * @@ -38,7 +38,5 @@ class BaseProtocolResolver extends BaseHubSystem { // Call parent constructor parent::__construct($className); } -} -// [EOF] -?> +} diff --git a/application/hub/classes/resolver/protocol/tcp/class_TcpProtocolResolver.php b/application/hub/classes/resolver/protocol/tcp/class_TcpProtocolResolver.php index 24bdce6ef..9b6842d46 100644 --- a/application/hub/classes/resolver/protocol/tcp/class_TcpProtocolResolver.php +++ b/application/hub/classes/resolver/protocol/tcp/class_TcpProtocolResolver.php @@ -5,6 +5,8 @@ namespace Hub\Resolver\Protocol\Tcp; // Import application-specific stuff use Hub\Database\Frontend\Node\Information\NodeInformationDatabaseWrapper; use Hub\Helper\Node\NodeHelper; +use Hub\Resolver\Protocol\BaseProtocolResolver; +use Hub\Resolver\Protocol\ProtocolResolver; // Import framework stuff use CoreFramework\Console\Tools\ConsoleTools; diff --git a/application/hub/classes/tools/class_HubTools.php b/application/hub/classes/tools/class_HubTools.php index d76a87b6a..2c72f0a2a 100644 --- a/application/hub/classes/tools/class_HubTools.php +++ b/application/hub/classes/tools/class_HubTools.php @@ -6,6 +6,7 @@ namespace Hub\Tools; use Hub\Factory\Dht\DhtObjectFactory; use Hub\Factory\Node\NodeObjectFactory; use Hub\Generic\BaseHubSystem; +use Hub\Locator\Node\LocateableNode; // Import framework stuff use CoreFramework\Configuration\FrameworkConfiguration; @@ -329,7 +330,5 @@ class HubTools extends BaseHubSystem { //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NODE[' . __METHOD__ . ':' . __LINE__ . ']: unl=' . $GLOBALS[__METHOD__] . ' - EXIT!'); return $GLOBALS[__METHOD__]; } -} -// [EOF] -?> +} diff --git a/application/hub/config.php b/application/hub/config.php index a45a14971..1ba392d32 100644 --- a/application/hub/config.php +++ b/application/hub/config.php @@ -730,7 +730,7 @@ $cfg->setConfigEntry('unl_discovery_class', 'Hub\Discovery\Locator\UniversalNode $cfg->setConfigEntry('tcp_protocol_handler_class', 'TcpProtocolHandler'); // CFG: UNIVERSAL-NODE-LOCATOR-CLASS -$cfg->setConfigEntry('universal_node_locator_class', 'UniversalNodeLocator'); +$cfg->setConfigEntry('universal_node_locator_class', 'Hub\Locator\Node\UniversalNodeLocator'); // CFG: RECIPIENT-LIST-CLASS $cfg->setConfigEntry('recipient_list_class', 'RecipientList'); @@ -748,7 +748,7 @@ $cfg->setConfigEntry('udp_connection_helper_class', 'UdpConnectionHelper'); $cfg->setConfigEntry('hub_communication_protocol_type', 'tcp'); // CFG: TCP-PROTOCOL-RESOLVER-CLASS -$cfg->setConfigEntry('tcp_protocol_resolver_class', 'TcpProtocolResolver'); +$cfg->setConfigEntry('tcp_protocol_resolver_class', 'Hub\Resolver\Protocol\Tcp\TcpProtocolResolver'); // CFG: TCP-BUFFER-LENGTH $cfg->setConfigEntry('tcp_buffer_length', 1024); diff --git a/core b/core index de0fb4d6e..aa425d10f 160000 --- a/core +++ b/core @@ -1 +1 @@ -Subproject commit de0fb4d6e2785338f2ba881761efc7b15c4a9530 +Subproject commit aa425d10f8eef36160fcfd87bcd9a7d44af9ff16 -- 2.39.5