From 1b71ac6c992bcba94bed9a28887ace91ed639b00 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Fri, 19 May 2017 17:46:40 +0200 Subject: [PATCH] Next wave: - imported BaseList, Listable - imported BaseHubSystemHelper, BaseConnectionHelper - created namespaces - added namespaces to configuration entries - accept() must be public now - doShutdown() is old name, now there is preShutdown() - opps, "unexpted list", let's use Lists like the framework then MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- .../recipient/socket/class_PackageSocketDiscovery.php | 1 + .../classes/factories/lists/class_RecipientListFactory.php | 2 +- application/hub/classes/helper/class_ | 6 ++++++ application/hub/classes/helper/connection/class_ | 6 ++++++ .../helper/connection/class_BaseConnectionHelper.php | 3 ++- .../connection/ipv4/class_BaseIpV4ConnectionHelper.php | 6 ++++++ .../hub/classes/helper/dht/class_DhtBootstrapHelper.php | 1 + .../hub/classes/helper/dht/class_DhtPublishEntryHelper.php | 1 + .../hub/classes/helper/node/class_BaseNodeHelper.php | 1 + .../iterator/network/class_NetworkListenIterator.php | 6 ++++++ .../iterator/pool/handler/class_HandlerPoolIterator.php | 6 ++++++ .../iterator/pool/monitor/class_MonitorPoolIterator.php | 1 + .../iterator/pool/shutdown/class_ShutdownPoolIterator.php | 6 ++++++ .../classes/iterator/pool/tasks/class_TaskPoolIterator.php | 1 + application/hub/classes/listener/tcp/class_TcpListener.php | 3 +++ application/hub/classes/lists/hub/class_HubList.php | 7 +++++++ .../hub/classes/lists/pool/class_PoolEntriesList.php | 4 +++- .../hub/classes/lists/recipient/class_RecipientList.php | 4 +++- application/hub/classes/package/class_NetworkPackage.php | 1 + application/hub/classes/pools/class_BasePool.php | 1 + .../classes/pools/listener/class_DefaultListenerPool.php | 4 ++-- application/hub/classes/recipient/class_ | 6 ++++++ .../hub/classes/recipient/dht/class_DhtRecipient.php | 1 + .../hub/classes/recipient/direct/class_DirectRecipient.php | 3 +++ .../hub/classes/recipient/self/class_SelfRecipient.php | 3 +++ .../hub/classes/recipient/upper/class_UpperRecipient.php | 3 +++ .../hub/classes/tasks/node/ping/class_NodePingTask.php | 1 + application/hub/config.php | 6 +++--- application/hub/interfaces/recipient/class_Recipient.php | 1 + core | 2 +- 30 files changed, 87 insertions(+), 10 deletions(-) diff --git a/application/hub/classes/discovery/recipient/socket/class_PackageSocketDiscovery.php b/application/hub/classes/discovery/recipient/socket/class_PackageSocketDiscovery.php index 2e7940794..2701189d0 100644 --- a/application/hub/classes/discovery/recipient/socket/class_PackageSocketDiscovery.php +++ b/application/hub/classes/discovery/recipient/socket/class_PackageSocketDiscovery.php @@ -5,6 +5,7 @@ namespace Hub\Network\Discovery\Socket; // Import hub-specific stuff use Hub\Factory\Node\NodeObjectFactory; use Hub\Generic\BaseHubSystem; +use Hub\Helper\Connection\BaseConnectionHelper; // Import framework stuff use CoreFramework\Listener\Listenable; diff --git a/application/hub/classes/factories/lists/class_RecipientListFactory.php b/application/hub/classes/factories/lists/class_RecipientListFactory.php index 56350ef40..3ecd4e097 100644 --- a/application/hub/classes/factories/lists/class_RecipientListFactory.php +++ b/application/hub/classes/factories/lists/class_RecipientListFactory.php @@ -1,6 +1,6 @@ visitConnectionHelper($this); } diff --git a/application/hub/classes/helper/connection/ipv4/class_BaseIpV4ConnectionHelper.php b/application/hub/classes/helper/connection/ipv4/class_BaseIpV4ConnectionHelper.php index e045925fa..db6e4bd47 100644 --- a/application/hub/classes/helper/connection/ipv4/class_BaseIpV4ConnectionHelper.php +++ b/application/hub/classes/helper/connection/ipv4/class_BaseIpV4ConnectionHelper.php @@ -1,4 +1,10 @@ debugOutput('POOL[' . __METHOD__ . ':' . __LINE__ . ']: Shutting down listener pool - CALLED!'); diff --git a/application/hub/classes/recipient/class_ b/application/hub/classes/recipient/class_ index d85e73e9c..2c92c5595 100644 --- a/application/hub/classes/recipient/class_ +++ b/application/hub/classes/recipient/class_ @@ -1,4 +1,10 @@ setConfigEntry('tcp_listener_class', 'TcpListener'); $cfg->setConfigEntry('udp_listener_class', 'UdpListener'); // CFG: SOCKET-FILE-LISTENER-CLASS -$cfg->setConfigEntry('socket_file_listener_class', 'SocketFileListener'); +$cfg->setConfigEntry('socket_file_listener_class', 'CoreFramework\Listener\Socket\SocketFileListener'); // CFG: SOCKET-FILE-DECORATOR-LISTENER-CLASS -$cfg->setConfigEntry('socket_file_decorator_listener_class', 'SocketFileListenerDecorator'); +$cfg->setConfigEntry('socket_file_decorator_listener_class', 'CoreFramework\Listener\Socket\SocketFileListenerDecorator'); // CFG: NODE-TCP-LISTENER-CLASS $cfg->setConfigEntry('node_tcp_listener_class', 'HubTcpListenerDecorator'); @@ -100,7 +100,7 @@ $cfg->setConfigEntry('node_pool_class', 'DefaultPeerPool'); $cfg->setConfigEntry('application_pool_class', 'DefaultPeerPool'); // CFG: POOL-ENTRIES-LIST-CLASS -$cfg->setConfigEntry('pool_entries_list_class', 'PoolEntriesList'); +$cfg->setConfigEntry('pool_entries_list_class', 'Hub\Lists\Pool\PoolEntriesList'); // CFG: SHUTDOWN-POOL-ITERATOR-CLASS $cfg->setConfigEntry('shutdown_pool_iterator_class', 'ShutdownPoolIterator'); diff --git a/application/hub/interfaces/recipient/class_Recipient.php b/application/hub/interfaces/recipient/class_Recipient.php index 6e9557227..c653b3dde 100644 --- a/application/hub/interfaces/recipient/class_Recipient.php +++ b/application/hub/interfaces/recipient/class_Recipient.php @@ -4,6 +4,7 @@ namespace Hub\Recipient; // Import framework stuff use CoreFramework\Generic\FrameworkInterface; +use CoreFramework\Lists\Listable; /** * An interface for recipients diff --git a/core b/core index 1e0fc6320..6cf40d9bf 160000 --- a/core +++ b/core @@ -1 +1 @@ -Subproject commit 1e0fc6320d565605e15aa4f023915ca1574272e4 +Subproject commit 6cf40d9bfbe6159ce08cbec4c87d504f5829429d -- 2.39.5