From: Roland Häder Date: Fri, 19 May 2017 15:13:03 +0000 (+0200) Subject: Next wave: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=54877972578bb7190c1f288edd658f47a079677f;p=hub.git Next wave: - imported Visitable, Visitor - imported Taskable - imported BasePool, Poolable - imported Listenable - created new namespaces - added namespaces Signed-off-by: Roland Häder --- diff --git a/application/hub/classes/class_BaseHubSystem.php b/application/hub/classes/class_BaseHubSystem.php index 2ddfc6aed..f56f81007 100644 --- a/application/hub/classes/class_BaseHubSystem.php +++ b/application/hub/classes/class_BaseHubSystem.php @@ -7,6 +7,7 @@ use Hub\Network\Receive\Receivable; // Import framework stuff use CoreFramework\Object\BaseFrameworkSystem; +use CoreFramework\Pool\Poolable; /** * A general hub system class @@ -143,7 +144,7 @@ class BaseHubSystem extends BaseFrameworkSystem { * @param $listenerPoolInstance The new listener pool instance * @return void */ - protected final function setListenerPoolInstance (PoolableListener $listenerPoolInstance) { + protected final function setListenerPoolInstance (Poolable $listenerPoolInstance) { $this->listenerPoolInstance = $listenerPoolInstance; } diff --git a/application/hub/classes/discovery/recipient/socket/class_PackageSocketDiscovery.php b/application/hub/classes/discovery/recipient/socket/class_PackageSocketDiscovery.php index 6de0dab0e..2e7940794 100644 --- a/application/hub/classes/discovery/recipient/socket/class_PackageSocketDiscovery.php +++ b/application/hub/classes/discovery/recipient/socket/class_PackageSocketDiscovery.php @@ -7,6 +7,7 @@ use Hub\Factory\Node\NodeObjectFactory; use Hub\Generic\BaseHubSystem; // Import framework stuff +use CoreFramework\Listener\Listenable; use CoreFramework\Registry\Registerable; use CoreFramework\Registry\Registry; diff --git a/application/hub/classes/factories/source/url/class_UrlSourceObjectFactory.php b/application/hub/classes/factories/source/url/class_UrlSourceObjectFactory.php index 00d84c908..4dd8de645 100644 --- a/application/hub/classes/factories/source/url/class_UrlSourceObjectFactory.php +++ b/application/hub/classes/factories/source/url/class_UrlSourceObjectFactory.php @@ -6,7 +6,6 @@ namespace Hub\Source\Url; use CoreFramework\Factory\ObjectFactory; use CoreFramework\Registry\Registry; use CoreFramework\Task\Taskable; -use CoreFramework\Visitor\Visitable; /** * A factory class for URL sources diff --git a/application/hub/classes/handler/network/tcp/class_ b/application/hub/classes/handler/network/tcp/class_ index d0fb638b4..c4413218d 100644 --- a/application/hub/classes/handler/network/tcp/class_ +++ b/application/hub/classes/handler/network/tcp/class_ @@ -109,8 +109,9 @@ while (count($clients) > 0) { foreach ($clients as $send_sock) { // if its the listening sock or the client that we got the message from, go to the next one in the list - if ($send_sock == $mainSocket || $send_sock == $read_sock) + if ($send_sock == $mainSocket || $send_sock == $read_sock) { continue; + } // END - if // write the message to the client -- add a newline character to the end of the message socket_write($send_sock, "{$ip}:{$data}\n"); @@ -138,6 +139,10 @@ namespace Hub\Listener\; // Import application-specific stuff use Hub\Helper\Node\NodeHelper; +// Import framework stuff +use CoreFramework\Listener\Listenable; +use CoreFramework\Visitor\Visitable; + . */ -class BaseConnectionHelper extends BaseHubSystemHelper implements Registerable { +class BaseConnectionHelper extends BaseHubSystemHelper implements Visitable, Registerable { // Exception codes const EXCEPTION_UNSUPPORTED_ERROR_HANDLER = 0x9100; diff --git a/application/hub/classes/info/connection/class_ConnectionInfo.php b/application/hub/classes/info/connection/class_ConnectionInfo.php index 5bfbe324d..9ea663635 100644 --- a/application/hub/classes/info/connection/class_ConnectionInfo.php +++ b/application/hub/classes/info/connection/class_ConnectionInfo.php @@ -3,6 +3,7 @@ namespace Hub\Information\Connection; // Import framework stuff +use CoreFramework\Listener\Listenable; use CoreFramework\Registry\Registerable; /** diff --git a/application/hub/classes/listener/tcp/class_ b/application/hub/classes/listener/tcp/class_ index 2c52bff33..c2a49dcce 100644 --- a/application/hub/classes/listener/tcp/class_ +++ b/application/hub/classes/listener/tcp/class_ @@ -138,6 +138,10 @@ namespace Hub\Listener\Tcp\; // Import application-specific stuff use Hub\Helper\Node\NodeHelper; +// Import framework stuff +use CoreFramework\Listener\Listenable; +use CoreFramework\Visitor\Visitable; + . */ -class DefaultListenerPool extends BasePool implements PoolableListener { +class DefaultListenerPool extends BasePool implements Poolable { /** * Protected constructor * @@ -74,7 +77,7 @@ class DefaultListenerPool extends BasePool implements PoolableListener { } /** - * Run the shutdown seqeuence by a Visitor Pattern + * Run the shutdown seqeuence by a visitor pattern * * @return void */ diff --git a/application/hub/classes/pools/peer/class_DefaultPeerPool.php b/application/hub/classes/pools/peer/class_DefaultPeerPool.php index 756c3fb16..46a187a5f 100644 --- a/application/hub/classes/pools/peer/class_DefaultPeerPool.php +++ b/application/hub/classes/pools/peer/class_DefaultPeerPool.php @@ -1,4 +1,14 @@ partialStub('Please implement this method.'); } -} -// [EOF] -?> +} diff --git a/application/hub/classes/visitor/pool/monitor/class_RawDataPoolMonitorVisitor.php b/application/hub/classes/visitor/pool/monitor/class_RawDataPoolMonitorVisitor.php index a2da41e71..8b2e803e7 100644 --- a/application/hub/classes/visitor/pool/monitor/class_RawDataPoolMonitorVisitor.php +++ b/application/hub/classes/visitor/pool/monitor/class_RawDataPoolMonitorVisitor.php @@ -5,6 +5,10 @@ namespace Hub\Visitor\Monitor\Pool; // Import application-specific stuff use Hub\Network\Receive\Receivable; +// Import framework stuff +use CoreFramework\Listener\Listenable; +use CoreFramework\Pool\Poolable; + /** * A RawDataMonitor visitor * diff --git a/application/hub/classes/visitor/pool/shutdown/class_Shutdown b/application/hub/classes/visitor/pool/shutdown/class_Shutdown index d85f52e97..282d6896b 100644 --- a/application/hub/classes/visitor/pool/shutdown/class_Shutdown +++ b/application/hub/classes/visitor/pool/shutdown/class_Shutdown @@ -1,4 +1,10 @@ setConfigEntry('peer_state_lookup_db_wrapper_class', 'PeerStateLookupDatab $cfg->setConfigEntry('web_content_type', ''); // CFG: LISTENER-POOL-CLAS -$cfg->setConfigEntry('listener_pool_class', 'DefaultListenerPool'); +$cfg->setConfigEntry('listener_pool_class', 'Hub\Pool\Listener\DefaultListenerPool'); // CFG: TCP-LISTENER-CLASS $cfg->setConfigEntry('tcp_listener_class', 'TcpListener'); diff --git a/application/hub/interfaces/discovery/recipient/socket/class_DiscoverableSocket.php b/application/hub/interfaces/discovery/recipient/socket/class_DiscoverableSocket.php index b28b8f6ae..8502aa726 100644 --- a/application/hub/interfaces/discovery/recipient/socket/class_DiscoverableSocket.php +++ b/application/hub/interfaces/discovery/recipient/socket/class_DiscoverableSocket.php @@ -42,7 +42,5 @@ interface DiscoverableSocket extends DiscoverableRecipient { * @return $listenerInstance An instance of a Listenable instance or null */ function discoverListenerInstance (HandleableProtocol $protocolInstance, array $packageData); -} -// [EOF] -?> +} diff --git a/application/hub/interfaces/shareable/info/class_ShareableInfo.php b/application/hub/interfaces/shareable/info/class_ShareableInfo.php index dbd1f49c1..a3765228f 100644 --- a/application/hub/interfaces/shareable/info/class_ShareableInfo.php +++ b/application/hub/interfaces/shareable/info/class_ShareableInfo.php @@ -4,6 +4,7 @@ namespace Hub\Information; // Import framework stuff use CoreFramework\Generic\FrameworkInterface; +use CoreFramework\Listener\Listenable; /** * An interface for shareable informations diff --git a/application/hub/interfaces/tags/class_Tagable.php b/application/hub/interfaces/tags/class_Tagable.php index d0ba6c756..cac89f9a4 100644 --- a/application/hub/interfaces/tags/class_Tagable.php +++ b/application/hub/interfaces/tags/class_Tagable.php @@ -4,6 +4,7 @@ namespace Hub\Tag; // Import framework stuff use CoreFramework\Generic\FrameworkInterface; +use CoreFramework\Listener\Listenable; /** * An interface for tags diff --git a/application/hub/interfaces/visitor/pool/listener/class_ListenerPoolVisitor.php b/application/hub/interfaces/visitor/pool/listener/class_ListenerPoolVisitor.php index 7c05cdd29..e89db8866 100644 --- a/application/hub/interfaces/visitor/pool/listener/class_ListenerPoolVisitor.php +++ b/application/hub/interfaces/visitor/pool/listener/class_ListenerPoolVisitor.php @@ -1,4 +1,10 @@ +} diff --git a/core b/core index aa425d10f..1e0fc6320 160000 --- a/core +++ b/core @@ -1 +1 @@ -Subproject commit aa425d10f8eef36160fcfd87bcd9a7d44af9ff16 +Subproject commit 1e0fc6320d565605e15aa4f023915ca1574272e4